Andrew F. Davis [Fri, 4 Mar 2016 18:58:44 +0000 (12:58 -0600)]
gpio: Add generic serializer DT binding
Add binding for generic parallel-in/serial-out shift register devices
used as GPIO.
Signed-off-by: Andrew F. Davis <afd@ti.com>
Acked-by: Rob Herring <robh@kernel.org>
[Clarified ngpios semantic]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Thu, 10 Mar 2016 08:48:06 +0000 (15:48 +0700)]
gpio: uapi: use 0xB4 as ioctl() major
The previous 'o' is in conflict and not very orderly assigned.
We want to select an ioctl() major that does not conflict with
the existining ones.
Add the new reserved major (0xB4) to Documentation/ioctl/ioctl-number.txt
Fixes:
3c702e9987e2 ("gpio: add a userspace chardev ABI for GPIOs")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Wed, 9 Mar 2016 15:02:52 +0000 (22:02 +0700)]
gpio: tps65912: fix bad merge
I screwed up while merging the immutable branch for TPS65912,
so fixing it unbroken again.
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Andrew F. Davis <afd@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Wed, 9 Mar 2016 15:00:27 +0000 (22:00 +0700)]
Revert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free"
This reverts commit
3fab91ea284a3b795327dda915a3c150a49e4be2.
Grygorii Strashko [Fri, 4 Mar 2016 15:25:35 +0000 (17:25 +0200)]
gpio: omap: drop dev field from gpio_bank structure
GPIO chip structure already has "parent" field which is used for the
same purpose as "dev" field in gpio_bank structure - store pointer on
GPIO device.
Hence, drop duplicated "dev" field from gpio_bank structure.
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Linus Walleij [Wed, 9 Mar 2016 10:40:37 +0000 (17:40 +0700)]
Merge branch 'ib-mfd-regulator-gpio-4.6' of git://git./linux/kernel/git/lee/mfd into devel
Axel Lin [Mon, 22 Feb 2016 07:24:54 +0000 (15:24 +0800)]
gpio: mpc8xxx: Slightly update the code for better readability
Setting gc->direction_output to gc->direction_output looks strange.
I think this change makes the intention more clear.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Mon, 22 Feb 2016 07:24:01 +0000 (15:24 +0800)]
gpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip
*read_reg and *write_reg can be removed because at all the places to call
them, we can just use gc->read_reg/gc->write_reg instead.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Mon, 22 Feb 2016 07:22:52 +0000 (15:22 +0800)]
gpio: mpc8xxx: Fixup setting gpio direction output
For devtype with specific gpio_dir_out implementation, current code is
wrong because below code sets both gc->direction_output and
mpc8xxx_gc->direction_output to the same function.
gc->direction_output = devtype->gpio_dir_out ?: gc->direction_output;
mpc8xxx_gc->direction_output = gc->direction_output;
Set mpc8xxx_gc->direction_output = gc->direction_output first to fix it.
This way mpc8xxx_gc->direction_output actually calls the standard
bgpio_dir_out() to update register.
Fixes: commit
42178e2a1e42 ("drivers/gpio: Switch gpio-mpc8xxx to use gpio-generic")
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Phil Reid [Tue, 1 Mar 2016 06:25:41 +0000 (14:25 +0800)]
gpio: mcp23s08: Add support for mcp23s18
This patch adds support for the mcp23s18 which is very similar to
the mcp23s17. A couple of control bits are not the same.
Notable IOCON_HAEN (s17 only) & IOCON_INTCC. Which can be ignored.
Patch changes the following:
- Add mcp23s18 types.
- Always set mirror bit if the dts defines mcp23s18. regardless of type.
Mirror bit is ignored on 8 bit devices anyway.
- In mcp23s08_probe use chip.ngpio instead of logic based on type
to determine number of gpio lins to increment by. This is set
appropiately by the call to mcp23s08_probe_one.
- Add mcp23s18 to device tree documentation.
- Remove statement that irqs don't work for spi. They do.
Tested with mcp23s18.
Signed-off-by: Phil Reid <preid@electromag.com.au>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Marek Vasut [Mon, 29 Feb 2016 16:23:17 +0000 (17:23 +0100)]
dt-bindings: gpio: altera: Fix altr,interrupt-type property
The altr,interrupt-trigger property is not used by the driver.
Instead, altr,interrupt-type is used by the driver and the driver
does not probe if this property is not specified. Therefore, it
is expected that there are no users of the -trigger property in
the wild and that this is a typo in the documentation for the
altera-pio controller. This patch fixes the typo.
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Tien Hock Loh <thloh@altera.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Andreas Werner [Mon, 29 Feb 2016 18:44:43 +0000 (19:44 +0100)]
gpio: add driver for MEN 16Z127 GPIO controller
The 16Z127 is a 32bit GPIO controller on a MCB FPGA.
Every single line can be configured as input and output.
Push pull and open drain are supported as well as setting
a debounce value for the input lines.
Signed-off-by: Andreas Werner <andy@wernerandy.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Axel Lin [Mon, 29 Feb 2016 13:08:19 +0000 (21:08 +0800)]
gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free
The implementation of lp3943_gpio_request/lp3943_gpio_free test pin_used
for tracing the pin usage. However, gpiolib already checks FLAG_REQUESTED
flag for the same purpose. So remove the redundant implementation.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Amitoj Kaur Chawla [Sun, 28 Feb 2016 12:30:56 +0000 (18:00 +0530)]
gpio: timberdale: Switch to devm_ioremap_resource()
Replace calls to devm_request_mem_region and devm_ioremap with a
direct call to devm_ioremap_resource instead and modify error
handling.
Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more
clear.
A simplified version of the Coccinelle semantic patch that is used to
make this change is as follows:
//<smpl>
@nm@
expression myname;
identifier i;
@@
struct platform_driver i = { .driver = { .name = myname } };
@@
expression dev,res,size,e1,e;
expression nm.myname;
@@
-if (!devm_request_mem_region(dev, res->start, size,
- \(res->name\|dev_name(dev)\|myname\)))
{
- ...
- return ...;
-}
... when != res->start = e1
e =
-devm_ioremap(dev,res->start,size);
+devm_ioremap_resource(dev,res);
if
-(e == NULL)
+(IS_ERR(e))
{
...
-return ...;
+return PTR_ERR(e);
}
//</smpl>
Further, updated error handling by hand as devm_ioremap_resource
gives appropriate error messages, so remove unnecessary error
messages.
Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
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.