Skip to content

Commit b445f62

Browse files
Thomas PrestonLinus Walleij
authored andcommitted
pinctrl: mcp23s08: Fix mcp23x17_regmap initialiser
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: 8f38910 ("pinctrl: mcp23s08: switch to regmap caching") Signed-off-by: Thomas Preston <thomas.preston@codethink.co.uk> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20200828213226.1734264-2-thomas.preston@codethink.co.uk Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
1 parent ebc2599 commit b445f62

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

‎drivers/pinctrl/pinctrl-mcp23s08.c‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ const struct regmap_config mcp23x08_regmap = {
8787
};
8888
EXPORT_SYMBOL_GPL(mcp23x08_regmap);
8989

90-
static const struct reg_default mcp23x16_defaults[] = {
90+
static const struct reg_default mcp23x17_defaults[] = {
9191
{.reg = MCP_IODIR << 1, .def = 0xffff},
9292
{.reg = MCP_IPOL << 1, .def = 0x0000},
9393
{.reg = MCP_GPINTEN << 1, .def = 0x0000},
@@ -98,23 +98,23 @@ static const struct reg_default mcp23x16_defaults[] = {
9898
{.reg = MCP_OLAT << 1, .def = 0x0000},
9999
};
100100

101-
static const struct regmap_range mcp23x16_volatile_range = {
101+
static const struct regmap_range mcp23x17_volatile_range = {
102102
.range_min = MCP_INTF << 1,
103103
.range_max = MCP_GPIO << 1,
104104
};
105105

106-
static const struct regmap_access_table mcp23x16_volatile_table = {
107-
.yes_ranges = &mcp23x16_volatile_range,
106+
static const struct regmap_access_table mcp23x17_volatile_table = {
107+
.yes_ranges = &mcp23x17_volatile_range,
108108
.n_yes_ranges = 1,
109109
};
110110

111-
static const struct regmap_range mcp23x16_precious_range = {
111+
static const struct regmap_range mcp23x17_precious_range = {
112112
.range_min = MCP_GPIO << 1,
113113
.range_max = MCP_GPIO << 1,
114114
};
115115

116-
static const struct regmap_access_table mcp23x16_precious_table = {
117-
.yes_ranges = &mcp23x16_precious_range,
116+
static const struct regmap_access_table mcp23x17_precious_table = {
117+
.yes_ranges = &mcp23x17_precious_range,
118118
.n_yes_ranges = 1,
119119
};
120120

@@ -124,10 +124,10 @@ const struct regmap_config mcp23x17_regmap = {
124124

125125
.reg_stride = 2,
126126
.max_register = MCP_OLAT << 1,
127-
.volatile_table = &mcp23x16_volatile_table,
128-
.precious_table = &mcp23x16_precious_table,
129-
.reg_defaults = mcp23x16_defaults,
130-
.num_reg_defaults = ARRAY_SIZE(mcp23x16_defaults),
127+
.volatile_table = &mcp23x17_volatile_table,
128+
.precious_table = &mcp23x17_precious_table,
129+
.reg_defaults = mcp23x17_defaults,
130+
.num_reg_defaults = ARRAY_SIZE(mcp23x17_defaults),
131131
.cache_type = REGCACHE_FLAT,
132132
.val_format_endian = REGMAP_ENDIAN_LITTLE,
133133
};

0 commit comments

Comments
 (0)