summaryrefslogtreecommitdiff
path: root/drivers/gpio
Commit message (Collapse)AuthorAgeFilesLines
* gpio: mpc8xxx: Fixup setting gpio direction outputAxel Lin2016-03-091-2/+1
| | | | | | | | | | | | | | | | | 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>
* gpio: mcp23s08: Add support for mcp23s18Phil Reid2016-03-091-4/+15
| | | | | | | | | | | | | | | | | | | | | 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>
* gpio: add driver for MEN 16Z127 GPIO controllerAndreas Werner2016-03-093-0/+208
| | | | | | | | | | | 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>
* gpio: lp3943: Drop pin_used and lp3943_gpio_request/lp3943_gpio_freeAxel Lin2016-03-091-22/+0
| | | | | | | | | 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>
* gpio: timberdale: Switch to devm_ioremap_resource()Amitoj Kaur Chawla2016-03-081-17/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* gpio: ts4800: Add IMX51 dependencyJulien Grossholtz2016-03-081-0/+1
| | | | | | | | 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>
* Merge branch 'devm-gpiochip-add-data' into develLinus Walleij2016-03-0860-470/+218
|\
| * Merge branch 'devm_gpiochip' of https://github.com/ldewangan/linux-upstream ↵Linus Walleij2016-02-2559-470/+176
| |\ | | | | | | | | | into devm-gpiochip-add-data
| | * gpio: xgene: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: xgene-sb: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-2/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: wm8994: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-14/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * gpio: wm8350: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * gpio: wm8350: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * gpio: vx855: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-11/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: viperboard: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-20/+4
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: ucb1400: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-2/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: twl6040: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-8/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: ts5500: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-6/+3
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and clean the error path. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: ts4800: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-11/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: tps65912: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: tps65910: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: tps6586x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: timberdale Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-3/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: tegra: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * gpio: tc3589x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-11/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: tb10x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-16/+6
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and clean the error path. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: syscon: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: sx150x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-16/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: stp-xway: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: sta2x11: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: spear-spics: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: sch: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: rdc321x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-11/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: rc5t583: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: palmas: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: pcf857x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-7/+3
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and clean the error path. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: pca953x: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-3/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: octeon: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-9/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: mxc: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-4/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and clean the error path. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: mvebu: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-8/+3
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and clean the error path. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: moxart: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: mc9s08dz60: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-12/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: lynxpoint: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-3/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: lpc32xx: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: lp3943: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+2
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: kempld: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: janz-ttl: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-11/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: iop: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: generic: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-10/+1
| | | | | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration and remove the need of driver callback .remove. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
| | * gpio: ge: Use devm_gpiochip_add_data() for gpio registrationLaxman Dewangan2016-02-231-1/+1
| | | | | | | | | | | | | | | | | | Use devm_gpiochip_add_data() for GPIO registration. Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>