summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-11MIPS: do away with ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIBLinus Walleij
This replaces: - "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. - "select ARCH_WANT_OPTIONAL_GPIOLIB" with no dependency: GPIOLIB is now selectable by everyone, so we need not declare our intent to select it. When ordering the symbols the following rationale was used: if the selects were in alphabetical order, I moved select GPIOLIB to be in alphabetical order, but if the selects were not maintained in alphabetical order, I just replaced "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB". Cc: Michael Büsch <m@bues.ch> Cc: linux-mips@linux-mips.org Acked-by: Ralf Baechle <ralf@linux-mips.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11gpio: zevio: make it explicitly non-modularPaul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_ZEVIO drivers/gpio/Kconfig: bool "LSI ZEVIO SoC memory mapped GPIOs" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Fabian Vogt <fabian@ritter-vogt.de> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11gpio: timberdale: make it explicitly non-modularPaul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_TIMBERDALE drivers/gpio/Kconfig: bool "Support for timberdale GPIO IP" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11gpio: stmpe: make it explicitly non-modularPaul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_STMPE drivers/gpio/Kconfig: bool "STMPE GPIOs" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Curiously, this driver was using subsys_initcall since day one, so we don't have the "normal" module_init replacement in this change like we've done in other similar driver updates. We also delete the MODULE_LICENSE tag etc. since all that information is already contained at the top of the file in the comments. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: Rabin Vincent <rabin.vincent@stericsson.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11gpio: sodaville: make it explicitly non-modularPaul Gortmaker
The Kconfig currently controlling compilation of this code is: drivers/gpio/Kconfig:config GPIO_SODAVILLE drivers/gpio/Kconfig: bool "Intel Sodaville GPIO support" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_pci_driver() uses the same init level as the builtin_pci_driver() does, there is no init ordering change caused by this commit. We don't replace module.h with init.h since the file already has that. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Hans J. Koch <hjk@linutronix.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Alexandre Courbot <gnurou@gmail.com> Cc: linux-gpio@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11pinctrl: sh-pfc: Let gpio_chip.to_irq() return zero on errorGeert Uytterhoeven
Currrently the gpio_chip.to_irq() callback returns -ENOSYS on error, which causes bad interactions with the serial_mctrl_gpio helpers. mctrl_gpio_init() returns -ENOSYS if GPIOLIB is not enabled, which is intended to be ignored by its callers. However, ignoring -ENOSYS when it was caused by a gpiod_to_irq() failure will lead to a crash later: Unable to handle kernel paging request at virtual address ffffffde ... PC is at mctrl_gpio_set+0x14/0x78 Fix this by returning zero instead, like gpiochip_to_irq() does. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-11gpio: dwapb: Add ACPI device ID for DWAPB GPIO controller on X-Gene platformsDuc Dang
This patch enables DWAPB GPIO controller support on X-Gene platforms in ACPI boot mode. Signed-off-by: Duc Dang <dhdang@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-10gpio: dt-bindings: add wd,mbl-gpio bindingsChristian Lamparter
This patch adds the device tree bindings for the Western Digital's MyBook Live memory-mapped GPIO controllers. The gpios will be supported by gpio-mmio code of the GPIO generic library. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-10gpio: of: make it possible to name GPIO linesLinus Walleij
Make it possible to name the producer side of a GPIO line using a "gpio-line-names" property array, modeled on the "clock-output-names" property from the clock bindings. This naming is especially useful for: - Debugging: lines are named after function, not just opaque offset numbers. - Exploration: systems where some or all GPIO lines are available to end users, such as prototyping, one-off's "makerspace usecases" users are helped by the names of the GPIO lines when tinkering. This usecase has been surfacing recently. The gpio-line-names attribute is completely optional. Example output from lsgpio on a patched Snowball tree: GPIO chip: gpiochip6, "8000e180.gpio", 32 GPIO lines line 0: unnamed unused line 1: "AP_GPIO161" "extkb3" [kernel] line 2: "AP_GPIO162" "extkb4" [kernel] line 3: "ACCELEROMETER_INT1_RDY" unused [kernel] line 4: "ACCELEROMETER_INT2" unused line 5: "MAG_DRDY" unused [kernel] line 6: "GYRO_DRDY" unused [kernel] line 7: "RSTn_MLC" unused line 8: "RSTn_SLC" unused line 9: "GYRO_INT" unused line 10: "UART_WAKE" unused line 11: "GBF_RESET" unused line 12: unnamed unused Cc: Grant Likely <grant.likely@linaro.org> Cc: Amit Kucheria <amit.kucheria@linaro.org> Cc: David Mandala <david.mandala@linaro.org> Cc: Lee Campbell <leecam@google.com> Cc: devicetree@vger.kernel.org Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Michael Welling <mwelling@ieee.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-02gpio: make gpiod_to_irq() return negative for NO_IRQLinus Walleij
If a translation returns zero, that means NO_IRQ, so we should return an error since the function is documented to return a negative code on error. Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-01gpio: xgene: implement .get_direction()Linus Walleij
This implements the .get_direction() callback for the xgene GPIO controller. Cc: Duc Dang <dhdang@apm.com> Cc: Feng Kan <fkan@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-05-01gpio: xgene: Enable ACPI support for X-Gene GFC GPIO driverDuc Dang
This patch enables ACPI support for X-Gene GFC GPIO driver. Signed-off-by: Duc Dang <dhdang@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-30gpio: tegra: Implement gpio_get_direction callbackLaxman Dewangan
Implement gpio_get_direction() callback for Tegra GPIO. The direction is only valid if the pin is configured as GPIO. If pin is not configured in GPIO mode then this function return error. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-30gpio: set up initial state from .get_direction()Linus Walleij
If the gpiochip supports the .get_direction() callback, then the initial state of the descriptor flags should be set up as output accordingly. Also put in comments explaining what is going on. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: rename gpio-generic.c into gpio-mmio.cChristian Lamparter
This patch renames the gpio-generic.c into gpio-mmio.c. This is because currently the file only contains code for a memory-mapped GPIO driver. There isn't any support for ioports or other resource type. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: generic: fix GPIO_GENERIC_PLATFORM is set to module caseChristian Lamparter
GPIO_GENERIC_PLATFORM is a tristate. If the module option is selected the resulting gpio-generic.ko will lack most of the module initialzation and probe code. Signed-off-by: Christian Lamparter <chunkeey@googlemail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: dwapb: add gpio-signaled acpi event supportJiang Qiu
This patch adds gpio-signaled acpi event support. It is used for power button on hisilicon D02 board, an arm64 platform. The corresponding DSDT file is defined as follows: Device(GPI0) { Name(_HID, "HISI0181") Name(_ADR, 0) Name(_UID, 0) Name (_CRS, ResourceTemplate () { Memory32Fixed (ReadWrite, 0x802e0000, 0x10000) Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive,,,) {344} }) Device(PRTa) { Name (_DSD, Package () { Package () { Package () {"reg",0}, Package () {"snps,nr-gpios",32}, } }) } Name (_AEI, ResourceTemplate () { GpioInt(Edge, ActiveLow, ExclusiveAndWake, PullUp, , " \\_SB.GPI0") {8} }) Method (_E08, 0x0, NotSerialized) { Notify (\_SB.PWRB, 0x80) } } Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jiang Qiu <qiujiang@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: dwapb: convert device node to fwnodeJiang Qiu
This patch converts device node to fwnode for dwapb driver, so as to provide a unified fwnode for DT and ACPI bindings. Tested-by: Alan Tull <delicious.quinoa@gmail.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jiang Qiu <qiujiang@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: dwapb: remove name from dwapb_port_propertyJiang Qiu
This patch removed the name property from dwapb_port_property. The name property is redundant, since we can get this info from dwapb_gpio dev node. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Jiang Qiu <qiujiang@huawei.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio/qoriq: select IRQ_DOMAINArnd Bergmann
The gpio-mpc8xxx driver requires IRQ domains but can be built without them, resulting on a failure to build certain randconfigs on ARM: drivers/gpio/gpio-mpc8xxx.c: In function 'mpc8xxx_gpio_to_irq': drivers/gpio/gpio-mpc8xxx.c:92:10: error: implicit declaration of function 'irq_create_mapping' [-Werror=implicit-function-declaration] return irq_create_mapping(mpc8xxx_gc->irq, offset); This selects IRQ_DOMAIN from the driver to ensure we can build it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 5df7fd46b70b ("gpio/qoriq: Add qoriq platforms support") Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: tegra: Add support for gpio debounceLaxman Dewangan
NVIDIA's Tegra210 support the HW debounce in the GPIO controller for all its GPIO pins. Add support for setting debounce timing by implementing the set_debounce callback of gpiochip. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: tegra: Get rid of all file scoped global variablesLaxman Dewangan
Move the file scoped multiple global variable from Tegra GPIO driver to the structure and make this as gpiochip data which can be referred from GPIO chip callbacks. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: tegra: Make of_device_id compatible data to constantLaxman Dewangan
The data member of the of_device_id is the constant type and hence all static structure which is used for this initialisation as static. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Suggested-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-29gpio: tegra: Don't open code of_device_get_match_data()Laxman Dewangan
Use of_device_get_match_data() for getting matched data instead of implementing this locally. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-28gpio: pl061: implement .get_direction()Linus Walleij
Implement this callback so that the driver reports correctly the direction setting of each line. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-28gpio: pl061: remove range checkLinus Walleij
The gpiochip calls are already checking that the GPIO line offsets are in range. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-27gpio: clarify open drain/source docsLinus Walleij
Make the text clearer, remove reference to confusing "positive" and "negative" and elaborate a bit. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26gpio: omap: fix irq triggering in smart-idle wakeup modeGrygorii Strashko
Now GPIO IRQ loss is observed on dra7-evm after suspend/resume cycle in the following case: extcon_usb1(id_irq) -> pcf8575.gpio1 -> omapgpio6.gpio11 -> gic the extcon_usb1 is wake up source and it enables IRQ wake up for id_irq by calling enable/disable_irq_wake() during suspend/resume which, in turn, causes execution of omap_gpio_wake_enable(). And omap_gpio_wake_enable() will set/clear corresponding bit in GPIO_IRQWAKEN_x register. omapgpio6 configuration after boot - wakeup is enabled for GPIO IRQs by default from omap_gpio_irq_type: GPIO_IRQSTATUS_SET_0 | 0x00000400 GPIO_IRQSTATUS_CLR_0 | 0x00000400 GPIO_IRQWAKEN_0 | 0x00000400 GPIO_RISINGDETECT | 0x00000000 GPIO_FALLINGDETECT | 0x00000400 omapgpio6 configuration after after suspend/resume cycle: GPIO_IRQSTATUS_SET_0 | 0x00000400 GPIO_IRQSTATUS_CLR_0 | 0x00000400 GPIO_IRQWAKEN_0 | 0x00000000 <--- GPIO_RISINGDETECT | 0x00000000 GPIO_FALLINGDETECT | 0x00000400 As result, system will start to lose interrupts from pcf8575 GPIO expander, because when OMAP GPIO IP is in smart-idle wakeup mode, there is no guarantee that transition(s) on input non wake up GPIO pin will trigger asynchronous wake-up request to PRCM and then IRQ generation. IRQ will be generated when GPIO is in active mode - for example, some time after accessing GPIO bank registers IRQs will be generated normally, but issue will happen again once PRCM will put GPIO in low power smart-idle wakeup mode. Note 1. Issue is not reproduced if debounce clk is enabled for GPIO bank. Note 2. Issue hardly reproducible if GPIO pins group contains both wakeup/non-wakeup gpios - for example, it will be hard to reproduce issue with pin2 if GPIO_IRQWAKEN_0=0x1 GPIO_IRQSTATUS_SET_0=0x3 GPIO_FALLINGDETECT = 0x3 (TRM "Power Saving by Grouping the Edge/Level Detection"). Note 3. There nothing common bitween System wake up and OMAP GPIO bank IP wake up logic - the last one defines how the GPIO bank ON-IDLE-ON transition will happen inside SoC under control of PRCM. Hence, fix the problem by removing omap_set_gpio_wakeup() function completely and so keeping always in sync GPIO IRQ mask/unmask (IRQSTATUS_SET) and wake up enable (GPIO_IRQWAKEN) bits; and adding IRQCHIP_MASK_ON_SUSPEND flag in OMAP GPIO irqchip. That way non wakeup GPIO IRQs will be properly masked/unmask by IRQ PM core during suspend/resume cycle. Cc: Roger Quadros <rogerq@ti.com> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ASoC: ac97: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: alsa-devel@alsa-project.org Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ASoC: wm8996: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: alsa-devel@alsa-project.org Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ASoC: wm8962: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: alsa-devel@alsa-project.org Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ASoC: wm8903: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: alsa-devel@alsa-project.org Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ASoC: wm5100: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: alsa-devel@alsa-project.org Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ASoC: rt5677: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Bard Liao <bardliao@realtek.com> Cc: Oder Chiou <oder_chiou@realtek.com> Cc: Liam Girdwood <lgirdwood@gmail.com> Cc: alsa-devel@alsa-project.org Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26serial: sc16is7xx: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Jiri Slaby <jslaby@suse.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26serial: max310x: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Jiri Slaby <jslaby@suse.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26staging: vme: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Manohar Vanga <manohar.vanga@gmail.com> Cc: devel@driverdev.osuosl.org Acked-by: Martyn Welch <martyn@welchs.me.uk> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26ssb: gpio_driver: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Hauke Mehrtens <hauke@hauke-m.de> Cc: Michael Buesch <m@bues.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26platform: x86: intel-pmic: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Feng Tang <feng.tang@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26input: adp5588-keys: use gpiochip data pointerLinus Walleij
This makes the driver use the data pointer added to the gpio_chip to store a pointer to the state container instead of relying on container_of(). Cc: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26arc: select GPIOLIB directlyLinus Walleij
Instead of indirectly selecting GPIOLIB via the ARCH_REQUIRE_GPIOLIB symbol, just select GPIOLIB. Cc: Michael Büsch <m@bues.ch> Cc: linux-snps-arc@lists.infradead.org Acked-by: Vineet Gupta <vgupt@synopsys.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26sparc: remove ARCH_WANT_OPTIONAL_GPIOLIBLinus Walleij
This symbols is not needed to get access to selecting the GPIOLIB anymore: any arch can select GPIOLIB. Cc: Michael Büsch <m@bues.ch> Cc: sparclinux@vger.kernel.org Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26cris: do away with ARCH_REQUIRE_GPIOLIBLinus Walleij
Replace "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. Cc: Michael Büsch <m@bues.ch> Cc: Mikael Starvik <starvik@axis.com> Cc: linux-cris-kernel@axis.com Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26nios2: remove ARCH_WANT_OPTIONAL_GPIOLIBLinus Walleij
This symbols is not needed to get access to selecting the GPIOLIB anymore: any arch can select GPIOLIB. Cc: Michael Büsch <m@bues.ch> Cc: nios2-dev@lists.rocketboards.org Acked-by: Ley Foon Tan <lftan@altera.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26m68k: do away with ARCH_REQUIRE_GPIOLIBLinus Walleij
Replace "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. Cc: Michael Büsch <m@bues.ch> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: linux-m68k@lists.linux-m68k.org Acked-by: Greg Ungerer <gerg@linux-m68k.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26xtensa: remove ARCH_WANT_OPTIONAL_GPIOLIBLinus Walleij
This symbols is not needed to get access to selecting the GPIOLIB anymore: any arch can select GPIOLIB. Cc: Michael Büsch <m@bues.ch> Cc: Chris Zankel <chris@zankel.net> Cc: linux-xtensa@linux-xtensa.org Acked-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26alpha: remove ARCH_WANT_OPTIONAL_GPIOLIBLinus Walleij
This symbols is not needed to get access to selecting the GPIOLIB anymore: any arch can select GPIOLIB. Cc: Michael Büsch <m@bues.ch> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: linux-alpha@vger.kernel.org Acked-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26metag: remove ARCH_WANT_OPTIONAL_GPIOLIBLinus Walleij
This symbols is not needed to get access to selecting the GPIOLIB anymore: any arch can select GPIOLIB. Cc: Michael Büsch <m@bues.ch> Cc: linux-metag@vger.kernel.org Acked-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26avr32: do away with ARCH_REQUIRE_GPIOLIBLinus Walleij
Replace "select ARCH_REQUIRE_GPIOLIB" with "select GPIOLIB" as this can now be selected directly. Cc: Michael Büsch <m@bues.ch> Cc: Haavard Skinnemoen <hskinnemoen@gmail.com> Acked-by: Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-04-26gpio: remove deps on ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIBLinus Walleij
The GPIOLIB symbol currently require that ARCH_WANT_OPTIONAL_GPIOLIB or ARCH_REQUIRE_GPIOLIB is selected to be selectable. The ARCH_REQUIRE_GPIOLIB does only one thing: select GPIOLIB. This is just confusing: architectures that want GPIOLIB should be able to configure it in no matter what, and those who require it should just select GPIOLIB. It also creates problems for drivers that need to state "select GPIOLIB" to get dependencies: those depend on the selected architecture to select ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB first, and will cause compile errors for the few archs that state neither. These intermediary symbols need to go. As a first step, remove the dependencies so that: - ARCH_WANT_OPTIONAL_GPIOLIB becomes a noop (GPIOLIB will be available for everyone) and - "select ARCH_REQUIRE_GPIOLIB" can be replaced by just "select GPIOLIB" After this patch we can follow up with patches cleaning up the architectures one-by one and eventually remove the ARCH_[WANT_OPTIONAL|REQUIRE]_GPIOLIB symbols altogether. Reported-by: Michael Hennerich <michael.hennerich@analog.com> Cc: Michael Büsch <m@bues.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>