]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
8 years agogpio: xilinx: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:20:17 +0000 (15:20 +0100)]
gpio: xilinx: 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: Michal Simek <michal.simek@xilinx.com>
Cc: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: xgene: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:16:50 +0000 (15:16 +0100)]
gpio: xgene: 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: Feng Kan <fkan@apm.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: wm8994: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:15:30 +0000 (15:15 +0100)]
gpio: wm8994: 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: patches@opensource.wolfsonmicro.com
Cc: Mark Brown <broonie@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: wm8350: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:13:39 +0000 (15:13 +0100)]
gpio: wm8350: 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: patches@opensource.wolfsonmicro.com
Cc: Mark Brown <broonie@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: wm831x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:11:34 +0000 (15:11 +0100)]
gpio: wm831x: 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: patches@opensource.wolfsonmicro.com
Cc: Mark Brown <broonie@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: vx855: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:09:57 +0000 (15:09 +0100)]
gpio: vx855: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: viperboard: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:08:00 +0000 (15:08 +0100)]
gpio: viperboard: 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: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: vf610: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:03:30 +0000 (15:03 +0100)]
gpio: vf610: 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: Stefan Agner <stefan@agner.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: ucb1400: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 14:01:14 +0000 (15:01 +0100)]
gpio: ucb1400: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tz1090: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:58:56 +0000 (14:58 +0100)]
gpio: tz1090: 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: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tz1090-pdc: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:57:25 +0000 (14:57 +0100)]
gpio: tz1090-pdc: 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: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: twl4030: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:55:07 +0000 (14:55 +0100)]
gpio: twl4030: 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: Roger Quadros <rogerq@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: ts5500: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:52:55 +0000 (14:52 +0100)]
gpio: ts5500: 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().

Acked-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tps65912: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:50:42 +0000 (14:50 +0100)]
gpio: tps65912: 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: Nicolas Saenz Julienne <nicolassaenzj@gmail.com>
Cc: Margarita Olaya <magi@slimlogic.co.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tps65910: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:48:49 +0000 (14:48 +0100)]
gpio: tps65910: 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().

Acked-By: Rhyland Klein <rklein@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tps6586x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:46:45 +0000 (14:46 +0100)]
gpio: tps6586x: 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().

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: timberdale: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:43:28 +0000 (14:43 +0100)]
gpio: timberdale: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tc3589x: use gpiochip data pointer
Linus Walleij [Thu, 3 Dec 2015 14:37:29 +0000 (15:37 +0100)]
gpio: tc3589x: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: tb10x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:41:02 +0000 (14:41 +0100)]
gpio: tb10x: 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: Christian Ruppert <christian.ruppert@abilis.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: syscon: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:38:36 +0000 (14:38 +0100)]
gpio: syscon: 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: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: sx150x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:36:31 +0000 (14:36 +0100)]
gpio: sx150x: 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: Wei Chen <Wei.Chen@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: stp-xway: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:34:33 +0000 (14:34 +0100)]
gpio: stp-xway: 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: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: stmpe: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:32:13 +0000 (14:32 +0100)]
gpio: stmpe: 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: Bhupesh Sharma <bhupesh.sharma@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: sta2x11: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:29:48 +0000 (14:29 +0100)]
gpio: sta2x11: 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: Alessandro Rubini <rubini@gnudd.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: spear-spics: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:26:58 +0000 (14:26 +0100)]
gpio: spear-spics: 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: Shiraz Hashim <shiraz.linux.kernel@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: sch311x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:24:24 +0000 (14:24 +0100)]
gpio: sch311x: 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().

Acked-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: sch: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:21:49 +0000 (14:21 +0100)]
gpio: sch: 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: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: samsung: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:19:19 +0000 (14:19 +0100)]
gpio: samsung: 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: Paul Bolle <pebolle@tiscali.nl>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: rdc321x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:16:19 +0000 (14:16 +0100)]
gpio: rdc321x: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: rcar: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:12:45 +0000 (14:12 +0100)]
gpio: rcar: 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: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: rc5t583: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 13:08:12 +0000 (14:08 +0100)]
gpio: rc5t583: 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().

Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pxa: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:42:22 +0000 (11:42 +0100)]
gpio: pxa: 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: Daniel Mack <zonque@gmail.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pl061: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:37:33 +0000 (11:37 +0100)]
gpio: pl061: 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: Haojian Zhuang <haojian.zhuang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pch: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:34:53 +0000 (11:34 +0100)]
gpio: pch: 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: Thierry Reding <treding@nvidia.com>
Cc: Daniel Krueger <daniel.krueger@systec-electronic.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pcf857x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:24:05 +0000 (11:24 +0100)]
gpio: pcf857x: 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: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: George Cherian <george.cherian@ti.com>
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pca953x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:20:54 +0000 (11:20 +0100)]
gpio: pca953x: 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: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Markus Pargmann <mpa@pengutronix.de>
Cc: Toby Smith <toby@tismith.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: palmas: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:18:17 +0000 (11:18 +0100)]
gpio: palmas: 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: Andrew Chew <achew@nvidia.com>
Cc: Stephen Warren <swarren@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: omap: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:16:00 +0000 (11:16 +0100)]
gpio: omap: 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: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Tony Lindgren <tony@atomide.com>
Acked-by: Santosh Shilimkar <ssantosh@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: octeon: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:13:27 +0000 (11:13 +0100)]
gpio: octeon: 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().

Reviewed-by: David Daney <david.daney@cavium.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mvebu: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 10:09:24 +0000 (11:09 +0100)]
gpio: mvebu: 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: Gregory CLEMENT <gregory.clement@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: msic: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:37:39 +0000 (10:37 +0100)]
gpio: msic: 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().

Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mpc8xxx: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:34:28 +0000 (10:34 +0100)]
gpio: mpc8xxx: 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: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mpc5200: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:25:36 +0000 (10:25 +0100)]
gpio: mpc5200: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mm-lantiq: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:19:29 +0000 (10:19 +0100)]
gpio: mm-lantiq: 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: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: ml-ioh: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:12:05 +0000 (10:12 +0100)]
gpio: ml-ioh: 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: Feng Tang <feng.tang@intel.com>
Cc: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mcp: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:09:36 +0000 (10:09 +0100)]
gpio: mcp: 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: Sonic Zhang <sonic.zhang@analog.com>
Acked-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mc9s08dz60: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:07:07 +0000 (10:07 +0100)]
gpio: mc9s08dz60: 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: wu guoxing <b39297@freescale.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mc33880: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:04:32 +0000 (10:04 +0100)]
gpio: mc33880: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: mb86s7x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 09:01:36 +0000 (10:01 +0100)]
gpio: mb86s7x: 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().

Acked-By: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: max732x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:58:28 +0000 (09:58 +0100)]
gpio: max732x: 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: Nicholas Krause <xerofoify@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Semen Protsenko <semen.protsenko@globallogic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: max730x: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:27:05 +0000 (09:27 +0100)]
gpio: max730x: 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: Roland Stigge <stigge@antcom.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: lynxpoint: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:21:55 +0000 (09:21 +0100)]
gpio: lynxpoint: 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: Mathias Nyman <mathias.nyman@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: lpc32xx: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:18:23 +0000 (09:18 +0100)]
gpio: lpc32xx: 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: Roland Stigge <stigge@antcom.de>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: lpc18xx: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:13:57 +0000 (09:13 +0100)]
gpio: lpc18xx: 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().

Acked-by: Joachim Eastwood <manabian@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: lp3943: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:10:13 +0000 (09:10 +0100)]
gpio: lp3943: 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: Milo Kim <milo.kim@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: kempld: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:06:22 +0000 (09:06 +0100)]
gpio: kempld: 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: Brunner Michael <Michael.Brunner@kontron.com>
Cc: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: it87: use gpiochip data pointer
Linus Walleij [Mon, 7 Dec 2015 08:03:09 +0000 (09:03 +0100)]
gpio: it87: 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: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: intel-mid: use gpiochip data pointer
Linus Walleij [Sun, 6 Dec 2015 09:55:28 +0000 (10:55 +0100)]
gpio: intel-mid: 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: David Cohen <david.a.cohen@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: f7188: use gpiochip data pointer
Linus Walleij [Sun, 6 Dec 2015 09:51:13 +0000 (10:51 +0100)]
gpio: f7188: 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: Andreas Bofjall <andreas@gazonk.org>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: em: use gpiochip data pointer
Linus Walleij [Sat, 5 Dec 2015 23:36:39 +0000 (00:36 +0100)]
gpio: em: 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: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: dln2: use gpiochip data pointer
Linus Walleij [Sat, 5 Dec 2015 23:32:16 +0000 (00:32 +0100)]
gpio: dln2: 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: Octavian Purdila <octavian.purdila@intel.com>
Cc: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: davinci: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 15:25:04 +0000 (16:25 +0100)]
gpio: davinci: 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: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: da9055: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 15:21:53 +0000 (16:21 +0100)]
gpio: da9055: 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: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: da9052: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 15:19:52 +0000 (16:19 +0100)]
gpio: da9052: 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: Ashish Jangam <ashish.jangam@kpitcummins.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: cs5535: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:53:04 +0000 (15:53 +0100)]
gpio: cs5535: 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: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: crystalcove: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:47:54 +0000 (15:47 +0100)]
gpio: crystalcove: 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: Shobhit Kumar <shobhit.kumar@intel.com>
Cc: Zhu, Lejun <lejun.zhu@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: bt8xx: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:44:16 +0000 (15:44 +0100)]
gpio: bt8xx: 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: Michael Buesch <m@bues.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: bcm-kona: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:39:50 +0000 (15:39 +0100)]
gpio: bcm-kona: 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: Markus Mayer <markus.mayer@linaro.org>
Cc: Tim Kryger <tim.kryger@linaro.org>
Cc: Matt Porter <matt.porter@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: ath79: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:36:14 +0000 (15:36 +0100)]
gpio: ath79: 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().

Acked-by: Alban Bedel <albeu@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: arizona: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:31:31 +0000 (15:31 +0100)]
gpio: arizona: 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: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Cc: Mark Brown <broonie@kernel.org>
Reviewed-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: amdpt: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:29:41 +0000 (15:29 +0100)]
gpio: amdpt: 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: YD Tseng <ltyu101@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: amd8111: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:26:35 +0000 (15:26 +0100)]
gpio: amd8111: 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: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: altera: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:16:43 +0000 (15:16 +0100)]
gpio: altera: 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: Tien Hock Loh <thloh@altera.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: adp5588: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:05:34 +0000 (15:05 +0100)]
gpio: adp5588: 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: Jean-Francois Dagenais <jeff.dagenais@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: adp5520: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 14:01:50 +0000 (15:01 +0100)]
gpio: adp5520: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: adnp: use gpiochip data pointer
Linus Walleij [Fri, 4 Dec 2015 13:56:15 +0000 (14:56 +0100)]
gpio: adnp: 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().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: 74x164: use gpiochip data pointer
Linus Walleij [Thu, 3 Dec 2015 17:20:29 +0000 (18:20 +0100)]
gpio: 74x164: 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: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: 104-idio-16: use gpiochip data pointer
Linus Walleij [Thu, 3 Dec 2015 17:18:06 +0000 (18:18 +0100)]
gpio: 104-idio-16: 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().

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: 104-idi-48: use gpiochip data pointer
Linus Walleij [Thu, 3 Dec 2015 14:31:48 +0000 (15:31 +0100)]
gpio: 104-idi-48: 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().

Acked-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: generic: factor into gpio_chip struct
Linus Walleij [Fri, 4 Dec 2015 13:02:58 +0000 (14:02 +0100)]
gpio: generic: factor into gpio_chip struct

The separate struct bgpio_chip has been a pain to handle, both
by being confusingly similar in name to struct gpio_chip and
for being contained inside a struct so that struct gpio_chip
is contained in a struct contained in a struct, making several
steps of dereferencing necessary.

Make things simpler: include the fields directly into
<linux/gpio/driver.h>, #ifdef:ed for CONFIG_GENERIC_GPIO, and
get rid of the <linux/basic_mmio_gpio.h> altogether. Prefix
some of the member variables with bgpio_* and add proper
kerneldoc while we're at it.

Modify all users to handle the change and use a struct
gpio_chip directly. And while we're at it: replace all
container_of() dereferencing by gpiochip_get_data() and
registering the gpio_chip with gpiochip_add_data().

Cc: arm@kernel.org
Cc: Alexander Shiyan <shc_work@mail.ru>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Nicolas Pitre <nicolas.pitre@linaro.org>
Cc: Olof Johansson <olof@lixom.net>
Cc: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Cc: Rabin Vincent <rabin@rab.in>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Cc: bcm-kernel-feedback-list@broadcom.com
Acked-by: Gregory Fong <gregory.0xf0@gmail.com>
Acked-by: Liviu Dudau <Liviu.Dudau@arm.com>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: of: provide optional of_mm_gpiochip_add_data() function
Linus Walleij [Fri, 4 Dec 2015 14:13:53 +0000 (15:13 +0100)]
gpio: of: provide optional of_mm_gpiochip_add_data() function

In the same spirit as we add an optional void *data argument
to the gpiochip_add_data() call, we need this also for
of_mm_gpiochip_add().

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: add a data pointer to gpio_chip
Linus Walleij [Thu, 3 Dec 2015 14:14:13 +0000 (15:14 +0100)]
gpio: add a data pointer to gpio_chip

This adds a void * pointer to gpio_chip so that driver can
assign and retrieve some states. This is done to get rid of
container_of() calls for gpio_chips embedded inside state
containers, so we can remove the need to have the gpio_chip
or later (planned) struct gpio_device be dynamically allocated
at registration time, so that its struct device can be properly
reference counted and not bound to its parent device (e.g.
a platform_device) but instead live on after unregistration
if it is opened by e.g. a char device or sysfs.

The data is added with the new function gpiochip_add_data()
and for compatibility we add static inline wrapper function
gpiochip_add() that will call gpiochip_add_data() with
NULL as argument. The latter will be removed once we have
exorcised gpiochip_add() from the kernel.

gpiochip_get_data() is added as a static inline accessor
for drivers to quickly get their data out.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: pxa: checking IS_ERR() instead of NULL
Dan Carpenter [Tue, 5 Jan 2016 09:56:37 +0000 (12:56 +0300)]
gpio: pxa: checking IS_ERR() instead of NULL

irq_domain_add_legacy() returns NULL on error, it doesn't return error
pointers.

Fixes: 384ca3c6a28d ('gpio: pxa: change the interrupt management')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: generic: fix signedness bug found by cppcheck
Linus Walleij [Tue, 5 Jan 2016 10:13:28 +0000 (11:13 +0100)]
gpio: generic: fix signedness bug found by cppcheck

cppcheck reports this:

(style) int result is returned as long value. If the return
value is long to avoid loss of information, then you have
loss of information.

This can be fixed with (1UL << pin) but that is the same
as using <linux/bitops.h> that already use 1UL so take
this approach.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agofbdev: via-gpio: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 22:03:02 +0000 (23:03 +0100)]
fbdev: via-gpio: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: qcom: fix up errorpath
Linus Walleij [Tue, 5 Jan 2016 09:23:28 +0000 (10:23 +0100)]
pinctrl: qcom: fix up errorpath

This fixes up:
commit 464231fb1fb1360399a2eb11479c47e39facb030
"pinctrl: ssbi-gpio: Be sure to clamp return value"
commit b9164f049339006fafe8a52396e0f1997552214a
"gpio: ssbi-mpp: Be sure to clamp return value"
as I managed to screw up some of the logic when clamping
the return values.

Cc: Björn Andersson <bjorn@kryo.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpiolib: always initialize *flags from of_get_named_gpio_flags
Arnd Bergmann [Fri, 1 Jan 2016 22:40:46 +0000 (23:40 +0100)]
gpiolib: always initialize *flags from of_get_named_gpio_flags

The of_get_named_gpio_flags() function does nothing other than returning
an error when CONFIG_OF_GPIO is disabled, but that causes spurious
warnings about possible use of uninitialized variables in any code that
does not check the of_get_named_gpio_flags() return value before trying
to use the flags:

drivers/input/misc/rotary_encoder.c: In function 'rotary_encoder_probe':
drivers/input/misc/rotary_encoder.c:223:28: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/power/bq24735-charger.c: In function 'bq24735_charger_probe':
drivers/power/bq24735-charger.c:227:12: warning: 'flags' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/power/sbs-battery.c: In function 'sbs_probe':
drivers/power/sbs-battery.c:782:17: warning: 'gpio_flags' may be used uninitialized in this function [-Wmaybe-uninitialized]

This changes the behavior of the inline helper to set the flags to zero
when OF_GPIO is disabled, to avoid the warnings. In all cases I've
encountered, we don't actually get to the place that uses the flags
if CONFIG_OF is disabled because we won't enter the DT parser code.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: fix warning about iterator
Sudip Mukherjee [Sun, 27 Dec 2015 13:36:50 +0000 (19:06 +0530)]
gpio: fix warning about iterator

We were getting build warning about "iterator" being used uninitialized.
Use iterator properly to fix the build warning and in the process remove
the variable "pos" which is not required now.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: update gpiochip .get() callback description
Vladimir Zapolskiy [Tue, 22 Dec 2015 14:37:28 +0000 (16:37 +0200)]
gpio: update gpiochip .get() callback description

Since gpiochip .get() callback may return a negative error value, it
strictly limits the range of possible non-error returned values to
a subset of [30:0] bitmask, however on practice on success all
gpiochip drivers return either 0 for low signal or 1 for high signal,
this is assured by "gpio: *: Be sure to clamp return value" series of
changes. To avoid any confusion, misinterpretation and potential
errors while developing gpiochip drivers in future convert this
implicit assumption to a mandatory rule.

For output signals with unknown output signal state gpiochip drivers
should return a negative error instead of 0.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agoRevert "gpio: revert get() to non-errorprogating behaviour"
Linus Walleij [Mon, 21 Dec 2015 22:10:12 +0000 (23:10 +0100)]
Revert "gpio: revert get() to non-errorprogating behaviour"

This reverts commit 45ad7db90b42555c8107f18ec6d6a1e9bce34860.

We have fixed all the drivers that were returning ambious values
not clamped to [0,1] or an error code, so return the error
propagating behaviour of the API.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: sunxi: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:40:27 +0000 (16:40 +0100)]
pinctrl: sunxi: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: ssbi-mpp: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:36:17 +0000 (16:36 +0100)]
gpio: ssbi-mpp: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

This code was also double-inverting a bool which makes no sense
so I removed that code and moved clamping toward the end.

Cc: Björn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: ssbi-gpio: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:33:41 +0000 (16:33 +0100)]
pinctrl: ssbi-gpio: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Also, this code was double-inverting a bool. That makes no
sense whatsoever, so I removed the double-invert.

Cc: Björn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: spmi-mpp: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:31:06 +0000 (16:31 +0100)]
pinctrl: spmi-mpp: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Björn Andersson <bjorn.andersson@sonymobile.com>
Cc: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: spmi-gpio: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:29:50 +0000 (16:29 +0100)]
pinctrl: spmi-gpio: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Cc: Björn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: xway: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:28:11 +0000 (16:28 +0100)]
pinctrl: xway: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Pramod Gurav <pramod.gurav@smartplayin.com>
Cc: John Crispin <blogic@openwrt.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: coh901: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:25:11 +0000 (16:25 +0100)]
pinctrl: coh901: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agopinctrl: baytrail: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 15:17:20 +0000 (16:17 +0100)]
pinctrl: baytrail: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: viperboard: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 13:58:52 +0000 (14:58 +0100)]
gpio: viperboard: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
8 years agogpio: ucb1400: Be sure to clamp return value
Linus Walleij [Mon, 21 Dec 2015 13:56:04 +0000 (14:56 +0100)]
gpio: ucb1400: Be sure to clamp return value

As we want gpio_chip .get() calls to be able to return negative
error codes and propagate to drivers, we need to go over all
drivers and make sure their return values are clamped to [0,1].
We do this by using the ret = !!(val) design pattern.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>