Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1501767pxa; Fri, 28 Aug 2020 14:35:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnv1S+YdWZVnXyseDybyz/nbNFoqALBs6dAfelzD/H0nuw2Y5juUyEa2VwnzSzfzU0DSdj X-Received: by 2002:aa7:d6c2:: with SMTP id x2mr754680edr.332.1598650551700; Fri, 28 Aug 2020 14:35:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598650551; cv=none; d=google.com; s=arc-20160816; b=PVzHBtLbnayrDuesRldKDP8Khdxyvw35i+110lpov7S+21E0tQJGV+Dn0yvfuTxFPd J7f8rNZwe1M9BEiHrZsmBn7b8oZcc07pDIIyM3WqS/4rIvM1Q02doYBYbZMKO/VQVFUs YNCJLRTyrAX+V8GMULSOnWiKEQU3C3G6r/80MjRmmfaIQ2aoj7u0sUNUGUhxvc5JDerL X5rojTiQ0I/pdGFhzQg6GgXX8mgxxgZkYxdY2vzYfZKv/6wnryBj2f3GshFcB5CExeWP stR2SFvtTKUjiHsnnFbQanX34CjnYib0hzprCI0hVtxvrsrfVWhY4kl5wDpVBMVpeW/u uclA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=UGCOEEqc9Fe7I5DQyFxj3UGXnqP+pr+C40uiXeUILOs=; b=x1S0wT5TKYwBrGKfzGO3t7ZC6hMDPIewKx+AWtXcERLUR0CUEC7LlMR0mEb9r5iNxq OYZRXtxv/eMQcvLt1SY9/jROQr1TY/7AljmprILyLsqHI2TU0z+0oQm6bDYTcQEF0WGU 3xvMhCPT4EY8z27nRi0ww2zaCjk0RefHSmrp58Aji1WKhfYCg60lcuI8HBlIir/loyZG /L2RLBBYhd5RQLObEVidiG3ndAnsEqLR4iAsMUFBNRDfXhdABOLJwegL038TSkWuiPix iA7aMGo8DLFtJuSMkoOGnIJtSG5gNobFHViEPeTBYYXwgrRd8K/N3+RRDOofOvsD6lZF 4B2A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bq8si531354ejb.670.2020.08.28.14.35.28; Fri, 28 Aug 2020 14:35:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727034AbgH1Vcx (ORCPT + 99 others); Fri, 28 Aug 2020 17:32:53 -0400 Received: from imap2.colo.codethink.co.uk ([78.40.148.184]:60586 "EHLO imap2.colo.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726396AbgH1Vcr (ORCPT ); Fri, 28 Aug 2020 17:32:47 -0400 Received: from [188.210.212.0] (helo=localhost.localdomain) by imap2.colo.codethink.co.uk with esmtpsa (Exim 4.92 #3 (Debian)) id 1kBlzE-0001C9-J8; Fri, 28 Aug 2020 22:32:40 +0100 From: Thomas Preston To: linus.walleij@linaro.org, sre@kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, andriy.shevchenko@linux.intel.com, jan.kundrat@cesnet.cz, preid@electromag.com.au Cc: thomas.preston@codethink.co.uk Subject: [PATCH v2 1/2] pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser Date: Fri, 28 Aug 2020 22:32:25 +0100 Message-Id: <20200828213226.1734264-2-thomas.preston@codethink.co.uk> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200828213226.1734264-1-thomas.preston@codethink.co.uk> References: <20200828213226.1734264-1-thomas.preston@codethink.co.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mcp23x17_regmap is initialised with structs named "mcp23x16". However, the mcp23s08 driver doesn't support the MCP23016 device yet, so this appears to be a typo. Fixes: 8f38910ba4f6 ("pinctrl: mcp23s08: switch to regmap caching") Signed-off-by: Thomas Preston --- drivers/pinctrl/pinctrl-mcp23s08.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/pinctrl/pinctrl-mcp23s08.c b/drivers/pinctrl/pinctrl-mcp23s08.c index 42b12ea14d6be..87cde8fb08dd9 100644 --- a/drivers/pinctrl/pinctrl-mcp23s08.c +++ b/drivers/pinctrl/pinctrl-mcp23s08.c @@ -87,7 +87,7 @@ const struct regmap_config mcp23x08_regmap = { }; EXPORT_SYMBOL_GPL(mcp23x08_regmap); -static const struct reg_default mcp23x16_defaults[] = { +static const struct reg_default mcp23x17_defaults[] = { {.reg = MCP_IODIR << 1, .def = 0xffff}, {.reg = MCP_IPOL << 1, .def = 0x0000}, {.reg = MCP_GPINTEN << 1, .def = 0x0000}, @@ -98,23 +98,23 @@ static const struct reg_default mcp23x16_defaults[] = { {.reg = MCP_OLAT << 1, .def = 0x0000}, }; -static const struct regmap_range mcp23x16_volatile_range = { +static const struct regmap_range mcp23x17_volatile_range = { .range_min = MCP_INTF << 1, .range_max = MCP_GPIO << 1, }; -static const struct regmap_access_table mcp23x16_volatile_table = { - .yes_ranges = &mcp23x16_volatile_range, +static const struct regmap_access_table mcp23x17_volatile_table = { + .yes_ranges = &mcp23x17_volatile_range, .n_yes_ranges = 1, }; -static const struct regmap_range mcp23x16_precious_range = { +static const struct regmap_range mcp23x17_precious_range = { .range_min = MCP_GPIO << 1, .range_max = MCP_GPIO << 1, }; -static const struct regmap_access_table mcp23x16_precious_table = { - .yes_ranges = &mcp23x16_precious_range, +static const struct regmap_access_table mcp23x17_precious_table = { + .yes_ranges = &mcp23x17_precious_range, .n_yes_ranges = 1, }; @@ -124,10 +124,10 @@ const struct regmap_config mcp23x17_regmap = { .reg_stride = 2, .max_register = MCP_OLAT << 1, - .volatile_table = &mcp23x16_volatile_table, - .precious_table = &mcp23x16_precious_table, - .reg_defaults = mcp23x16_defaults, - .num_reg_defaults = ARRAY_SIZE(mcp23x16_defaults), + .volatile_table = &mcp23x17_volatile_table, + .precious_table = &mcp23x17_precious_table, + .reg_defaults = mcp23x17_defaults, + .num_reg_defaults = ARRAY_SIZE(mcp23x17_defaults), .cache_type = REGCACHE_FLAT, .val_format_endian = REGMAP_ENDIAN_LITTLE, }; -- 2.26.2