openwrt/staging/blogic.git
8 years agogpio: mcp23s08: Fix clearing of interrupt.
Phil Reid [Tue, 15 Mar 2016 07:46:30 +0000 (15:46 +0800)]
gpio: mcp23s08: Fix clearing of interrupt.

The mcp23s18 is configurable on clearing the interrupt on either reading
INTCAP or GPIO. Since driver reads INTCAP in IRQ and not the GPIO reg need
to set control byte for this mode.

Signed-off-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpiolib: Fix comment referring to gpio_*() in gpiod_*()
Geert Uytterhoeven [Mon, 14 Mar 2016 15:24:12 +0000 (16:24 +0100)]
gpiolib: Fix comment referring to gpio_*() in gpiod_*()

Fixes: 79a9becda8940deb ("gpiolib: export descriptor-based GPIO interface")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit
Geert Uytterhoeven [Fri, 11 Mar 2016 16:31:27 +0000 (17:31 +0100)]
gpio: pca953x: Fix pca953x_gpio_set_multiple() on 64-bit

pca953x_gpio_set_multiple() divides by 4 to convert from longs to bytes,
which assumes a 32-bit platform, and is not correct on 64-bit platforms.
Use "sizeof(...)" instead to fix this.

Cc: stable@vger.kernel.org
Fixes: b4818afeacbd8182 ("gpio: pca953x: Add set_multiple to allow multiple bits to be set in one write.")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: xgene: Fix kconfig for standby GIPO contoller
Matthias Brugger [Fri, 4 Mar 2016 10:59:58 +0000 (11:59 +0100)]
gpio: xgene: Fix kconfig for standby GIPO contoller

The standby GPIO controller can be used as a interrupt controller.
Select GPIOLIB_IRQCHIP when compiling this driver. Otherwise we get
a compilation error:

drivers/gpio/gpio-xgene-sb.c: In function 'xgene_gpio_sb_probe':
drivers/gpio/gpio-xgene-sb.c:312:10: error: 'struct gpio_chip'
  has no member named 'irqdomain'
  priv->gc.irqdomain = priv->irq_domain;
          ^
scripts/Makefile.build:295: recipe for target
'drivers/gpio/gpio-xgene-sb.o' failed
make[2]: *** [drivers/gpio/gpio-xgene-sb.o] Error 1

Fixes: 1013fc41 "gpio: xgene: Enable X-Gene standby GPIO as interrupt controller"
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Acked-by: Quan Nguyen <qnguyen@apm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: Add generic serializer DT binding
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>
8 years agogpio: uapi: use 0xB4 as ioctl() major
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>
8 years agogpio: tps65912: fix bad merge
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>
8 years agoRevert "gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free"
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.

8 years agogpio: omap: drop dev field from gpio_bank structure
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>
8 years agoMerge branch 'ib-mfd-regulator-gpio-4.6' of git://git.kernel.org/pub/scm/linux/kernel...
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

8 years agogpio: mpc8xxx: Slightly update the code for better readability
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>
8 years agogpio: mpc8xxx: Remove *read_reg and *write_reg from struct mpc8xxx_gpio_chip
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>
8 years agogpio: mpc8xxx: Fixup setting gpio direction output
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>
8 years agogpio: mcp23s08: Add support for mcp23s18
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>
8 years agodt-bindings: gpio: altera: Fix altr,interrupt-type property
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>
8 years agogpio: add driver for MEN 16Z127 GPIO controller
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>
8 years agogpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_free
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>
8 years agogpio: timberdale: Switch to devm_ioremap_resource()
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>
8 years agogpio: ts4800: Add IMX51 dependency
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>
8 years agoMerge branch 'devm-gpiochip-add-data' into devel
Linus Walleij [Tue, 8 Mar 2016 07:41:41 +0000 (14:41 +0700)]
Merge branch 'devm-gpiochip-add-data' into devel

8 years agogpiolib: rewrite gpiodev_add_to_list
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>
8 years agogpio: moxart: Allow compile test build
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>
8 years agogpio: moxart: Drop redundant code to set already initialized gpio_chip fields
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>
8 years agogpio: present the consumer of a line to userspace
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>
8 years agogpio: fix abi regression in sysfs
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>
8 years agogpio: documenatation: fix GPIO_LOOKUP{,_IDX} documentation
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>
8 years agogpio: mb86s7x: Allow compile test build
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>
8 years agogpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()
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>
8 years agogpio: pisosr: Use devm_gpiod_get_optional for gpio->load_gpio
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>
8 years agogpio: xgene: fix type of variable containing error codes
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>
8 years agogpio: rcar: Use ARCH_RENESAS
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>
8 years agogpio: ts4800: Drop redundant code to set already initialized gpio_chip fields
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>
8 years agogpio: brcmstb: Use list_for_each_entry at appropriate places
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>
8 years agogpio: ath79: Check valid gpio count for both DT and non-DT cases
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>
8 years agoMerge branch 'devm_gpiochip' of https://github.com/ldewangan/linux-upstream into...
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

8 years agogpio: pisosr: Use devm_gpiod_get_optional for gpio->load_gpio
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>
8 years agogpio: xgene: fix type of variable containing error codes
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>
8 years agogpio: rcar: Use ARCH_RENESAS
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>
8 years agogpio: ts4800: Drop redundant code to set already initialized gpio_chip fields
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>
8 years agogpio: brcmstb: Use list_for_each_entry at appropriate places
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>
8 years agogpio: ath79: Check valid gpio count for both DT and non-DT cases
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>
8 years agogpio: rcar: Add Runtime PM handling for interrupts
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>
8 years agogpio: Propagate all errors in devm_get_gpiod_from_child()
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>
8 years agogpio: xgene: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: xgene-sb: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: wm8994: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: wm8350: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: wm8350: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: vx855: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: viperboard: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: ucb1400: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: twl6040: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: ts5500: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: ts4800: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: tps65912: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: tps65910: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: tps6586x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: timberdale Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: tegra: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: tc3589x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: tb10x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: syscon: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: sx150x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: stp-xway: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: sta2x11: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: spear-spics: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: sch: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: rdc321x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: rc5t583: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: palmas: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: pcf857x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: pca953x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: octeon: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: mxc: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: mvebu: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: moxart: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: mc9s08dz60: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: lpc32xx: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: lp3943: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: kempld: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: iop: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: generic: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: ge: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: f7188x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: ep93xx: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: dln2: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: da9055: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: da9052: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: cs5535: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: crystalcove: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: clps711x: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: bcm-kona: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: arizona: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: adp5588: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: adp5520: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: adnp: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: 74xx-mmio: Use devm_gpiochip_add_data() for gpio registration
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>
8 years agogpio: Add missing devm_gpio_ wrapper in devres.txt
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>