]>
git.karo-electronics.de Git - linux-beck.git/log
Julien Grossholtz [Fri, 26 Feb 2016 23:06:59 +0000 (18:06 -0500)]
gpio: ts4800: Add IMX51 dependency
The TS-4800 is an i.MX515 board. Its GPIO driver should only be compiled
for this CPU or for test builds.
Signed-off-by: Julien Grossholtz <julien.grossholtz@savoirfairelinux.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Mar 2016 07:41:41 +0000 (14:41 +0700)]
Merge branch 'devm-gpiochip-add-data' into devel
Bamvor Jian Zhang [Fri, 26 Feb 2016 14:37:14 +0000 (22:37 +0800)]
gpiolib: rewrite gpiodev_add_to_list
The original code of gpiodev_add_to_list is not very clear which
lead to bugs or compiling warning, reference the following patches:
Bugs:
1. Commit
ef7c7553039b ("gpiolib: improve overlap check of range of
gpio").
2. Commit
96098df125c0 ("gpiolib: fix chip order in gpio list")
Warning:
1. Commit
e28ecca6eac4 ("gpio: fix warning about iterator").
of gpio").
There is a off-list discussion about how to improve it consequently.
This commit try to follow this by rewriting the whole functions.
Tested pass with my gpio mockup driver and test scripts[1].
[1] http://www.spinics.net/lists/linux-gpio/msg09598.html
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Fri, 26 Feb 2016 08:00:50 +0000 (16:00 +0800)]
gpio: moxart: Allow compile test build
There is no build dependency for this driver, so enable COMPILE_TEST to get
better build coverage.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Fri, 26 Feb 2016 07:59:57 +0000 (15:59 +0800)]
gpio: moxart: Drop redundant code to set already initialized gpio_chip fields
These fields are initialized by bgpio_init() with exactly the same settings
so remove the redundant code.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Thu, 25 Feb 2016 20:01:48 +0000 (21:01 +0100)]
gpio: present the consumer of a line to userspace
I named the field representing the current user of GPIO line as
"label" but this is too vague and ambiguous. Before anyone gets
confused, rename it to "consumer" and indicate clearly in the
documentation that this is a string set by the user of the line.
Also clean up leftovers in the documentation.
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Bamvor Jian Zhang [Wed, 24 Feb 2016 14:17:19 +0000 (22:17 +0800)]
gpio: fix abi regression in sysfs
We started to assign the gpio_device as parent for the sysfs
but this changes the expected layout of sysfs. Restore the
previous behaviour.
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Gabor Juhos [Thu, 25 Feb 2016 07:00:45 +0000 (08:00 +0100)]
gpio: documenatation: fix GPIO_LOOKUP{,_IDX} documentation
The 'dev_id' parameter of the GPIO_LOOKUP{,_IDX} macros were removed by
commit
ad824783fb23 ("gpio: better lookup method for platform GPIOs").
Update the documentation to reflect that.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Thu, 25 Feb 2016 05:41:30 +0000 (13:41 +0800)]
gpio: mb86s7x: Allow compile test build
There is no build dependency for this driver, so enable COMPILE_TEST to get
better build coverage.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Wed, 24 Feb 2016 13:31:14 +0000 (21:31 +0800)]
gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()
This driver has .can_sleep flag set.
So the pisosr_gpio_get() can be called from contexts that can sleep.
Thus use the cansleep() variant in pisosr_gpio_refresh().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Mon, 22 Feb 2016 12:16:51 +0000 (20:16 +0800)]
gpio: pisosr: Use devm_gpiod_get_optional for gpio->load_gpio
gpio->load_gpio is optional, so use devm_gpiod_get_optional instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Andrzej Hajda [Tue, 23 Feb 2016 06:45:34 +0000 (07:45 +0100)]
gpio: xgene: fix type of variable containing error codes
ret variable can contain error values and is compared with zero.
Its type must be signed.
The problem has been detected using coccinelle script
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Simon Horman [Tue, 23 Feb 2016 01:36:51 +0000 (10:36 +0900)]
gpio: rcar: Use ARCH_RENESAS
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.
This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Sat, 20 Feb 2016 06:22:46 +0000 (14:22 +0800)]
gpio: ts4800: Drop redundant code to set already initialized gpio_chip fields
Both chip->base and chip->label are correctly set by bgpio_init().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Julien Grossholtz <julien.grossholtz@savoirfairelinux.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Sat, 20 Feb 2016 01:50:37 +0000 (09:50 +0800)]
gpio: brcmstb: Use list_for_each_entry at appropriate places
Use list_for_each_entry to simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Sat, 20 Feb 2016 01:48:07 +0000 (09:48 +0800)]
gpio: ath79: Check valid gpio count for both DT and non-DT cases
Move the code checking valid gpio count to cover both DT and non-DT cases.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Alban Bedel <albeu@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Thu, 25 Feb 2016 13:22:10 +0000 (14:22 +0100)]
Merge branch 'devm_gpiochip' of https://github.com/ldewangan/linux-upstream into devm-gpiochip-add-data
Axel Lin [Mon, 22 Feb 2016 12:16:51 +0000 (20:16 +0800)]
gpio: pisosr: Use devm_gpiod_get_optional for gpio->load_gpio
gpio->load_gpio is optional, so use devm_gpiod_get_optional instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Andrew F. Davis <afd@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Andrzej Hajda [Tue, 23 Feb 2016 06:45:34 +0000 (07:45 +0100)]
gpio: xgene: fix type of variable containing error codes
ret variable can contain error values and is compared with zero.
Its type must be signed.
The problem has been detected using coccinelle script
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Simon Horman [Tue, 23 Feb 2016 01:36:51 +0000 (10:36 +0900)]
gpio: rcar: Use ARCH_RENESAS
Make use of ARCH_RENESAS in place of ARCH_SHMOBILE.
This is part of an ongoing process to migrate from ARCH_SHMOBILE to
ARCH_RENESAS the motivation for which being that RENESAS seems to be a more
appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs.
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Sat, 20 Feb 2016 06:22:46 +0000 (14:22 +0800)]
gpio: ts4800: Drop redundant code to set already initialized gpio_chip fields
Both chip->base and chip->label are correctly set by bgpio_init().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Julien Grossholtz <julien.grossholtz@savoirfairelinux.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Sat, 20 Feb 2016 01:50:37 +0000 (09:50 +0800)]
gpio: brcmstb: Use list_for_each_entry at appropriate places
Use list_for_each_entry to simplify the code a bit.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Sat, 20 Feb 2016 01:48:07 +0000 (09:48 +0800)]
gpio: ath79: Check valid gpio count for both DT and non-DT cases
Move the code checking valid gpio count to cover both DT and non-DT cases.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Alban Bedel <albeu@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Geert Uytterhoeven [Thu, 18 Feb 2016 16:06:30 +0000 (17:06 +0100)]
gpio: rcar: Add Runtime PM handling for interrupts
The R-Car GPIO driver handles Runtime PM for requested GPIOs only.
When using a GPIO purely as an interrupt source, no Runtime PM handling
is done, and the GPIO module's clock may not be enabled.
To fix this:
- Add .irq_request_resources() and .irq_release_resources() callbacks
to handle Runtime PM when an interrupt is requested,
- Add irq_bus_lock() and sync_unlock() callbacks to handle Runtime PM
when e.g. disabling/enabling an interrupt, or configuring the
interrupt type.
Fixes: d5c3d84657db57bd "net: phy: Avoid polling PHY with PHY_IGNORE_INTERRUPTS"
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Geert Uytterhoeven [Fri, 19 Feb 2016 10:00:50 +0000 (11:00 +0100)]
gpio: Propagate all errors in devm_get_gpiod_from_child()
devm_get_gpiod_from_child() tries several property suffixes to find a
GPIO descriptor. If all suffixes fail and no probe deferral has been
detected, it returns the error of the last try.
However, if any but the last try fails with a real error (e.g. -EBUSY),
this error is not propagated, and -ENOENT will be returned.
This confuses drivers that e.g. want to detect if a GPIO is already in
use.
To fix this, change the loop logic to continue on -ENOENT, which
indicates the property was not found and the next suffix should be
tried, and propagate all other detected errors.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: xgene: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Tue, 23 Feb 2016 14:55:04 +0000 (20:25 +0530)]
gpio: xgene-sb: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: wm8994: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: wm8350: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: vx855: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: viperboard: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: ucb1400: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: twl6040: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: ts5500: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and clean the
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: ts4800: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: tps65912: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: tps65910: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: tps6586x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: timberdale Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: tegra: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@gmail.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: tc3589x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: tb10x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and clean the
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: syscon: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: sx150x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: sta2x11: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: spear-spics: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: sch: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: rdc321x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: rc5t583: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: palmas: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: pcf857x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and clean the
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: pca953x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: octeon: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: mxc: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and clean the
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: mvebu: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and clean the
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: moxart: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: mc9s08dz60: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: lpc32xx: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: lp3943: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: kempld: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: iop: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: generic: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: ge: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: f7188x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: ep93xx: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: dln2: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: da9055: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Support Opensource <support.opensource@diasemi.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: da9052: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: cs5535: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: crystalcove: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
call of gpiochip_remove() from error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: clps711x: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: bcm-kona: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Ray Jui <rjui@broadcom.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: arizona: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: patches@opensource.wolfsonmicro.com
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: adp5588: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from remove callback.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: adp5520: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from error path.
Also remove the need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: adnp: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from error path.
Also remove the need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Alexandre Courbot <gnurou@gmail.com>
Laxman Dewangan [Mon, 22 Feb 2016 12:13:28 +0000 (17:43 +0530)]
gpio: 74xx-mmio: Use devm_gpiochip_add_data() for gpio registration
Use devm_gpiochip_add_data() for GPIO registration and remove the
call for gpiochip_remove() from error path.
Also remove the need of driver callback .remove.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Alexander Shiyan <shc_work@mail.ru>
Laxman Dewangan [Mon, 22 Feb 2016 09:34:08 +0000 (15:04 +0530)]
gpio: Add missing devm_gpio_ wrapper in devres.txt
Add following missing devm wrappers in file devrs.txt under
list of managed interfaces.
devm_gpio_request()
devm_gpio_request_one()
devm_gpio_free()
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 22 Feb 2016 09:30:08 +0000 (15:00 +0530)]
gpio: Add resource management devm_gpio_chip_{add_data,remove}
Add devm wrappers for the gpiochip_add_data() and gpiochip_remove().
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Mon, 15 Feb 2016 11:02:09 +0000 (16:32 +0530)]
gpio: Add devm_ apis for gpiochip_add_data and gpiochip_remove
Add device managed APIs devm_gpiochip_add_data() and
devm_gpiochip_remove() for the APIs gpiochip_add_data()
and gpiochip_remove().
This helps in reducing code in error path and sometimes
removal of .remove callback for driver unbind.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Laxman Dewangan [Tue, 23 Feb 2016 14:07:08 +0000 (19:37 +0530)]
Merge remote-tracking branch 'linusw-gpio/for-next' into devm_gpiochip
Base for demv_gpiochip_add_data() and devm_gpiochip_remove().
ldewangan [Tue, 23 Feb 2016 14:03:35 +0000 (19:33 +0530)]
Share upstreaming patches
Share multiple bulk changes.
Markus Pargmann [Tue, 23 Feb 2016 07:54:46 +0000 (08:54 +0100)]
tools: gpio: Small updates for output format
Use %2d for the GPIO line number. This should align the results
horziontally for most gpio chips.
The GPIO label uses quotes for real values. For GPIO names this is
currently missing. The patch adds the missing quote.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Mon, 22 Feb 2016 12:47:49 +0000 (13:47 +0100)]
Merge branch 'devel' into for-next
Linus Walleij [Mon, 22 Feb 2016 12:44:53 +0000 (13:44 +0100)]
gpio: fixup line flags for userspace ABI
This fixes the wrongly indicated lines in the userspace
ABI: test for the right BITS, do not treat bit numbers as
bitmasks.
Reported-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Sat, 20 Feb 2016 11:53:31 +0000 (12:53 +0100)]
Revert "gpio: remove broken irq_to_gpio() interface"
This reverts commit
ee2204a37957daed80418ea8ffc4f5c3146fb8e7 .
Bamvor Jian Zhang [Sat, 20 Feb 2016 05:13:19 +0000 (13:13 +0800)]
gpiolib: fix crash when gpiochip removed
Commit
cb464a88e1ed ("gpio: make the gpiochip a real device") call
gpiochip_sysfs_unregister after the gpiochip is empty. It lead to the
following crash:
[ 163.503994] Unable to handle kernel NULL pointer dereference at virtual address
0000007c
[...]
[ 163.525394] [<
ffffffc0003719a0 >] gpiochip_sysfs_unregister+0x44/0xa4
[ 163.525611] [<
ffffffc00036f6a0 >] gpiochip_remove+0x24/0x154
[ 163.525861] [<
ffffffbffc00f0a4 >] mockup_gpio_remove+0x38/0x64 [gpio_mockup]
[ 163.526101] [<
ffffffc00042b4b4 >] platform_drv_remove+0x24/0x64
[ 163.526313] [<
ffffffc000429cc8 >] __device_release_driver+0x7c/0xfc
[ 163.526525] [<
ffffffc000429e54 >] driver_detach+0xbc/0xc0
[ 163.526700] [<
ffffffc000429014 >] bus_remove_driver+0x58/0xac
[ 163.526883] [<
ffffffc00042a4cc >] driver_unregister+0x2c/0x4c
[ 163.527067] [<
ffffffc00042b5c0 >] platform_driver_unregister+0x10/0x18
[ 163.527284] [<
ffffffbffc00f340 >] mock_device_exit+0x10/0x38 [gpio_mockup]
[ 163.527593] [<
ffffffc00011cefc >] SyS_delete_module+0x1b8/0x1fc
[ 163.527799] [<
ffffffc000085d8c >] __sys_trace_return+0x0/0x4
[ 163.528049] Code:
940d74b4 f9019abf aa1303e0 940d7439 (
7940fac0 )
[ 163.536273] ---[ end trace
3d1329be504af609 ]---
This patch fix this by changing the code back.
Signed-off-by: Bamvor Jian Zhang <bamvor.zhangjian@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Sudip Mukherjee [Fri, 19 Feb 2016 09:23:00 +0000 (14:53 +0530)]
gpio: pisosr: add missing unlock
If spi_read() fails then we just returned but we missed unlocking the
mutex.
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Quan Nguyen [Wed, 17 Feb 2016 13:15:08 +0000 (20:15 +0700)]
gpio: X-Gene standby GPIO controller DTS binding
Update description for X-Gene standby GPIO controller DTS binding to
support GPIO line configuration as input, output or external IRQ pin.
Signed-off-by: Y Vo <yvo@apm.com>
Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Quan Nguyen [Wed, 17 Feb 2016 13:15:07 +0000 (20:15 +0700)]
gpio: xgene: Enable X-Gene standby GPIO as interrupt controller
Enable X-Gene standby GPIO controller as interrupt controller to provide
its own resources. This avoids ambiguity where GIC interrupt resource is
use as X-Gene standby GPIO interrupt resource in user driver.
Signed-off-by: Y Vo <yvo@apm.com>
Signed-off-by: Quan Nguyen <qnguyen@apm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Dec 2015 13:43:48 +0000 (14:43 +0100)]
MIPS: txx9: rbtx4938: switch to gpiochip_add_data()
We're planning to remove the gpiochip_add() function to swith
to gpiochip_add_data() with NULL for data argument.
Cc: linux-mips@linux-mips.org
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Dec 2015 13:40:40 +0000 (14:40 +0100)]
MIPS: txx9: iocled: use gpiochip data pointer
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: linux-mips@linux-mips.org
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Dec 2015 13:37:16 +0000 (14:37 +0100)]
MIPS: rb532: use gpiochip data pointer
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: linux-mips@linux-mips.org
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Dec 2015 13:33:54 +0000 (14:33 +0100)]
MIPS: txx9: switch to gpiochip_add_data()
We're planning to remove the gpiochip_add() function to swith
to gpiochip_add_data() with NULL for data argument.
Cc: linux-mips@linux-mips.org
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Dec 2015 13:28:45 +0000 (14:28 +0100)]
MIPS: jz4740: use gpiochip data pointer
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: linux-mips@linux-mips.org
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Tue, 8 Dec 2015 13:22:32 +0000 (14:22 +0100)]
MIPS: bcm63xx: switch to gpiochip_add_data()
We're planning to remove the gpiochip_add() function to swith
to gpiochip_add_data() with NULL for data argument.
Cc: linux-mips@linux-mips.org
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>