GitHub/moto-9609/android_kernel_motorola_exynos9610.git
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>
8 years agogpio: Add resource management devm_gpio_chip_{add_data,remove}
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>
8 years agogpio: Add devm_ apis for gpiochip_add_data and gpiochip_remove
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>
8 years agoMerge remote-tracking branch 'linusw-gpio/for-next' into devm_gpiochip
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().

8 years agoShare upstreaming patches
ldewangan [Tue, 23 Feb 2016 14:03:35 +0000 (19:33 +0530)]
Share upstreaming patches

Share multiple bulk changes.

8 years agotools: gpio: Small updates for output format
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>
8 years agoMerge branch 'devel' into for-next
Linus Walleij [Mon, 22 Feb 2016 12:47:49 +0000 (13:47 +0100)]
Merge branch 'devel' into for-next

8 years agogpio: fixup line flags for userspace ABI
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>
8 years agoRevert "gpio: remove broken irq_to_gpio() interface"
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.

8 years agogpiolib: fix crash when gpiochip removed
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>
8 years agogpio: pisosr: add missing unlock
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>
8 years agogpio: X-Gene standby GPIO controller DTS binding
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>
8 years agogpio: xgene: Enable X-Gene standby GPIO as interrupt controller
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>
8 years agoMIPS: txx9: rbtx4938: switch to gpiochip_add_data()
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>
8 years agoMIPS: txx9: iocled: use gpiochip data pointer
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>
8 years agoMIPS: rb532: use gpiochip data pointer
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>