- May 11, 2016
-
-
Paul Gortmaker authored
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>
-
Paul Gortmaker authored
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>
-
Geert Uytterhoeven authored
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>
-
Duc Dang authored
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>
-
- May 10, 2016
-
-
Christian Lamparter authored
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>
-
Linus Walleij authored
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>
-
- May 02, 2016
-
-
Linus Walleij authored
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>
-
- May 01, 2016
-
-
Linus Walleij authored
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>
-
Duc Dang authored
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>
-
- Apr 30, 2016
-
-
Laxman Dewangan authored
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>
-
Linus Walleij authored
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>
-
- Apr 29, 2016
-
-
Christian Lamparter authored
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>
-
Christian Lamparter authored
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>
-
Jiang Qiu authored
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>
-
Jiang Qiu authored
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>
-
Jiang Qiu authored
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>
-
Arnd Bergmann authored
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: 5df7fd46 ("gpio/qoriq: Add qoriq platforms support") Signed-off-by:
Linus Walleij <linus.walleij@linaro.org>
-
Laxman Dewangan authored
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>
-
Laxman Dewangan authored
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>
-
Laxman Dewangan authored
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>
-
Laxman Dewangan authored
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>
-
- Apr 28, 2016
-
-
Linus Walleij authored
Implement this callback so that the driver reports correctly the direction setting of each line. Signed-off-by:Linus Walleij <linus.walleij@linaro.org>
-
Linus Walleij authored
The gpiochip calls are already checking that the GPIO line offsets are in range. Signed-off-by:Linus Walleij <linus.walleij@linaro.org>
-
- Apr 27, 2016
-
-
Linus Walleij authored
Make the text clearer, remove reference to confusing "positive" and "negative" and elaborate a bit. Signed-off-by:Linus Walleij <linus.walleij@linaro.org>
-
- Apr 26, 2016
-
-
Grygorii Strashko authored
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_FALLINGDETEC...
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-
Linus Walleij authored
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>
-