From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
Daniel Thompson <daniel.thompson@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Sasha Levin <sashal@kernel.org>,
brgl@bgdev.pl, linux-gpio@vger.kernel.org
Subject: [PATCH AUTOSEL 6.1 03/26] gpiolib: of: tighten selection of gpio renaming quirks
Date: Fri, 23 Dec 2022 20:29:07 -0500 [thread overview]
Message-ID: <20221224012930.392358-3-sashal@kernel.org> (raw)
In-Reply-To: <20221224012930.392358-1-sashal@kernel.org>
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
[ Upstream commit 307c593ba5f915e308fd23a2daae7e9a5209b604 ]
Tighten selection of legacy gpio renaming quirks so that they only
considered on more relevant configurations.
Suggested-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpio/gpiolib-of.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c
index 63c6fa3086f3..7d4bbf6484bc 100644
--- a/drivers/gpio/gpiolib-of.c
+++ b/drivers/gpio/gpiolib-of.c
@@ -385,18 +385,21 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
#if IS_ENABLED(CONFIG_MFD_ARIZONA)
{ "wlf,reset", NULL, NULL },
#endif
-#if IS_ENABLED(CONFIG_REGULATOR)
+
/*
* Some regulator bindings happened before we managed to
* establish that GPIO properties should be named
* "foo-gpios" so we have this special kludge for them.
*/
+#if IS_ENABLED(CONFIG_REGULATOR_ARIZONA_LDO1)
{ "wlf,ldoena", NULL, NULL }, /* Arizona */
+#endif
+#if IS_ENABLED(CONFIG_REGULATOR_WM8994)
{ "wlf,ldo1ena", NULL, NULL }, /* WM8994 */
{ "wlf,ldo2ena", NULL, NULL }, /* WM8994 */
#endif
-#if IS_ENABLED(CONFIG_SPI_MASTER)
+#if IS_ENABLED(CONFIG_SPI_GPIO)
/*
* The SPI GPIO bindings happened before we managed to
* establish that GPIO properties should be named
@@ -405,6 +408,7 @@ static struct gpio_desc *of_find_gpio_rename(struct device_node *np,
{ "miso", "gpio-miso", "spi-gpio" },
{ "mosi", "gpio-mosi", "spi-gpio" },
{ "sck", "gpio-sck", "spi-gpio" },
+#endif
/*
* 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,
* all other SPI hardware. Allow this specifically for
* Freescale and PPC devices.
*/
+#if IS_ENABLED(CONFIG_SPI_FSL_SPI)
{ "cs", "gpios", "fsl,spi" },
{ "cs", "gpios", "aeroflexgaisler,spictrl" },
+#endif
+#if IS_ENABLED(CONFIG_SPI_PPC4xx)
{ "cs", "gpios", "ibm,ppc4xx-spi" },
#endif
+
#if IS_ENABLED(CONFIG_TYPEC_FUSB302)
/*
* Fairchild FUSB302 host is using undocumented "fcs,int_n"
--
2.35.1
next prev parent reply other threads:[~2022-12-24 1:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 1:29 [PATCH AUTOSEL 6.1 01/26] gpiolib: of: add a quirk for legacy names in Mediatek mt2701-cs42448 Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 02/26] gpiolib: of: consolidate simple renames into a single quirk Sasha Levin
2022-12-24 1:29 ` Sasha Levin [this message]
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 04/26] gpiolib: of: add quirk for locating reset lines with legacy bindings Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 05/26] gpiolib: of: add a quirk for reset line for Marvell NFC controller Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 06/26] gpiolib: of: add a quirk for reset line for Cirrus CS42L56 codec Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 07/26] gpiolib: of: add a quirk for legacy names in MOXA ART RTC Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 08/26] kset: fix memory leak when kset_register() returns error Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 09/26] USB: core: Change configuration warnings to notices Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 10/26] usb: core: stop USB enumeration if too many retries Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 11/26] usb: gadget: aspeed: fix buffer overflow Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 12/26] usb: gadget: u_ether: Do not make UDC parent of the net device Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 13/26] usb: gadget: f_ecm: Always set current gadget in ecm_bind() Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 14/26] devres: Use kmalloc_size_roundup() to match ksize() usage Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 15/26] chardev: Fix potential memory leak when cdev_add() failed Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 16/26] usb/usbip: Fix v_recv_cmd_submit() to use PIPE_BULK define Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 17/26] char: xillybus: Prevent use-after-free due to race condition Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 18/26] habanalabs: zero ts registration buff when allocated Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 19/26] char: xillybus: Fix trivial bug with mutex Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 20/26] iio: filter: admv8818: close potential out-of-bounds read in __admv8818_read_[h|l]pf_freq() Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 21/26] xhci: disable U3 suspended ports in S4 hibernate poweroff_late stage Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 22/26] ACPICA: Fix operand resolution Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 23/26] ksmbd: Fix resource leak in smb2_lock() Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 24/26] writeback: Add asserts for adding freed inode to lists Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 25/26] exfat: fix overflow in sector and cluster conversion Sasha Levin
2022-12-24 1:29 ` [PATCH AUTOSEL 6.1 26/26] fbdev: smscufx: fix error handling code in ufx_usb_probe Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221224012930.392358-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=daniel.thompson@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox