summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'gpio-v4.17-1' of ↵Linus Torvalds2018-04-0546-959/+2300
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio Pull GPIO updates from Linus Walleij: "This is the bulk of GPIO changes for the v4.17 kernel cycle: New drivers: - Nintendo Wii GameCube GPIO, known as "Hollywood" - Raspberry Pi mailbox service GPIO expander - Spreadtrum main SC9860 SoC and IEC GPIO controllers. Improvements: - Implemented .get_multiple() callback for most of the high-performance industrial GPIO cards for the ISA bus. - ISA GPIO drivers now select the ISA_BUS_API instead of depending on it. This is merged with the same pattern for all the ISA drivers and some other Kconfig cleanups related to this. Cleanup: - Delete the TZ1090 GPIO drivers following the deletion of this SoC from the ARM tree. - Move the documentation over to driver-api to conform with the rest of the kernel documentation build. - Continue to make the GPIO drivers include only <linux/gpio/driver.h> and not the too broad <linux/gpio.h> that we want to get rid of. - Managed to remove VLA allocation from two drivers pending more fixes in this area for the next merge window. - Misc janitorial fixes" * tag 'gpio-v4.17-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio: (77 commits) gpio: Add Spreadtrum PMIC EIC driver support gpio: Add Spreadtrum EIC driver support dt-bindings: gpio: Add Spreadtrum EIC controller documentation gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe() pinctrl: qcom: Don't allow protected pins to be requested gpiolib: Support 'gpio-reserved-ranges' property gpiolib: Change bitmap allocation to kmalloc_array gpiolib: Extract mask allocation into subroutine dt-bindings: gpio: Add a gpio-reserved-ranges property gpio: mockup: fix a potential crash when creating debugfs entries gpio: pca953x: add compatibility for pcal6524 and pcal9555a gpio: dwapb: Add support for a bus clock gpio: Remove VLA from xra1403 driver gpio: Remove VLA from MAX3191X driver gpio: ws16c48: Implement get_multiple callback gpio: gpio-mm: Implement get_multiple callback gpio: 104-idi-48: Implement get_multiple callback gpio: 104-dio-48e: Implement get_multiple callback gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacks gpio: pci-idio-16: Implement get_multiple callback ...
| * gpio: Add Spreadtrum PMIC EIC driver supportBaolin Wang2018-03-273-0/+339
| | | | | | | | | | | | | | | | | | | | | | The Spreadtrum PMIC EIC controller contains only one bank of debounce EIC, and this bank contains 16 EICs. Each EIC can only be used as input mode, as well as supporting the debounce and the capability to trigger interrupts when detecting input signals. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * gpio: Add Spreadtrum EIC driver supportBaolin Wang2018-03-273-0/+615
| | | | | | | | | | | | | | | | | | | | | | | | | | The Spreadtrum digital-chip EIC controller has 4 sub-modules: debounce EIC, latch EIC, async EIC and sync EIC, and each sub-module can has multiple banks and each bank contains 8 EICs. Each EIC can only be used as input mode, and has the capability to trigger interrupts when detecting input signals. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * gpio: ath79: Fix potential NULL dereference in ath79_gpio_probe()Wei Yongjun2018-03-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | platform_get_resource() may return NULL, add proper check to avoid potential NULL dereferencing. This is detected by Coccinelle semantic patch. @@ expression pdev, res, n, t, e, e1, e2; @@ res = platform_get_resource(pdev, t, n); + if (!res) + return -EINVAL; ... when != res == NULL e = devm_ioremap(e1, res->start, e2); Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> [albeu@free.fr: Fixed patch to apply on current tree] Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * Merge branch 'gpio-reserved-ranges' into develLinus Walleij2018-03-272-5/+85
| |\
| | * gpiolib: Support 'gpio-reserved-ranges' propertyStephen Boyd2018-03-272-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some qcom platforms make some GPIOs or pins unavailable for use by non-secure operating systems, and thus reading or writing the registers for those pins will cause access control issues. Add support for a DT property to describe the set of GPIOs that are available for use so that higher level OSes are able to know what pins to avoid reading/writing. Non-DT platforms can add support by directly updating the chip->valid_mask. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Timur Tabi <timur@codeaurora.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| | * gpiolib: Change bitmap allocation to kmalloc_arrayStephen Boyd2018-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to clear out these bits when we set them immediately after. Use kmalloc_array() to skip clearing the bits. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Timur Tabi <timur@codeaurora.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| | * gpiolib: Extract mask allocation into subroutineStephen Boyd2018-03-271-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're going to use similar code to allocate and set all the bits in a mask for valid gpios to use. Extract the code from the irqchip version so it can be reused. Signed-off-by: Stephen Boyd <swboyd@chromium.org> Tested-by: Timur Tabi <timur@codeaurora.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: mockup: fix a potential crash when creating debugfs entriesBartosz Golaszewski2018-03-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we failed to create the top debugfs directory, we must not try to create the child nodes. We currently only check if gpio_mockup_dbg_dir is not NULL, but it can also contain an errno if debugfs is disabled in build options. Use IS_ERR_OR_NULL() instead. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: pca953x: add compatibility for pcal6524 and pcal9555aH. Nikolaus Schaller2018-03-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Pyra-Handheld originally used the tca6424 but recently we have replaced it by the pin and package compatible pcal6524. So let's add this to the bindings and the driver. And while we are at it, the pcal9555a does not have a compatible entry either but is already supported by the device id table. Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: dwapb: Add support for a bus clockPhil Edworthy2018-03-271-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | Enable an optional bus clock provided by DT. Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: Remove VLA from xra1403 driverLaura Abbott2018-03-271-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Nandor Han <nandor.han@ge.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: Remove VLA from MAX3191X driverLaura Abbott2018-03-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new challenge is to remove VLAs from the kernel (see https://lkml.org/lkml/2018/3/7/621) This patch replaces several a VLA with an appropriate call to kmalloc_array. Signed-off-by: Laura Abbott <labbott@redhat.com> Reviewed-and-tested-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: ws16c48: Implement get_multiple callbackWilliam Breathitt Gray2018-03-261-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WinSystems WS16C48 device provides 48 lines of digital I/O accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read, the WS16C48 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the ws16c48_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: gpio-mm: Implement get_multiple callbackWilliam Breathitt Gray2018-03-261-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Diamond Systems GPIO-MM series of devices contain two 82C55A devices, which each feature three 8-bit ports of I/O. Since eight input lines are acquired on a single port input read, the GPIO-MM GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the gpiomm_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: 104-idi-48: Implement get_multiple callbackWilliam Breathitt Gray2018-03-261-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACCES I/O 104-IDI-48 series of devices provides 48 optically-isolated inputs accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read, the 104-IDI-48 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idi_48_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: 104-dio-48e: Implement get_multiple callbackWilliam Breathitt Gray2018-03-261-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACCES I/O 104-DIO-48E series of devices contain two Programmable Peripheral Interface (PPI) chips of type 82C55, which each feature three 8-bit ports of I/O. Since eight input lines are acquired on a single port input read, the 104-DIO-48E GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the dio48e_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: pcie-idio-24: Implement get_multiple/set_multiple callbacksWilliam Breathitt Gray2018-03-261-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACCES I/O PCIe-IDIO-24 series of devices provides 24 optically-isolated digital I/O accessed via six 8-bit ports. Since eight input lines are acquired on a single port input read -- and similarly eight output lines are set on a single port output write -- the PCIe-IDIO-24 GPIO driver may improve multiple I/O reads/writes by utilizing a get_multiple/set_multiple callbacks. This patch implements the idio_24_gpio_get_multiple function which serves as the respective get_multiple callback, and implements the idio_24_gpio_set_multiple function which serves as the respective set_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: pci-idio-16: Implement get_multiple callbackWilliam Breathitt Gray2018-03-261-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACCES I/O PCI-IDIO-16 series of devices provides 16 optically-isolated digital inputs accessed via two 8-bit ports. Since eight input lines are acquired on a single port input read, the PCI-IDIO-16 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idio_16_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: 104-idio-16: Implement get_multiple callbackWilliam Breathitt Gray2018-03-261-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ACCES I/O 104-IDIO-16 series of devices provides 16 optically-isolated digital inputs accessed via two 8-bit ports. Since eight input lines are acquired on a single port input read, the 104-IDIO-16 GPIO driver may improve multiple input reads by utilizing a get_multiple callback. This patch implements the idio_16_gpio_get_multiple function which serves as the respective get_multiple callback. Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: ks8695: Include the right headerLinus Walleij2018-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: kempld: Include the right headerLinus Walleij2018-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: janz-ttl: Use BIT() macroLinus Walleij2018-03-191-6/+7
| | | | | | | | | | | | | | | | | | This makes the code more readable by using the BIT() macro. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: janz-ttl: Include the right headerLinus Walleij2018-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: it87: Include the right headerLinus Walleij2018-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: ich: Use BIT() macroLinus Walleij2018-03-191-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Using BIT() makes (1 << foo) constructions easier to read, and also account for common mistakes where bit 31 is not working because of numbers being interpreted as negative unless specified as unsigned. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: ich: Include the right headerLinus Walleij2018-03-191-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Refrain from using GPIOF_* flags in the driver, just use 1/0 to return direction. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: htc-gpio: Include the right headerLinus Walleij2018-03-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Drop the include of <linux/gpio.h> from the platform data header as well, it serves no purpose. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: grgpio: Include the right headerLinus Walleij2018-03-191-2/+1
| | | | | | | | | | | | | | | | | | | | | This driver is a pure GPIO driver and should only include <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: ftgpio010: Drop of_gpio.h includeLinus Walleij2018-03-191-1/+0
| | | | | | | | | | | | | | | | | | | | | This driver does not make use of the functions in <linux/of_gpio.h> so drop this include. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: em: Use the right includeLinus Walleij2018-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Emma Mobile (EM) GPIO driver uses the too generic include <linux/gpio.h>. It is a driver so it should just use <linux/gpio/driver.h>. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: ge: Drop of_gpio.h includeLinus Walleij2018-03-191-1/+0
| | | | | | | | | | | | | | | | | | | | | This driver does not make use of the functions in <linux/of_gpio.h> so drop this include. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: dln2: Include proper headerLinus Walleij2018-03-191-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This driver has no business including <linux/gpio.h>, it is a driver so include <linux/gpio/driver.h>. GPIOF_DIR_IN/GPIOF_DIR_OUT are for consumers and should not be used in drivers to use just 1/0 instead. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | Merge tag 'v4.16-rc5' into develLinus Walleij2018-03-182-23/+20
| |\| | | | | | | | | | | | | | | | | | | Linux 4.16-rc5 merged into the GPIO devel branch to resolve a nasty conflict between fixes and devel in the RCAR driver. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: mockup: Update Bamvors mail addressLinus Walleij2018-03-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Bamvor changed his mail so let's updat his mail address everywhere. Cc: Bamvor Jian Zhang <bamv2005@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: raspberrypi-exp: explain Kconfig dependencyBaruch Siach2018-03-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 7ed915059c3001 (gpio: raspberrypi-ext: fix firmware dependency) fixed the Kconfig dependency to ensure that gpio-raspberrypi-exp is not built-in when the firmware is a module. But the Kconfig syntax for doing so is cryptic. Add a comment to make it a little easier. Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: Add GPIO driver for Spreadtrum SC9860 platformBaolin Wang2018-03-023-0/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Spreadtrum SC9860 platform GPIO controller contains 16 groups and each group contains 16 GPIOs. Each GPIO can set input/output and has the interrupt capability. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: raspberrypi-ext: fix firmware dependencyArnd Bergmann2018-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the firmware driver is a loadable module, the gpio driver cannot be built-in: drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_set': gpio-raspberrypi-exp.c:(.text+0xb4): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get': gpio-raspberrypi-exp.c:(.text+0x1ec): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_direction': gpio-raspberrypi-exp.c:(.text+0x360): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_get_polarity': gpio-raspberrypi-exp.c:(.text+0x4d4): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_out': gpio-raspberrypi-exp.c:(.text+0x670): undefined reference to `rpi_firmware_property' drivers/gpio/gpio-raspberrypi-exp.o:gpio-raspberrypi-exp.c:(.text+0x7fc): more undefined references to `rpi_firmware_property' follow drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_dir_in': drivers/gpio/gpio-raspberrypi-exp.o: In function `rpi_exp_gpio_probe': gpio-raspberrypi-exp.c:(.text+0x93c): undefined reference to `rpi_firmware_get' We already have a Kconfig dependency for it, but when compile-testing, it is disregarded. This changes the dependency so that compile-testing is only done when the firmware driver is completely disabled. Fixes: a98d90e7d588 ("gpio: raspberrypi-exp: Driver for RPi3 GPIO expander via mailbox service") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpiolib: friendly debug information for consumerWang Dongsheng2018-03-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | "failed" maybe makes observer confuse when a consumer can not lookup, so change to a friendly information. Signed-off-by: Wang Dongsheng <dongsheng.wang@hxt-semitech.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: Drop TZ1090 driversJames Hogan2018-03-014-850/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that arch/metag/ has been removed, along with TZ1090 SoC support, remove the TZ1090 GPIO drivers. They are of no value without the architecture and SoC platform code. Signed-off-by: James Hogan <jhogan@kernel.org> Cc: linux-gpio@vger.kernel.org Cc: linux-metag@vger.kernel.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | Revert "gpio: winbond: fix ISA_BUS_API dependency"Maciej S. Szmigiero2018-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 92a8046c9d952a2a7d21dfcd3afadc72a0bc0f72. Now that the patch series changing ISA_BUS_API dependency to selection was merged this reversion will do the same for gpio-winbond driver to make it consistent with other ISA bus gpio drivers. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: tps68470: Update to SPDX license identifierRajmohan Mani2018-02-231-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | Remove the GPL v2 license boilerplate and update with the SPDX license identifier. Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: Change ISA_BUS_API dependency to selectionWilliam Breathitt Gray2018-02-221-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ISA_BUS_API Kconfig option enables the compilation of the ISA bus driver. The ISA bus driver does not perform any hardware interaction, and is instead just a thin layer of software abstraction to eliminate boilerplate code common to ISA-style device drivers. Since ISA_BUS_API has no dependencies and does not jeopardize the integrity of the system when enabled, drivers should select it when the ISA bus driver functionality is needed. Cc: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: gpio-rcar: Support S2RAMHien Dang2018-02-221-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an implementation that saves and restores the state of GPIO configuration on suspend and resume. Signed-off-by: Hien Dang <hien.dang.eb@renesas.com> Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com> [Modify structure of the bank info to simplify a saving registers] [Remove DEV_PM_OPS macro] Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Tested-by: Nguyen Viet Dung <dung.nguyen.aj@renesas.com> Reviewed-by: Simon Horman <horms+renesas@verge.net.au> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: dwapb: Call directly into the gpiochip to read valueLinus Walleij2018-02-221-7/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were going out through the (legacy) gpio API to read the value of a line to set up polarity inversion. This is abusive. Do something less abusive by looking up the actual struct gpio_chip * instance and calling .get() directly on it. Acked-by: Hoan Tran <hotran@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: dwapb: Use "stride" rather than "size" for register distanceLinus Walleij2018-02-221-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | This terminology is more precise. Also cut the stride calculation in the preprocessor, it confuses more than it helps when reading the driver. Acked-by: Hoan Tran <hotran@apm.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: include consumer header in gpiolib.hLinus Walleij2018-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We are forward-declaring enum gpiod_flags, but this is not referenced by pointer, it is a real struct member, so we need to actually include it to compile anything including the local gpiolib.h header. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio-intel-mid: Delete an error messageMarkus Elfring2018-02-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: tegra: Convert to use DEFINE_SHOW_ATTRIBUTE macroAxel Lin2018-02-221-13/+3
| | | | | | | | | | | | | | | | | | | | | Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
| * | gpio: merrifield: Delete an error messageMarkus Elfring2018-02-221-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>