summaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)Author
2018-12-07gpio: lynxpoint: Convert to use SPDX identifierAndy Shevchenko
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: intel-mid: Convert to use SPDX identifierAndy Shevchenko
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: ich: Convert to use SPDX identifierAndy Shevchenko
Reduce size of duplicated comments by switching to use SPDX identifier. No functional change. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: sodaville: Sort headers alphabeticallyAndy Shevchenko
Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: pch: Sort headers alphabeticallyAndy Shevchenko
Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: ich: Sort headers alphabeticallyAndy Shevchenko
Sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: sch: Remove linux/init.h and sort headersAndy Shevchenko
There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. While here, sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: merrifield: Remove linux/init.hAndy Shevchenko
There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: lynxpoint: Remove linux/init.h and sort headersAndy Shevchenko
There is no need to include linux/init.h when at the same time we include linux/module.h. Remove redundant inclusion. While here, sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: intel-mid: Remove linux/module.h and sort headersAndy Shevchenko
There is no need to include linux/module.h when at the same time we include linux/init.h. Remove redundant inclusion. While here, remove no-op macro and sort header block alphabetically for easy maintenance. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: pch: Remove duplicate assignmentsAndy Shevchenko
There is no need to assign the same values which core does for us anyway. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: pch: Remove redundant __func__ from debug printAndy Shevchenko
dev_dbg includes the function name & line number by default when dynamic debugging is enabled. Hence __func__ is redundant here and removed. Do the same for any messages in ->probe() since it doesn't make sense. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: ich: Join string literals backAndy Shevchenko
For easy grepping on debug purposes join string literals back in the messages. While here, fix spelling typo. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: ich: Convert pr_<level> to dev_<level>Andy Shevchenko
Instead of customized pr_<level> format use unified dev_<level> output. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: ich: Switch to use struct device instead of platform_deviceAndy Shevchenko
There is no need to have a pointer to struct platform_device. Instead, switch to use struct device one. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: ich: Simplify error handling in ichx_write_bit()Andy Shevchenko
Simplify error handling in ichx_write_bit() and propagate its error code to the caller. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: sodaville: Use for_each_set_bit() in IRQ handlerAndy Shevchenko
This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: pch: Use for_each_set_bit() in IRQ handlerAndy Shevchenko
This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-07gpio: uniphier: convert to SPDX License IdentifierMasahiro Yamada
checkpatch.pl suggests to use SPDX license tag. I am happy to follow it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: zynq: Report gpio direction at bootBrandon Maier
The Zynq's gpios can be configured by the bootloader. But Linux will erroneously report all gpios as inputs unless we implement get_direction(). Signed-off-by: Brandon Maier <Brandon.Maier@collins.com> Tested-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: ks8695: Change to use DEFINE_SHOW_ATTRIBUTE macroYangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpiolib-acpi: Only defer request_irq for GpioInt ACPI event handlersHans de Goede
Commit 78d3a92edbfb ("gpiolib-acpi: Register GpioInt ACPI event handlers from a late_initcall") deferred the entire acpi_gpiochip_request_interrupt call for each event resource. This means it also delays the gpiochip_request_own_desc(..., "ACPI:Event") call. This is a problem if some AML code reads the GPIO pin before we run the deferred acpi_gpiochip_request_interrupt, because in that case acpi_gpio_adr_space_handler() will already have called gpiochip_request_own_desc(..., "ACPI:OpRegion") causing the call from acpi_gpiochip_request_interrupt to fail with -EBUSY and we will fail to register an event handler. acpi_gpio_adr_space_handler is prepared for acpi_gpiochip_request_interrupt already having claimed the pin, but the other way around does not work. One example of a problem this causes, is the event handler for the OTG ID pin on a Prowise PT301 tablet not registering, keeping the port stuck in whatever mode it was in during boot and e.g. only allowing charging after a reboot. This commit fixes this by only deferring the request_irq call and the initial run of edge-triggered IRQs instead of deferring all of acpi_gpiochip_request_interrupt. Cc: stable@vger.kernel.org Fixes: 78d3a92edbfb ("gpiolib-acpi: Register GpioInt ACPI event ...") Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: lpc18xx: add GPIO pin interrupt controller supportVladimir Zapolskiy
The change adds support of LPC18xx/LPC43xx GPIO pin interrupt controller block within SoC GPIO controller. The new interrupt controller driver allows to configure and capture edge or level interrupts on 8 arbitrary selectedinput GPIO pins, and lift the signals to be reported as NVIC rising edge interrupts. Configuration of a particular GPIO pin to serve as interrupt and its mapping to an interrupt on NVIC is done by SCU pin controller, for more details see description of 'nxp,gpio-pin-interrupt' device tree property of a GPIO pin [1]. From LPC18xx and LPC43xx User Manuals the GPIO controller consists of the following blocks: * GPIO pin interrupt block at 0x40087000, this change adds its support, * GPIO GROUP0 interrupt block at 0x40088000, * GPIO GROUP1 interrupt block at 0x40089000, * GPIO port block at 0x400F4000, it is supported by the original driver. While all 4 sub-controller blocks have their own I/O addresses, moreover all 3 interrupt blocks are APB0 peripherals and high-speed GPIO block is an AHB slave, according to the hardware manual the GPIO controller is seen as a single block, and 4 sub-controllers have the shared reset signal RGU #28 and clock to register interface CLK_CPU_GPIO on CCU1. Likely support of two GPIO group interrupt blocks won't be added in short term, because the mechanism to mask several interrupt sources is not well defined. [1] Documentation/devicetree/bindings/pinctrl/nxp,lpc1850-scu.txt Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: lpc18xx: use resource managed interface to register GPIO controllerVladimir Zapolskiy
Slightly simplify deregistration of the GPIO controller driver. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: lpc18xx: add struct device local variableVladimir Zapolskiy
This is a non-functional change, it simplifies multiple access to 'struct device' pointer derived from a platform device pointer, the new local variable will also be used in the following changes. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: lpc18xx: use SPDX license identifierVladimir Zapolskiy
Replace GPLv2 header with the SPDX identifier. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: mt7621: pass mediatek_gpio_bank_probe() failure up the stackNicholas Mc Guire
The error cases of mediatek_gpio_bank_probe() would go unnoticed (except for the dev_err() messages). The probe function should return an error if one of the banks failed to initialize properly indicated by not returning non-0. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Acked-by: Sean Wang <sean.wang@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-07gpio: mt7621: report failure of devm_kasprintf()Nicholas Mc Guire
kasprintf() may return NULL on failure of internal allocation thus the assigned label is not safe if not explicitly checked. On error mediatek_gpio_bank_probe() returns negative values so -ENOMEM in the (unlikely) failure case should be fine here. Fixes: 4ba9c3afda41 ("gpio: mt7621: Add a driver for MT7621") Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Sean Wang <sean.wang@kernel.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-05gpio: rcar: reference device instead of platform deviceVladimir Zapolskiy
The change simplifies dereferences to the mediated struct device, also it allows to limit the scope of the platform device usage to probe and remove functions only. Non-functional change. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-12-03gpio: lynxpoint: Use for_each_set_bit() in IRQ handlerAndy Shevchenko
This simplifies and standardizes the AB IRQ handler by using the for_each_set_bit() library function. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-03gpio: pch: Convert to dev_pm_opsAndy Shevchenko
Convert the legacy system PM callbacks to new ones. Meanwhile, remove the redundant calls to the PCI for changing a power state since it's done by bus code. While here, remove weird indentation with backslash in use. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-02Merge tag 'armsoc-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC fixes from Olof Johansson: "Volume is a little higher than usual due to a set of gpio fixes for Davinci platforms that's been around a while, still seemed appropriate to not hold off until next merge window. Besides that it's the usual mix of minor fixes, mostly corrections of small stuff in device trees. Major stability-related one is the removal of a regulator from DT on Rock960, since DVFS caused undervoltage. I expect it'll be restored once they figure out the underlying issue" * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits) MAINTAINERS: Remove unused Qualcomm SoC mailing list ARM: davinci: dm644x: set the GPIO base to 0 ARM: davinci: da830: set the GPIO base to 0 ARM: davinci: dm355: set the GPIO base to 0 ARM: davinci: dm646x: set the GPIO base to 0 ARM: davinci: dm365: set the GPIO base to 0 ARM: davinci: da850: set the GPIO base to 0 gpio: davinci: restore a way to manually specify the GPIO base ARM: davinci: dm644x: define gpio interrupts as separate resources ARM: davinci: dm355: define gpio interrupts as separate resources ARM: davinci: dm646x: define gpio interrupts as separate resources ARM: davinci: dm365: define gpio interrupts as separate resources ARM: davinci: da8xx: define gpio interrupts as separate resources ARM: dts: at91: sama5d2: use the divided clock for SMC ARM: dts: imx51-zii-rdu1: Remove EEPROM node ARM: dts: rockchip: Remove @0 from the veyron memory node arm64: dts: rockchip: Fix PCIe reset polarity for rk3399-puma-haikou. arm64: dts: qcom: msm8998: Reserve gpio ranges on MTP arm64: dts: sdm845-mtp: Reserve reserved gpios arm64: dts: ti: k3-am654: Fix wakeup_uart reg address ...
2018-12-02gpio: sodaville: Convert to use managed functions pcim_* and devm_*Andy Shevchenko
This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-12-02gpio: pch: Convert to use managed functions pcim_* and devm_*Andy Shevchenko
This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller an tidier. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
2018-11-29gpio: OF: Parse MMC-specific CD and WP propertiesLinus Walleij
When retrieveing CD (card detect) and WP (write protect) GPIO handles from the device tree, make sure to assign them active low by default unless the "cd-inverted" or "wp-inverted" properties are set. These properties mean that respective signal is active HIGH since the SDHCI specification stipulates that this kind of signals should be treated as active LOW. If the twocell GPIO flag is also specified as active low, well that's nice and we will silently ignore the tautological specification. If however the GPIO line is specified as active low in the GPIO flasg cell and "cd-inverted" or "wp-inverted" is also specified, the latter takes precedence and we print a warning. The current effect on the MMC slot-gpio core are as follows: For CD GPIOs: no effect. The current code in mmc/core/host.c calls mmc_gpiod_request_cd() with the "override_active_level" argument set to true, which means that whatever the GPIO descriptor thinks about active low/high will be ignored, the core will use the MMC_CAP2_CD_ACTIVE_HIGH to keep track of this and reads the raw value from the GPIO descriptor, totally bypassing gpiolibs inversion semantics. I plan to clean this up at a later point passing the handling of inversion semantics over to gpiolib, so this patch prepares the ground for that. Fow WP GPIOs: this is probably fixing a bug, because the code in mmc/core/host.c calls mmc_gpiod_request_ro() with the "override_active_level" argument set to false, which means it will respect the inversion semantics of the gpiolib and ignore the MMC_CAP2_RO_ACTIVE_HIGH flag for everyone using this through device tree. However the code in host.c confusingly goes to great lengths setting up the MMC_CAP2_RO_ACTIVE_HIGH flag from the GPIO descriptor and by reading the "wp-inverted" property of the node. As far as I can tell this is all in vain and the inversion is broken: device trees that use "wp-inverted" do not work as intended, instead the only way to actually get inversion on a line is by setting the second cell flag to GPIO_ACTIVE_HIGH (which will be the default) or GPIO_ACTIVE_LOW if they want the proper MMC semantics. Presumably all device trees do this right but we need to parse and handle this properly. Cc: linux-mmc@vger.kernel.org Cc: linux-gpio@vger.kernel.org Cc: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-26gpio: davinci: restore a way to manually specify the GPIO baseBartosz Golaszewski
Commit 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") broke the network support in legacy boot mode for da850-evm since we can no longer request the MDIO clock GPIO. Other boards may be broken too, which I haven't tested. The problem is in the fact that most board files still use the legacy GPIO API where lines are requested by numbers rather than descriptors. While this should be fixed eventually, in order to unbreak the board for now - provide a way to manually specify the GPIO base in platform data. Fixes: 587f7a694f01 ("gpio: davinci: Use dev name for label and automatic base selection") Cc: stable@vger.kernel.org Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
2018-11-26gpio: restore original GPLv2+ license of gpiolib-of.c sourcesVladimir Zapolskiy
It's easy to verify that the change of drivers/gpio/gpiolib-of.c license header to SPDX standard changes the license from GPLv2+ to GPLv2, and this change corrects it. Fixes: dae5f0afcfc3 ("gpio: Use SPDX header for core library") Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-19drivers/gpio/gpio-grgpio.c: Remove duplicate headerBrajeswar Ghosh
Remove linux/gpio/driver.h which is included more than once Signed-off-by: Brajeswar Ghosh <brajeswar.linux@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-16gpio: vf610: add optional clock supportA.s. Dong
Some SoCs need the gpio clock to be enabled before accessing HW registers. This patch add the optional clock handling. Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Stefan Agner <stefan@agner.ch> Cc: Shawn Guo <shawnguo@kernel.org> Cc: linux-gpio@vger.kernel.org Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-16gpio: mockup: fix indicated directionBartosz Golaszewski
Commit 3edfb7bd76bd ("gpiolib: Show correct direction from the beginning") fixed an existing issue but broke libgpiod tests by changing the default direction of dummy lines to output. We don't break user-space so make gpio-mockup behave as before. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-16gpio: pxa: fix legacy non pinctrl aware builds againRobert Jarzmik
As pointed out by Gregor, spitz keyboard matrix is broken, with or without CONFIG_PINCTRL set, quoting : "The gpio matrix keypard on the Zaurus C3x00 (see spitz.c) does not work properly. Noticeable are that rshift+c does nothing where as lshift+c creates C. Opposite it is for rshift+a vs lshift+a, here only rshift works. This affects a few other combinations using the rshift or lshift buttons." As a matter of fact, as for platform_data based builds CONFIG_PINCTRL=n is required for now (as opposed for devicetree builds where it should be set), this means gpio driver should change the direction, which is what was attempted by commit c4e5ffb6f224 ("gpio: pxa: fix legacy non pinctrl aware builds"). Unfortunately, the input case was inverted, and the direction change was never done. This wasn't seen up until now because the initial platform setup (MFP) was setting this direction. Yet in Gregory's case, the matrix-keypad driver changes back and forth the direction dynamically, and this is why he's the first to report it. Fixes: c4e5ffb6f224 ("gpio: pxa: fix legacy non pinctrl aware builds") Tested-by: Greg <greguu@null.net> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-16gpio: mxc: move gpio noirq suspend/resume to syscore phaseAnson Huang
During noirq suspend/resume phase, GPIO irq could arrive and its registers like IMR will be changed by irq handle process, to make the GPIO registers exactly when it is powered ON after resume, move the GPIO noirq suspend/resume callback to syscore suspend/resume phase, local irq is disabled at this phase so GPIO registers are atomic. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-15gpio: rcar: convert to SPDX identifiersKuninori Morimoto
This patch updates license to use SPDX-License-Identifier instead of verbose license text. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-15gpio: drop devm_gpio_chip_match()Laurent Pinchart
Commit 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") dropped the last user of drop devm_gpio_chip_match(), causing a defined but not used compilation warning. Fix it by removing the function. Fixes: 48207d7595d2 ("gpio: drop devm_gpiochip_remove()") Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Olof Johansson <olof@lixom.net> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-09gpio: don't free unallocated ida on gpiochip_add_data_with_key() error pathVladimir Zapolskiy
The change corrects the error path in gpiochip_add_data_with_key() by avoiding to call ida_simple_remove(), if ida_simple_get() returns an error. Note that ida_simple_remove()/ida_free() throws a BUG(), if id argument is negative, it allows to easily check the correctness of the fix by fuzzing the return value from ida_simple_get(). Fixes: ff2b13592299 ("gpio: make the gpiochip a real device") Cc: stable@vger.kernel.org # v4.6+ Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-05gpiolib: Fix possible use after free on labelMuchun Song
gpiod_request_commit() copies the pointer to the label passed as an argument only to be used later. But there's a chance the caller could immediately free the passed string(e.g., local variable). This could trigger a use after free when we use gpio label(e.g., gpiochip_unlock_as_irq(), gpiochip_is_requested()). To be on the safe side: duplicate the string with kstrdup_const() so that if an unaware user passes an address to a stack-allocated buffer, we won't get the arbitrary label. Also fix gpiod_set_consumer_name(). Signed-off-by: Muchun Song <smuchun@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-05gpio: sch311x: clean an indentation issue, remove extraneous spaceColin Ian King
Trivial fix to clean up an indentation issue, remove space Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-05gpio: pl061: Move irq_chip definition inside struct pl061Manivannan Sadhasivam
Keeping the irq_chip definition static will make it shared with multiple giochips in the system. This practice is considered to be bad and now we will get the below warning from gpiolib core: "detected irqchip that is shared with multiple gpiochips: please fix the driver." Hence, move the irq_chip definition from static to `struct pl061` for using a unique irq_chip for each gpiochip. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-05gpio: drop devm_gpiochip_remove()Uwe Kleine-König
There is hardly any reason to call devm_gpiochip_remove() because the driver core handles calling gpiochip_remove() automatically. To make it harder to introduce new (and probably unneeded) callers, drop the function. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2018-11-05gpio: pcie-idio-24: Mask read inputs for get_multipleWilliam Breathitt Gray
This patch masks the read inputs with the word mask in order to ensure only requested input states are returned in the bits array. Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>