From: Arnd Bergmann <arnd@arndb.de>
The MIPS bcm53xx platform still uses the legacy gpiolib interfaces based
on gpio numbers, but other platforms do not.
Hide these interfaces inside of the existing #ifdef block and use the
modern interfaces in the common parts of the driver to allow building
it when the gpio_set_value() is left out of the kernel.
Reviewed-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Reviewed-by: Bartosz Golaszewski <redacted>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/net/dsa/b53/b53_common.c | 17 +++++------------
drivers/net/dsa/b53/b53_priv.h | 25 +++++++++++++++++++------
2 files changed, 24 insertions(+), 18 deletions(-)
From: Arnd Bergmann <arnd@arndb.de>
Most users of gpio-keys and gpio-keys-polled use modern gpiolib
interfaces, but there are still number of ancient sh, arm32 and x86
machines that have never been converted.
Add an #ifdef block for the parts of the driver that are only used on
those legacy machines.
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v3: resend
v2: skip the fake GPIO number passing from mfd
The removal of the arm platforms using this is not yet going to happen
for 7.2, and Dmitry's changes for the Rohm drivers have not yet
made it into linux-next as of 2026-05-20, so for the moment I
would still like to see this patch get merged, even if we are
closing in on completely removing the legacy gpio support in
the gpio_keys driver, so we can make CONFIG_GPIOLIB_LEGACY
default-disabled sooner.
---
drivers/input/keyboard/gpio_keys.c | 7 ++++---
drivers/input/keyboard/gpio_keys_polled.c | 2 ++
drivers/mfd/rohm-bd71828.c | 1 -
drivers/mfd/rohm-bd718x7.c | 1 -
include/linux/gpio_keys.h | 2 ++
5 files changed, 8 insertions(+), 5 deletions(-)
@@ -528,7 +528,8 @@ static int gpio_keys_setup_key(struct platform_device *pdev,*/bdata->gpiod=NULL;}-}elseif(gpio_is_valid(button->gpio)){+#ifdef CONFIG_GPIOLIB_LEGACY+}elseif(!button->irq&&gpio_is_valid(button->gpio)){/**LegacyGPIOnumber,sorequesttheGPIOhereand*convertittodescriptor.
@@ -546,6 +547,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev,if(button->active_low^gpiod_is_active_low(bdata->gpiod))gpiod_toggle_active_low(bdata->gpiod);+#endif}if(bdata->gpiod){
@@ -583,8 +585,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev,if(irq<0){error=irq;dev_err_probe(dev,error,-"Unable to get irq number for GPIO %d\n",-button->gpio);+"Unable to get irq number for GPIO\n");returnerror;}bdata->irq=irq;
@@ -301,6 +301,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)returndev_err_probe(dev,PTR_ERR(bdata->gpiod),"failed to get gpio\n");}+#ifdef CONFIG_GPIOLIB_LEGACY}elseif(gpio_is_valid(button->gpio)){/**LegacyGPIOnumbersorequesttheGPIOhereand
@@ -323,6 +324,7 @@ static int gpio_keys_polled_probe(struct platform_device *pdev)if(button->active_low^gpiod_is_active_low(bdata->gpiod))gpiod_toggle_active_low(bdata->gpiod);+#endif}bdata->last_state=-1;
From: Arnd Bergmann <arnd@arndb.de>
The OLPC GPIO controller sets up a fixed number space that is used
by at least two drivers:
arch/x86/platform/olpc/olpc-xo1-sci.c: In function 'setup_ec_sci':
arch/x86/platform/olpc/olpc-xo1-sci.c:358:13: error: implicit declaration of function 'gpio_request' [-Wimplicit-function-declaration]
358 | r = gpio_request(OLPC_GPIO_ECSCI, "OLPC-ECSCI");
| ^~~~~~~~~~~~
sound/pci/cs5535audio/cs5535audio_olpc.c: In function 'olpc_analog_input':
sound/pci/cs5535audio/cs5535audio_olpc.c:41:9: error: implicit declaration of function 'gpio_set_value'; did you mean 'gpiod_set_value'? [-Wimplicit-function-declaration]
41 | gpio_set_value(OLPC_GPIO_MIC_AC, on);
The AMD Geode platform that this is based on is now marked as
'Orphaned' in Kconfig, and it is likely that there are no XO1
users on modern kernels, but so far there is no consensus on
removing it entirely.
Select CONFIG_GPIOLIB_LEGACY for this platform and make sure the
sound driver portion cannot be compiled without this.
Acked-by: Borislav Petkov (AMD) <bp@alien8.de>
Acked-by: Takashi Iwai <redacted>
Reviewed-by: Bartosz Golaszewski <redacted>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: update changelog text
---
arch/x86/Kconfig | 1 +
sound/pci/Kconfig | 1 +
2 files changed, 2 insertions(+)
From: Arnd Bergmann <arnd@arndb.de>
Many board files on sh reference the legacy gpiolib interfaces that
are becoming optional. To ensure the boards can keep building, select
CONFIG_GPIOLIB_LEGACY on each of the boards that have one of the
hardcoded calls.
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: no changes. Adrian said he'll pick it up for 7.2, but so
far the patch is not in linux-next yet, so I'm including it
for completeness here.
---
arch/sh/Kconfig | 1 +
arch/sh/boards/Kconfig | 8 ++++++++
arch/sh/boards/mach-highlander/Kconfig | 1 +
arch/sh/boards/mach-rsk/Kconfig | 3 +++
4 files changed, 13 insertions(+)
From: Arnd Bergmann <arnd@arndb.de>
A few old machines have not been converted away from the old-style
gpiolib interfaces. Make these select the new CONFIG_GPIOLIB_LEGACY
symbol so the code still works where it is needed but can be left
out otherwise.
This is the list of all gpio_request() calls in mips:
arch/mips/alchemy/devboards/db1000.c: gpio_request(19, "sd0_cd");
arch/mips/alchemy/devboards/db1000.c: gpio_request(20, "sd1_cd");
arch/mips/alchemy/devboards/db1200.c: gpio_request(215, "otg-vbus");
arch/mips/bcm47xx/workarounds.c: err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
arch/mips/bcm63xx/boards/board_bcm963xx.c: gpio_request_one(board.ephy_reset_gpio,
arch/mips/txx9/rbtx4927/setup.c: gpio_request(15, "sio-dtr");
Most of these should be easy enough to change to modern gpio descriptors
or remove if they are no longer in use.
Reviewed-by: Bartosz Golaszewski <redacted>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: no changes. There was no discussion on this, but the patch
has so far not made it into the linux-mips tree, so I'm including
it for completeness.
---
arch/mips/Kconfig | 5 +++++
arch/mips/alchemy/Kconfig | 1 -
arch/mips/txx9/Kconfig | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
From: Arnd Bergmann <arnd@arndb.de>
There are still a handful of ancient mips/armv5/sh boards that use the
gpio_led:gpio member to pass an old-style gpio number, but all modern
users have been converted to gpio descriptors.
While the CONFIG_GPIOLIB_LEGACY option that guards devm_gpio_request_one()
and related helpers is currently turned on in all kernel builds,
the plan is to only enable it on the few platforms that actually
pass gpio numbers in any platform_data.
Split out the legacy portion of the platform_data handling into a custom
helper function that is guarded with in #ifdef block, to allow the
the leds-gpio driver to compile cleanly when CONFIG_GPIOLIB_LEGACY
gets turned off. Once the last user is converted, this function can
be removed.
Link: https://lore.kernel.org/all/e9252384-a55c-4a91-9c61-06e05a0b2ce4@app.fastmail.com/
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Bartosz Golaszewski <redacted>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v4: whitespace changes only
v3: simplify gpio_led_get_gpiod
v2: rework a little bit to keep the legacy code path more separate,
extend changelog description
Related to this, we may also want to remove support for passing
a gpio descriptor in the ->gpiod flag. The only user doing this
at the moment was introduced in commit 1892e87a3e91 ("powerpc/warp:
switch to using gpiod API").
---
drivers/leds/leds-gpio.c | 51 ++++++++++++++++++++++++++--------------
include/linux/leds.h | 2 ++
2 files changed, 36 insertions(+), 17 deletions(-)
From: Arnd Bergmann <arnd@arndb.de>
The SPI version of Prism54 was sold under a couple of different
names and supported by the Linux p54spi driver, but there was
never a DT binding for it.
Document the four known names of this device and the properties
that are sufficient for its use on the Nokia N8x0 tablet.
As I don't have this hardware or documentation for it, this is
purely based on existing usage in the driver.
Link: https://lore.kernel.org/all/e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com/
Acked-by: Christian Lamparter <redacted>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v6: no changes
v5: fix name in MAINTAINERS file
v4: renamed file to st,stlc4560, matching the primary compatible string
require st,stlc4560 string
---
.../bindings/net/wireless/st,stlc4560.yaml | 61 +++++++++++++++++++
MAINTAINERS | 1 +
2 files changed, 62 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/wireless/st,stlc4560.yaml
From: Arnd Bergmann <arnd@arndb.de>
The Prism54 SPI driver hardcodes GPIO numbers and expects users to
pass them as module parameters, apparently a relic from its life as a
staging driver. This works because there is only one user, the Nokia
N8x0 tablet.
Convert this to the gpio descriptor interface and DT based probing
to improve this and simplify the code at the same time.
Acked-by: Christian Lamparter <redacted>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Reviewed-by: Bartosz Golaszewski <redacted>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v6:
- no changes. Sashiko comments about incorrect on-stack SPI transfers
and error handling in the IRQ registration turned out to be
irrelevant for this submission.
v5:
- fix irq assignment # https://sashiko.dev/#/patchset/20260430081242.3686993-1-arnd%40kernel.org
v4:
- make gpio line optional again
- fix EPROBE_DEFER handling
- match only st,stlc4560 compatible value, with binding change
v3:
- rebase an older patch
---
arch/arm/mach-omap2/board-n8x0.c | 18 ------
drivers/net/wireless/intersil/p54/p54spi.c | 67 ++++++++--------------
drivers/net/wireless/intersil/p54/p54spi.h | 3 +
3 files changed, 26 insertions(+), 62 deletions(-)
@@ -30,19 +31,6 @@MODULE_FIRMWARE("3826.arm");MODULE_FIRMWARE("3826.eeprom");-/* gpios should be handled in board files and provided via platform data,-*butbecauseit'scurrentlyimpossibleforp54spitohaveaheaderfile-*ininclude/linux,let'susemoduleparametersfornow-*/--staticintp54spi_gpio_power=97;-module_param(p54spi_gpio_power,int,0444);-MODULE_PARM_DESC(p54spi_gpio_power,"gpio number for power line");--staticintp54spi_gpio_irq=87;-module_param(p54spi_gpio_irq,int,0444);-MODULE_PARM_DESC(p54spi_gpio_irq,"gpio number for irq line");-staticvoidp54spi_spi_read(structp54s_priv*priv,u8address,void*buf,size_tlen){
@@ -262,14 +250,14 @@ static int p54spi_upload_firmware(struct ieee80211_hw *dev)staticvoidp54spi_power_off(structp54s_priv*priv){-disable_irq(gpio_to_irq(p54spi_gpio_irq));-gpio_set_value(p54spi_gpio_power,0);+disable_irq(priv->irq);+gpiod_set_value(priv->gpio_powerdown,1);}staticvoidp54spi_power_on(structp54s_priv*priv){-gpio_set_value(p54spi_gpio_power,1);-enable_irq(gpio_to_irq(p54spi_gpio_irq));+gpiod_set_value(priv->gpio_powerdown,0);+enable_irq(priv->irq);/* need to wait a while before device can be accessed, the length*isjustaguess
From: Arnd Bergmann <arnd@arndb.de>
All users of the legacy interface now select CONFIG_GPIOLIB_LEGACY,
so it can be turned off by default and only get built on platforms
that still have one unconverted driver.
Allow turning it on manually for compile testing, in order to keep
the build coverage of the legacy drivers in allmodconfig and
randconfig.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/gpio/Kconfig | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
This patch depends on patches 1 through 9 to be applied first.
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Date: 2026-05-21 06:49:14
Hi Arnd,
On Wed, 2026-05-20 at 20:38 +0200, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>
Many board files on sh reference the legacy gpiolib interfaces that
are becoming optional. To ensure the boards can keep building, select
CONFIG_GPIOLIB_LEGACY on each of the boards that have one of the
hardcoded calls.
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: no changes. Adrian said he'll pick it up for 7.2, but so
far the patch is not in linux-next yet, so I'm including it
for completeness here.
Sorry, I hadn't gotten around to pick the changes for v7.2 yet. I can
pick it up this weekend as I was planning to review and merge some
patches this weekend.
I have received quite a lot of patches for SH recently, so it will take
some time to dig myself through the queue.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
On Wed, 20 May 2026 20:38:07 +0200, Arnd Bergmann [off-list ref] said:
From: Arnd Bergmann <arnd@arndb.de>
Most users of gpio-keys and gpio-keys-polled use modern gpiolib
interfaces, but there are still number of ancient sh, arm32 and x86
machines that have never been converted.
Add an #ifdef block for the parts of the driver that are only used on
those legacy machines.
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
On Wed, 20 May 2026 20:38:12 +0200, Arnd Bergmann [off-list ref] said:
From: Arnd Bergmann <arnd@arndb.de>
The SPI version of Prism54 was sold under a couple of different
names and supported by the Linux p54spi driver, but there was
never a DT binding for it.
Document the four known names of this device and the properties
that are sufficient for its use on the Nokia N8x0 tablet.
As I don't have this hardware or documentation for it, this is
purely based on existing usage in the driver.
Link: https://lore.kernel.org/all/e8dc9acb-6f85-e0a9-a145-d101ca6da201@gmail.com/
Acked-by: Christian Lamparter <redacted>
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
From: Matti Vaittinen <mazziesaccount@gmail.com> Date: 2026-05-22 04:55:25
On 20/05/2026 21:38, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>
Most users of gpio-keys and gpio-keys-polled use modern gpiolib
interfaces, but there are still number of ancient sh, arm32 and x86
machines that have never been converted.
Add an #ifdef block for the parts of the driver that are only used on
those legacy machines.
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v3: resend
v2: skip the fake GPIO number passing from mfd
The removal of the arm platforms using this is not yet going to happen
for 7.2, and Dmitry's changes for the Rohm drivers have not yet
made it into linux-next as of 2026-05-20, so for the moment I
would still like to see this patch get merged, even if we are
closing in on completely removing the legacy gpio support in
the gpio_keys driver, so we can make CONFIG_GPIOLIB_LEGACY
default-disabled sooner.
I am (still) all fine with this, even though I like Dmitry's set. I
suppose you already have a plan for merging this, but I still have to
ask - why the MFD changes aren't in own patch? I feel it would have
simplified merging, backporting, reviewing and reverting if needed.
Well, other than that:
Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com>
Yours,
-- Matti
---
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
On Fri, May 22, 2026, at 06:55, Matti Vaittinen wrote:
On 20/05/2026 21:38, Arnd Bergmann wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
I am (still) all fine with this, even though I like Dmitry's set. I
suppose you already have a plan for merging this, but I still have to
ask - why the MFD changes aren't in own patch? I feel it would have
simplified merging, backporting, reviewing and reverting if needed.
Splitting it out would break bisection: The gpio-leds change without
the mfd change causes a build failure when assigning the .gpio
field, and the reverse causes a runtime failure when .gpio=0 is
a valid line.
It would be possible to only do the gpio-led driver patch without
the header file change first. This would let us apply the last
patch in the series without regression, but it would risk having
not catching other drivers that incorrectly set the .gpio field
while CONFIG_GPIOLIB_LEGACY is disabled.
Arnd
From: Matti Vaittinen <mazziesaccount@gmail.com> Date: 2026-05-22 12:45:29
On 22/05/2026 11:28, Arnd Bergmann wrote:
On Fri, May 22, 2026, at 06:55, Matti Vaittinen wrote:
quoted
On 20/05/2026 21:38, Arnd Bergmann wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
I am (still) all fine with this, even though I like Dmitry's set. I
suppose you already have a plan for merging this, but I still have to
ask - why the MFD changes aren't in own patch? I feel it would have
simplified merging, backporting, reviewing and reverting if needed.
Splitting it out would break bisection: The gpio-leds change without
the mfd change causes a build failure when assigning the .gpio
field, and the reverse causes a runtime failure when .gpio=0 is
a valid line.
Ah, yes. Thanks for explanation. (I feel a bit [a lot] stupid, as I
somehow missed the problem of .gpio = 0 being valid. That even though I
had it explicitly set to -1 myself :rolleyes: ).
No further questions ;)
Yours,
-- Matti
--
---
Matti Vaittinen
Linux kernel developer at ROHM Semiconductors
Oulu Finland
~~ When things go utterly wrong vim users can always type :help! ~~
On Wed, May 20, 2026 at 8:38 PM Arnd Bergmann [off-list ref] wrote:
From: Arnd Bergmann <arnd@arndb.de>
Most users of gpio-keys and gpio-keys-polled use modern gpiolib
interfaces, but there are still number of ancient sh, arm32 and x86
machines that have never been converted.
Add an #ifdef block for the parts of the driver that are only used on
those legacy machines.
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
On Mon, May 25, 2026 at 10:57:44AM +0200, Linus Walleij wrote:
On Wed, May 20, 2026 at 8:38 PM Arnd Bergmann [off-list ref] wrote:
quoted
From: Arnd Bergmann <arnd@arndb.de>
Most users of gpio-keys and gpio-keys-polled use modern gpiolib
interfaces, but there are still number of ancient sh, arm32 and x86
machines that have never been converted.
Add an #ifdef block for the parts of the driver that are only used on
those legacy machines.
The two Rohm PMIC drivers use a gpio-keys device without an actual GPIO,
passing an IRQ number instead. In order to keep this working both with
and with CONFIG_GPIOLIB_LEGACY, change the gpio-keys driver to ignore
the gpio number if an IRQ is passed.
Link: https://lore.kernel.org/all/b3c94552-c104-42e3-be15-7e8362e8039e@gmail.com/
Link: https://lore.kernel.org/all/afJXG4_rtaj3l2Dk@google.com/
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Linus Walleij <linusw@kernel.org>
OK, if Lee Acks MFD changes I can pick this up.
Thanks.
--
Dmitry
From: Kevin Hilman <khilman@baylibre.com> Date: 2026-06-09 22:26:11
On Wed, 20 May 2026 20:38:05 +0200, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>
This is an update of all the patches that are still required before
we can actually turn off CONFIG_GPIOLIB_LEGACY for most platforms
in the final patch of this series.
I originally posted this as a series in
https://lore.kernel.org/all/20250808151822.536879-1-arnd@kernel.org/
[...]
Applied, thanks!
[09/10] ARM: dts: omap2: add stlc4560 spi-wireless node
commit: c5a0ac76b364bbd1d4fb7e440edabcd2a369343c
Best regards,
--
Kevin Hilman (TI) [off-list ref]
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de> Date: 2026-06-15 10:35:42
On Wed, May 20, 2026 at 08:38:10PM +0200, Arnd Bergmann wrote:
From: Arnd Bergmann <arnd@arndb.de>
A few old machines have not been converted away from the old-style
gpiolib interfaces. Make these select the new CONFIG_GPIOLIB_LEGACY
symbol so the code still works where it is needed but can be left
out otherwise.
This is the list of all gpio_request() calls in mips:
arch/mips/alchemy/devboards/db1000.c: gpio_request(19, "sd0_cd");
arch/mips/alchemy/devboards/db1000.c: gpio_request(20, "sd1_cd");
arch/mips/alchemy/devboards/db1200.c: gpio_request(215, "otg-vbus");
arch/mips/bcm47xx/workarounds.c: err = gpio_request_one(usb_power, GPIOF_OUT_INIT_HIGH, "usb_power");
arch/mips/bcm63xx/boards/board_bcm963xx.c: gpio_request_one(board.ephy_reset_gpio,
arch/mips/txx9/rbtx4927/setup.c: gpio_request(15, "sio-dtr");
Most of these should be easy enough to change to modern gpio descriptors
or remove if they are no longer in use.
Reviewed-by: Bartosz Golaszewski <redacted>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
v2: no changes. There was no discussion on this, but the patch
has so far not made it into the linux-mips tree, so I'm including
it for completeness.
---
arch/mips/Kconfig | 5 +++++
arch/mips/alchemy/Kconfig | 1 -
arch/mips/txx9/Kconfig | 1 +
3 files changed, 6 insertions(+), 1 deletion(-)
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]