Skip to content

Commit 37c669b

Browse files
committed
Merge tag 'gpio-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio
Pull GPIO fixes from Linus Walleij: "Here are a few GPIO fixes for v4.8. I was expecting some fallout from the new chardev rework but nothing like that turned up att all. Instead a Kconfig confusion that I think I have finally nailed, then some ordinary driver noise and trivia. This fixes a Kconfig issue with UM: when I made GPIOLIB available to all archs, that included UM, but the OF part of GPIOLIB requires HAS_IOMEM, so we add HAS_IOMEM as a dependency to OF_GPIO. This in turn exposed the fact that a few GPIO drivers were implicitly assuming OF_GPIO as their dependency but instead depended on OF alone (the typical problem being a pointer inside gpio_chip not existing unless OF_GPIO is selected) and then UM would fail to compile with these drivers instead. Then I lost patience and made any GPIO driver depending on just OF depend on OF_GPIO instead, that is certainly what they meant and the only thing that makes sense anyway. GPIO with just OF but !OF_GPIO does not make sense. Also a fix for the max730x driver data pointer, and a minor comment fix for the GPIO tools" * tag 'gpio-v4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: gpio: make any OF dependent driver depend on OF_GPIO gpio: Fix OF build problem on UM gpio: max730x: set gpiochip data pointer before using it tools/gpio: fix gpio-event-mon header comment
2 parents fa8410b + 048c28c commit 37c669b

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

drivers/gpio/Kconfig

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ config GPIO_DEVRES
5050
config OF_GPIO
5151
def_bool y
5252
depends on OF
53+
depends on HAS_IOMEM
5354

5455
config GPIO_ACPI
5556
def_bool y
@@ -188,7 +189,7 @@ config GPIO_EP93XX
188189
config GPIO_ETRAXFS
189190
bool "Axis ETRAX FS General I/O"
190191
depends on CRIS || COMPILE_TEST
191-
depends on OF
192+
depends on OF_GPIO
192193
select GPIO_GENERIC
193194
select GPIOLIB_IRQCHIP
194195
help
@@ -214,7 +215,7 @@ config GPIO_GENERIC_PLATFORM
214215

215216
config GPIO_GRGPIO
216217
tristate "Aeroflex Gaisler GRGPIO support"
217-
depends on OF
218+
depends on OF_GPIO
218219
select GPIO_GENERIC
219220
select IRQ_DOMAIN
220221
help
@@ -312,7 +313,7 @@ config GPIO_MPC8XXX
312313
config GPIO_MVEBU
313314
def_bool y
314315
depends on PLAT_ORION
315-
depends on OF
316+
depends on OF_GPIO
316317
select GENERIC_IRQ_CHIP
317318

318319
config GPIO_MXC
@@ -405,7 +406,7 @@ config GPIO_TEGRA
405406
bool "NVIDIA Tegra GPIO support"
406407
default ARCH_TEGRA
407408
depends on ARCH_TEGRA || COMPILE_TEST
408-
depends on OF
409+
depends on OF_GPIO
409410
help
410411
Say yes here to support GPIO pins on NVIDIA Tegra SoCs.
411412

@@ -1099,7 +1100,7 @@ menu "SPI GPIO expanders"
10991100

11001101
config GPIO_74X164
11011102
tristate "74x164 serial-in/parallel-out 8-bits shift register"
1102-
depends on OF
1103+
depends on OF_GPIO
11031104
help
11041105
Driver for 74x164 compatible serial-in/parallel-out 8-outputs
11051106
shift registers. This driver can be used to provide access

drivers/gpio/gpio-max730x.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,10 @@ int __max730x_probe(struct max7301 *ts)
192192
ts->chip.parent = dev;
193193
ts->chip.owner = THIS_MODULE;
194194

195+
ret = gpiochip_add_data(&ts->chip, ts);
196+
if (ret)
197+
goto exit_destroy;
198+
195199
/*
196200
* initialize pullups according to platform data and cache the
197201
* register values for later use.
@@ -213,10 +217,6 @@ int __max730x_probe(struct max7301 *ts)
213217
}
214218
}
215219

216-
ret = gpiochip_add_data(&ts->chip, ts);
217-
if (ret)
218-
goto exit_destroy;
219-
220220
return ret;
221221

222222
exit_destroy:

tools/gpio/gpio-event-mon.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* gpio-hammer - example swiss army knife to shake GPIO lines on a system
2+
* gpio-event-mon - monitor GPIO line events from userspace
33
*
44
* Copyright (C) 2016 Linus Walleij
55
*

0 commit comments

Comments
 (0)