Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 8f38910ba4f6 ("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>

authored by

Thomas Preston and committed by
Linus Walleij
b445f623 ebc25991

+11 -11
+11 -11
drivers/pinctrl/pinctrl-mcp23s08.c
··· 87 87 }; 88 88 EXPORT_SYMBOL_GPL(mcp23x08_regmap); 89 89 90 - static const struct reg_default mcp23x16_defaults[] = { 90 + static const struct reg_default mcp23x17_defaults[] = { 91 91 {.reg = MCP_IODIR << 1, .def = 0xffff}, 92 92 {.reg = MCP_IPOL << 1, .def = 0x0000}, 93 93 {.reg = MCP_GPINTEN << 1, .def = 0x0000}, ··· 98 98 {.reg = MCP_OLAT << 1, .def = 0x0000}, 99 99 }; 100 100 101 - static const struct regmap_range mcp23x16_volatile_range = { 101 + static const struct regmap_range mcp23x17_volatile_range = { 102 102 .range_min = MCP_INTF << 1, 103 103 .range_max = MCP_GPIO << 1, 104 104 }; 105 105 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, 108 108 .n_yes_ranges = 1, 109 109 }; 110 110 111 - static const struct regmap_range mcp23x16_precious_range = { 111 + static const struct regmap_range mcp23x17_precious_range = { 112 112 .range_min = MCP_GPIO << 1, 113 113 .range_max = MCP_GPIO << 1, 114 114 }; 115 115 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, 118 118 .n_yes_ranges = 1, 119 119 }; 120 120 ··· 124 124 125 125 .reg_stride = 2, 126 126 .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), 131 131 .cache_type = REGCACHE_FLAT, 132 132 .val_format_endian = REGMAP_ENDIAN_LITTLE, 133 133 };