Commit 307c593b authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Bartosz Golaszewski

gpiolib: of: tighten selection of gpio renaming quirks

Tighten selection of legacy gpio renaming quirks so that they only
considered on more relevant configurations.
Suggested-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent b311c5cb
...@@ -385,18 +385,21 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, ...@@ -385,18 +385,21 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
#if IS_ENABLED(CONFIG_MFD_ARIZONA) #if IS_ENABLED(CONFIG_MFD_ARIZONA)
{ "wlf,reset", NULL, NULL }, { "wlf,reset", NULL, NULL },
#endif #endif
#if IS_ENABLED(CONFIG_REGULATOR)
/* /*
* Some regulator bindings happened before we managed to * Some regulator bindings happened before we managed to
* establish that GPIO properties should be named * establish that GPIO properties should be named
* "foo-gpios" so we have this special kludge for them. * "foo-gpios" so we have this special kludge for them.
*/ */
#if IS_ENABLED(CONFIG_REGULATOR_ARIZONA_LDO1)
{ "wlf,ldoena", NULL, NULL }, /* Arizona */ { "wlf,ldoena", NULL, NULL }, /* Arizona */
#endif
#if IS_ENABLED(CONFIG_REGULATOR_WM8994)
{ "wlf,ldo1ena", NULL, NULL }, /* WM8994 */ { "wlf,ldo1ena", NULL, NULL }, /* WM8994 */
{ "wlf,ldo2ena", NULL, NULL }, /* WM8994 */ { "wlf,ldo2ena", NULL, NULL }, /* WM8994 */
#endif #endif
#if IS_ENABLED(CONFIG_SPI_MASTER)
#if IS_ENABLED(CONFIG_SPI_GPIO)
/* /*
* The SPI GPIO bindings happened before we managed to * The SPI GPIO bindings happened before we managed to
* establish that GPIO properties should be named * establish that GPIO properties should be named
...@@ -405,6 +408,7 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, ...@@ -405,6 +408,7 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
{ "miso", "gpio-miso", "spi-gpio" }, { "miso", "gpio-miso", "spi-gpio" },
{ "mosi", "gpio-mosi", "spi-gpio" }, { "mosi", "gpio-mosi", "spi-gpio" },
{ "sck", "gpio-sck", "spi-gpio" }, { "sck", "gpio-sck", "spi-gpio" },
#endif
/* /*
* The old Freescale bindings use simply "gpios" as name * The old Freescale bindings use simply "gpios" as name
...@@ -412,10 +416,14 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np, ...@@ -412,10 +416,14 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
* all other SPI hardware. Allow this specifically for * all other SPI hardware. Allow this specifically for
* Freescale and PPC devices. * Freescale and PPC devices.
*/ */
#if IS_ENABLED(CONFIG_SPI_FSL_SPI)
{ "cs", "gpios", "fsl,spi" }, { "cs", "gpios", "fsl,spi" },
{ "cs", "gpios", "aeroflexgaisler,spictrl" }, { "cs", "gpios", "aeroflexgaisler,spictrl" },
#endif
#if IS_ENABLED(CONFIG_SPI_PPC4xx)
{ "cs", "gpios", "ibm,ppc4xx-spi" }, { "cs", "gpios", "ibm,ppc4xx-spi" },
#endif #endif
#if IS_ENABLED(CONFIG_TYPEC_FUSB302) #if IS_ENABLED(CONFIG_TYPEC_FUSB302)
/* /*
* Fairchild FUSB302 host is using undocumented "fcs,int_n" * Fairchild FUSB302 host is using undocumented "fcs,int_n"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment