pinctrl: ocelot: Fix pincfg for lan966x
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Wed, 13 Jul 2022 19:37:49 +0000 (21:37 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 18 Jul 2022 09:22:43 +0000 (11:22 +0200)
commitdc62db7138aa9365480254dda4c3e1316b1b1bbc
tree22b94f14dcf5c84c0f2ef399c247102886e3d6b8
parenta9ab5bf33ce9883fbf5c2fc8f4eada00c46dc089
pinctrl: ocelot: Fix pincfg for lan966x

The blamed commit introduce support for lan966x which use the same
pinconf_ops as sparx5. The problem is that pinconf_ops is specific to
sparx5. More precisely the offset of the bits in the pincfg register are
different and also lan966x doesn't have support for
PIN_CONFIG_INPUT_SCHMITT_ENABLE.

Fix this by making pinconf_ops more generic such that it can be also
used by lan966x. This is done by introducing 'ocelot_pincfg_data' which
contains the offset and what is supported for each SOC.

Fixes: 531d6ab36571 ("pinctrl: ocelot: Extend support for lan966x")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220713193750.4079621-2-horatiu.vultur@microchip.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-ocelot.c