aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-08-22 18:51:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-22 18:51:21 -0400
commit37c669b237499cc4b8279466a83bcafed1ca2829 (patch)
tree2ffee66285391d388e79260d26f4fb3e125e8a89
parentfa8410b355251fd30341662a40ac6b22d3e38468 (diff)
parent048c28c91e56781082bc17d181e460b81e7e8bcb (diff)
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
-rw-r--r--drivers/gpio/Kconfig11
-rw-r--r--drivers/gpio/gpio-max730x.c8
-rw-r--r--tools/gpio/gpio-event-mon.c2
3 files changed, 11 insertions, 10 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 98dd47a30fc7..66a94103798b 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -50,6 +50,7 @@ config GPIO_DEVRES
50config OF_GPIO 50config OF_GPIO
51 def_bool y 51 def_bool y
52 depends on OF 52 depends on OF
53 depends on HAS_IOMEM
53 54
54config GPIO_ACPI 55config GPIO_ACPI
55 def_bool y 56 def_bool y
@@ -188,7 +189,7 @@ config GPIO_EP93XX
188config GPIO_ETRAXFS 189config GPIO_ETRAXFS
189 bool "Axis ETRAX FS General I/O" 190 bool "Axis ETRAX FS General I/O"
190 depends on CRIS || COMPILE_TEST 191 depends on CRIS || COMPILE_TEST
191 depends on OF 192 depends on OF_GPIO
192 select GPIO_GENERIC 193 select GPIO_GENERIC
193 select GPIOLIB_IRQCHIP 194 select GPIOLIB_IRQCHIP
194 help 195 help
@@ -214,7 +215,7 @@ config GPIO_GENERIC_PLATFORM
214 215
215config GPIO_GRGPIO 216config GPIO_GRGPIO
216 tristate "Aeroflex Gaisler GRGPIO support" 217 tristate "Aeroflex Gaisler GRGPIO support"
217 depends on OF 218 depends on OF_GPIO
218 select GPIO_GENERIC 219 select GPIO_GENERIC
219 select IRQ_DOMAIN 220 select IRQ_DOMAIN
220 help 221 help
@@ -312,7 +313,7 @@ config GPIO_MPC8XXX
312config GPIO_MVEBU 313config GPIO_MVEBU
313 def_bool y 314 def_bool y
314 depends on PLAT_ORION 315 depends on PLAT_ORION
315 depends on OF 316 depends on OF_GPIO
316 select GENERIC_IRQ_CHIP 317 select GENERIC_IRQ_CHIP
317 318
318config GPIO_MXC 319config GPIO_MXC
@@ -405,7 +406,7 @@ config GPIO_TEGRA
405 bool "NVIDIA Tegra GPIO support" 406 bool "NVIDIA Tegra GPIO support"
406 default ARCH_TEGRA 407 default ARCH_TEGRA
407 depends on ARCH_TEGRA || COMPILE_TEST 408 depends on ARCH_TEGRA || COMPILE_TEST
408 depends on OF 409 depends on OF_GPIO
409 help 410 help
410 Say yes here to support GPIO pins on NVIDIA Tegra SoCs. 411 Say yes here to support GPIO pins on NVIDIA Tegra SoCs.
411 412
@@ -1099,7 +1100,7 @@ menu "SPI GPIO expanders"
1099 1100
1100config GPIO_74X164 1101config GPIO_74X164
1101 tristate "74x164 serial-in/parallel-out 8-bits shift register" 1102 tristate "74x164 serial-in/parallel-out 8-bits shift register"
1102 depends on OF 1103 depends on OF_GPIO
1103 help 1104 help
1104 Driver for 74x164 compatible serial-in/parallel-out 8-outputs 1105 Driver for 74x164 compatible serial-in/parallel-out 8-outputs
1105 shift registers. This driver can be used to provide access 1106 shift registers. This driver can be used to provide access
diff --git a/drivers/gpio/gpio-max730x.c b/drivers/gpio/gpio-max730x.c
index 08807368f007..946d09195598 100644
--- a/drivers/gpio/gpio-max730x.c
+++ b/drivers/gpio/gpio-max730x.c
@@ -192,6 +192,10 @@ int __max730x_probe(struct max7301 *ts)
192 ts->chip.parent = dev; 192 ts->chip.parent = dev;
193 ts->chip.owner = THIS_MODULE; 193 ts->chip.owner = THIS_MODULE;
194 194
195 ret = gpiochip_add_data(&ts->chip, ts);
196 if (ret)
197 goto exit_destroy;
198
195 /* 199 /*
196 * initialize pullups according to platform data and cache the 200 * initialize pullups according to platform data and cache the
197 * register values for later use. 201 * register values for later use.
@@ -213,10 +217,6 @@ int __max730x_probe(struct max7301 *ts)
213 } 217 }
214 } 218 }
215 219
216 ret = gpiochip_add_data(&ts->chip, ts);
217 if (ret)
218 goto exit_destroy;
219
220 return ret; 220 return ret;
221 221
222exit_destroy: 222exit_destroy:
diff --git a/tools/gpio/gpio-event-mon.c b/tools/gpio/gpio-event-mon.c
index 448ed96b3b4f..1c14c2595158 100644
--- a/tools/gpio/gpio-event-mon.c
+++ b/tools/gpio/gpio-event-mon.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * gpio-hammer - example swiss army knife to shake GPIO lines on a system 2 * gpio-event-mon - monitor GPIO line events from userspace
3 * 3 *
4 * Copyright (C) 2016 Linus Walleij 4 * Copyright (C) 2016 Linus Walleij
5 * 5 *