Commit graph

616072 commits

Author SHA1 Message Date
Agrawal, Nitesh-kumar e084448b5d pinctrl/amd: switch to using a bool for level
The earlier patch can be simplified by using a bool
to indicate level trigger.

Reviewed-by: Pankaj Sen <Pankaj.Sen@amd.com>
Signed-off-by: Nitesh Kumar Agrawal <Nitesh-kumar.Agrawal@amd.com>
[Fixup to earlier manually applied patch]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-13 10:24:37 +02:00
Alexandre TORGUE 0eb9f68333 pinctrl: Add IRQ support to STM32 gpios
This patch adds IRQ support to STM32 gpios.

The EXTI controller has 16 lines dedicated to GPIOs.
EXTI line n can be connected to only line n of one of the GPIO ports, for
example EXTI0 can be connected to either PA0, or PB0, or PC0...
This port selection is done by specifying the port number into System
Config registers.

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-13 10:13:01 +02:00
Alexandre TORGUE 23fb16194b pinctrl: Add IRQ related DT properties of STM32 pinctrl
Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-13 10:10:51 +02:00
Vladimir Zapolskiy 4c806c9891 gpio: mxc: add generic gpio request/free callbacks to pinctrl
If a GPIO controller description in board DTB contains information
about mappings between GPIOs and pads under IOMUX control use it to
request and free GPIOs with respect to pinctrl/pinmux subsystems.

One of immediate positive functional changes is inability to
request non-existing GPIOs, i.e. if there is no pad such. Also
pinctrl/pinmux may now properly account pads occupied by requested
GPIOs.

The change has no effect, if "gpio-ranges" property is not found
including the case if a board has no DTB firmware.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-12 14:28:59 +02:00
Vladimir Zapolskiy e188cbf756 gpio: mxc: shift gpio_mxc_init() to subsys_initcall level
In general situation on-SoC GPIO controller drivers should be probed
after pinctrl/pinmux controller driver, because on-SoC GPIOs utilize a
pin/pad as a resource provided and controlled by pinctrl subsystem.

This is stated in multiple places, e.g. from drivers/Makefile:

  GPIO must come after pinctrl as gpios may need to mux pins etc

Looking at Freescale iMX SoC series specifics, imx*_pinctrl_init()
functions are called at arch_initcall and postcore_initcall init
levels, so the change of initcall level for gpio-mxc driver from
postcore_initcall to subsys_initcall level is sufficient. Also note
that the most of GPIO controller drivers settled at subsys_initcall
level.

If pinctrl subsystem manages pads with GPIO functions, the change is
needed to avoid unwanted driver probe deferrals during kernel boot.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-12 14:27:41 +02:00
Vladimir Zapolskiy 430be10dd3 pinctrl: imx: accept gpio request/free from pinctrl
While only Freescale Vybrid SoC has settings of GPIO capabilities done
by iomux controller, it is only a matter of GPIO controller driver
implementation for the rest of Freescale/NXP SoCs from iMX series.

As a practical example on GPIO request a pad function should be
switched to GPIO, but because this requires updates to all particular
iMX pinctrl drivers, for simplicity at the moment add only a proper
connection between shared pinctrl-imx and pinctrl/pinmux core, namely
.gpio_request_enable/.gpio_disable_free/.gpio_set_direction callbacks
should return success to a caller. This change allows to progress by
adding request/free callbacks into gpio-mxc.c driver.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-12 14:25:52 +02:00
Marc Zyngier 5803348cfc pinctrl/at91: Don't provide a default trigger type
at91 used to set a default trigger type for GPIO interrupts in
order to cope with the old board files. These days are long gone,
and it all gets probed through DT.

Andras Szemzo reported that the Ethernet device on his board was
bailing to be probed, due to a conflict in interrupt trigger.
Surely enough, this is due to this default trigger still being
present, and turning this into a IRQ_TYPE_NONE fixes the issue.

Reported-by: Andras Szemzo <szemzo.andras@gmail.com>
Tested-by: Andras Szemzo <szemzo.andras@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-12 14:17:02 +02:00
Milo Kim 66cd89df8c pinctrl: sunxi: Remove unsupported PWM channel pinmux in H3
H3 has single PWM channel. The second PWM channel is not supported,
so the pinctrl function should be removed.

Signed-off-by: Milo Kim <woogyom.kim@gmail.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-08 01:08:23 +02:00
Julia Lawall 5fe2501fbf pinctrl: bcm281xx: constify pinctrl_ops and pinmux_ops structures
Check for pinctrl_ops and pinmux_ops structures that are only stored in the
pctlops field and the pmxops field, respectively, of a pinctrl_desc
structure.  These fields are declared const, so pinctrl_ops and pinmux_ops
structures that have this property can be declared as const also.

The semantic patch that makes this change in the pinctrl_ops is as
follows.  The pinmux_ops case is similar.  (http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct pinctrl_ops i@p = { ... };

@ok@
identifier r.i;
struct pinctrl_desc e;
position p;
@@
e.pctlops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct pinctrl_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct pinctrl_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 22:41:30 +02:00
Julia Lawall c87da270c1 pinctrl: nsp: constify pinctrl_ops and pinmux_ops structures
Check for pinctrl_ops and pinmux_ops structures that are only stored in the
pctlops field and the pmxops field, respectively, of a pinctrl_desc
structure.  These fields are declared const, so pinctrl_ops and pinmux_ops
structures that have this property can be declared as const also.

The semantic patch that makes this change in the pinctrl_ops is as
follows.  The pinmux_ops case is similar.  (http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct pinctrl_ops i@p = { ... };

@ok@
identifier r.i;
struct pinctrl_desc e;
position p;
@@
e.pctlops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct pinctrl_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct pinctrl_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 22:40:40 +02:00
Julia Lawall f3b4b7c48e pinctrl: ns2: constify pinctrl_ops and pinmux_ops structures
Check for pinctrl_ops and pinmux_ops structures that are only stored in the
pctlops field and the pmxops field, respectively, of a pinctrl_desc
structure.  These fields are declared const, so pinctrl_ops and pinmux_ops
structures that have this property can be declared as const also.

The semantic patch that makes this change in the pinctrl_ops is as
follows.  The pinmux_ops case is similar.  (http://coccinelle.lip6.fr/)

// <smpl>
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct pinctrl_ops i@p = { ... };

@ok@
identifier r.i;
struct pinctrl_desc e;
position p;
@@
e.pctlops = &i@p;

@bad@
position p != {r.p,ok.p};
identifier r.i;
struct pinctrl_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct pinctrl_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 22:39:44 +02:00
Agrawal, Nitesh-kumar 499c7196dd pinctrl/amd: Configure GPIO register using BIOS settings
In the function amd_gpio_irq_set_type, use the settings provided by
the BIOS,when the LevelTrig is Edge and activeLevel is HIGH, to configure
the GPIO registers. Ignore the settings from client.

Reviewed-by: Pankaj Sen <Pankaj.Sen@amd.com>
Signed-off-by:Nitesh Kumar Agrawal <Nitesh-kumar.Agrawal@amd.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 21:48:16 +02:00
Mylène Josserand ac91ab51e4 pinctrl: sunxi: Add GR8 controller support
Just like the other member of the sunxi family, let's add a pinctrl table
for the muxing options.

Signed-off-by: Mylène Josserand <mylene.josserand@free-electrons.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 21:15:49 +02:00
Andrew Jeffery 56e57cb6c0 pinctrl: Add pinctrl-aspeed-g5 driver
A small subset of pins and functions are exposed. The selection of pins
and functions is driven by the development of OpenBMC[1] on the
AST2500 SoC, particularly around booting the IBM Witherspoon platform.

[1] https://github.com/openbmc/docs

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 16:53:37 +02:00
Andrew Jeffery 524594d401 pinctrl: Add pinctrl-aspeed-g4 driver
A subset of the pins and functions are exposed. The selection of
functions and pins is driven by the development of OpenBMC[1] on the
AST2400 SoC, particularly around booting the OpenPOWER Palmetto
development machine.

[1] https://github.com/openbmc/docs

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 16:51:49 +02:00
Andrew Jeffery 4d3d0e4272 pinctrl: Add core support for Aspeed SoCs
The Aspeed SoCs typically provide more than 200 pins for GPIO and other
functions. The signal enabled on a pin is determined on a priority
basis, where a given pin can provide a number of different signal types.

In addition to the priority levels, the Aspeed pin controllers describe
the signal active on a pin by compound logical expressions involving
multiple operators, registers and bits. Some difficulty arises as a
pin's function bit masks for each priority level are frequently not the
same (i.e. we cannot just flip a bit to change from a high to low
priority signal), or even in the same register(s). Some configuration
bits affect multiple pins, while in other cases the signals for a bus
must each be enabled individually.

Together, these features give rise to some complexity in the
implementation. A more complete description of the complexities is
provided in the associated header file.

The patch doesn't implement pinctrl/pinmux/pinconf for any particular
Aspeed SoC, rather it adds the framework for defining pinmux
configurations.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 16:48:22 +02:00
Andrew Jeffery 5f714700b1 pinctrl: dt-bindings: Add documentation for Aspeed pin controllers
Outline expectations on the pin controller's relationship with the
System Control Unit (SCU) IP through syscon, and document the compatible
strings for 4th and 5th generation Aspeed SoC pin controllers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 16:39:15 +02:00
Martin Blumenstingl 29885a6565 pinctrl: meson-gxbb: add the pins for the SDIO/sd_emmc_a controller
sd_emmc_a is used a controller for the SDIO modules. This adds the pin
configuration for the SDIO controller.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-07 16:23:49 +02:00
Daniel Glöckner b8d74b291f pinctrl: zynq: fix typo in sdio1_3_grp pin list
It contains pin 50 instead of pin 40.

Signed-off-by: Daniel Glöckner <dg@emlix.com>
Reviewed-by: Sören Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-06 00:49:00 +02:00
Linus Walleij 571319f1f1 pinctrl: sh-pfc: Add support for R-Car M3-W
Add initial support for the Pin Function Controller on the Renesas R-Car
 M3-W SoC:
   - Basic definitions,
   - SCIF (serial) pins, groups and functions,
   - SDHI pins, groups and functions.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXvFVNAAoJEEgEtLw/Ve771BMP/1p930YUwuMX8CtIMDP11WH1
 7NkmaCYj6qQwUyBGeLgyJrIyXx4bFuHvk66li4THk6/gDHLir9GeowcZY0K4XX7Q
 zHaudb6qUJPkAcWBnfRVKaNcMcd2sU2lTBauqdv40fyTT9kQ25pn4VTykAqTrPtp
 g0VX9vFpXCIkPX+fsM3n1bGqUYW3igKl86zUx/Gd0YokUYZV0Om8jjrkSNbiK1rO
 QSC89sXbBsazg90dQy6chkmpVUjcSFqECx1EiDmHXAm6eJL450YSy8CIMZ9HH6lL
 gog6dQlY+IiC7kxoXxLrR15KwJSEYgzp9marnxzDpX1Nup0Mz6Wm5bBVWfSm/06J
 9z6wYLAS2r1hfrpkY4VD8bsl4SmbECVDsUNVZe5QZyQo/GwEBc0h3WVVKrmp8pGD
 /2kTgftaKkHWRAgHAIibJwA41t+snbwafqVPuFVwDGE7VOFfATV32Jol0m6rjcPK
 40Y8AhNllDiVkiC6qblPT6L/JQlazSONeXulqFfSIgZHdx+/eBYqtfbUXccaGcku
 Bskit03nVitrwFyHlwzDAuL9QQc2uuWCPnRge6oB2ijgcM+zTg3splweYAFVBLYt
 H6EOlZrMZfdBLisOCPeGClFzk76L6XLsIowFTGVVYVpdFezwco8hPlnBl52/kiWC
 1f8R4Yx/Z3wCXRn7ggL3
 =AS9G
 -----END PGP SIGNATURE-----

Merge tag 'sh-pfc-for-v4.9-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Add support for R-Car M3-W

Add initial support for the Pin Function Controller on the Renesas R-Car
M3-W SoC:
  - Basic definitions,
  - SCIF (serial) pins, groups and functions,
  - SDHI pins, groups and functions.
2016-09-06 00:25:36 +02:00
Vladimir Zapolskiy a2d16a2183 pinctrl: imx: output one pin/config pair per line in pinconf-groups
cat /sys/kernel/debug/pinctrl/${pinctrl}/pinconf-groups output is
hardly readable, if a pin group contains more than one pin the output
is glued and looks like this:

  MX6Q_PAD_SD1_DAT0: 0x17071MX6Q_PAD_SD1_CMD: 0x17071MX6Q_PAD_SD1_CLK: 0x17071

Add two space indentation and a new line separator to improve
readability of the output.

Signed-off-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-09-06 00:18:10 +02:00
Paul Gortmaker a9784e56aa pinctrl: sirf: make core support explicitly non-modular
The Makefile currently controlling compilation of this code is:

  drivers/pinctrl/sirf/pinctrl-sirf.o
      --> drivers/pinctrl/sirf/Makefile:obj-y += pinctrl-sirf.o

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Rongjun Ying <rongjun.ying@csr.com>
Cc: Yuping Luo <yuping.luo@csr.com>
Cc: Barry Song <baohua@kernel.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-27 13:16:12 +02:00
Paul Gortmaker 37e70b6a35 pinctrl: sirf: make atlas7 explicitly non-modular
The Makefile currently controlling compilation of this code is:

  drivers/pinctrl/sirf/pinctrl-atlas7.o
    ---> drivers/pinctrl/sirf/Makefile:obj-y += pinctrl-atlas7.o

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

We delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Barry Song <baohua@kernel.org>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-27 13:15:21 +02:00
Paul Gortmaker 2f4362040b pinctrl: rockchip: make it explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/Kconfig:config PINCTRL_ROCKCHIP
drivers/pinctrl/Kconfig:        bool

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

Note that MODULE_DEVICE_TABLE is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>
Cc: linux-gpio@vger.kernel.org
Cc: linux-rockchip@lists.infradead.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-27 13:14:21 +02:00
Paul Gortmaker 6d6cc0d89a pinctrl: nomadik: make core support explicitly non-modular
The Kconfig currently controlling compilation of this code is:

drivers/pinctrl/nomadik/Kconfig:config PINCTRL_NOMADIK
drivers/pinctrl/nomadik/Kconfig:        bool "Nomadik pin controller driver"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

We delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-27 13:13:32 +02:00
Paul Gortmaker 8b51fad0e9 pinctrl: nomadik: make abx500 explicitly non-modular
The Kconfig currently controlling compilation of this code is:

 config PINCTRL_ABX500
       bool "ST-Ericsson ABx500 family Mixed Signal Circuit gpio functions"

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

Note that MODULE_ALIAS is a no-op for non-modular code.

We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alessandro Rubini <rubini@unipv.it>
Cc: Patrice Chotard <patrice.chotard@st.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-27 13:12:44 +02:00
Paul Gortmaker 4394a63933 pinctrl: mediatek: make mtk-common explicitly non-modular
The Makefile currently controlling compilation of this code is:

  drivers/pinctrl/mediatek/pinctrl-mtk-common.o
    ---> drivers/pinctrl/mediatek/Makefile:obj-y += pinctrl-mtk-common.o

...meaning that it currently is not being built as a module by anyone.

Lets remove the couple traces of modular infrastructure use, so that
when reading the driver there is no doubt it is builtin-only.

We delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.

We don't replace module.h with init.h since the file doesn't need that.

Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Hongzhou Yang <hongzhou.yang@mediatek.com>
Cc: linux-gpio@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-27 13:11:53 +02:00
Neil Armstrong a9a5a443d8 pinctrl: meson-gxbb: add pins for PWM
Add support for PWM pins, for EE and AO domains.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-24 14:22:39 +02:00
Linus Walleij d30351f521 pinctrl: sh-pfc: Updates for v4.9
- Bias and DU support for R-Car H3,
   - Basic R-Car V2H support,
   - Cleanups and fixes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJXtHlZAAoJEEgEtLw/Ve77Q9kQAKJUnxTqeBQ1IHm0WWcFYIV6
 aw5I8Xl4OgVYYEqmjSDjzSVSrMSITIRaG/1rhMevxNrGFrt4rdMKn6nUllIspIet
 kTffRqTlxFnQ4G3Q25rGtq7PCK7a7L8sQ3FIr+72a+xOn0Wz+EcZHJSe07AH3C7J
 UFczVHc9jj7qRIKDJzVHQ0/xOpiLBK6V6On/gY9jAUlR7B+8XPczzbi/5HjrxWzQ
 YF4wTaDzQlbyCA/CZQt3f4DBQNt7JrgJD5KMzJwGHp7ReP3b2oM81voDh7TXTxxc
 yxdjbgbh2f8DyeSDLg/OfKfG9r2WazaAMU574N+pdBA2b1iqraEv3Uky0UgddHsj
 RXWGFnA8h71zsmNVj5Ov+GC9l0Jy0UXtREeNCzdpW33aUY74yRpd/+Sd5o1/OX+6
 dAJeC/5SNmNEGH4s5aKcv11gciEF8fu8v5WsVYhHaQqibZ+heNH1OPqGyeRnLciy
 GCrzWqeQnyPhzDRPIFGcRq8PnNiJfxBTgcMmo8N+aXA5NY3psULr6d3hEyI+xB6u
 nqhAq2xrtLVTT9rhSp5OagoPe+7PPaHPh+8SYkyaup8wWxqxPfl7YvIuNtjH0ETr
 hjrOZ6CMDAHbFSU83DJbluLTbiJWlVrqhyvbk8dzU/szMWdTyj2ypa5A5TjVElxu
 FtzmHM2VpERP64wRE+wD
 =1SFk
 -----END PGP SIGNATURE-----

Merge tag 'sh-pfc-for-v4.9-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel

pinctrl: sh-pfc: Updates for v4.9

  - Bias and DU support for R-Car H3,
  - Basic R-Car V2H support,
  - Cleanups and fixes.
2016-08-22 15:58:56 +02:00
Martin Blumenstingl 35398f7b38 pinctrl: amlogic: gxbb: add the IR remote input pin
This adds the IR remote receiver to the AO domain devices.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-22 15:51:25 +02:00
LABBE Corentin a1edf87f21 pinctrl: palmas: fix a possible NULL dereference
of_match_device could return NULL, and so cause a NULL pointer
dereference later at line 1009:
pinctrl_data = match->data;

For fixing this problem, we use of_device_get_match_data(), this will
simplify the code a little by using a standard function for
getting the match data.

Reported-by: coverity (CID 1324136)
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-22 14:11:00 +02:00
perr perr 26fecf0b21 pinctrl: exynos: remove duplicate calls in irq handler
Because chained_irq_enter() has already called chip->irq_mask() and
chip->irq_ack(), also chained_irq_exit() will call chip->irq_unmask(),
so it's not necessary to call chip->irq_*() here.

Signed-off-by: Perr Zhang <strongbox8@zoho.com>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
[Hand-edited from whitespace damaged patch]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-22 14:06:29 +02:00
Beniamino Galvani db80f0e158 pinctrl: meson: get rid of unneeded domain structures
The driver originally supported more domains (register ranges) per
pinctrl device, but since commit 9dab1868ec ("pinctrl: amlogic: Make
driver independent from two-domain configuration") each device gets
assigned a single domain and we instantiate multiple pinctrl devices
in the DT.

Therefore, now the 'meson_domain' and 'meson_domain_data' structures
don't have any reason to exist and can be removed to make the model
simpler to understand. This commit doesn't change behavior.

Tested on a Odroid-C2.

Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Acked-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-22 11:21:57 +02:00
Takeshi Kihara 374cf6992d pinctrl: sh-pfc: r8a7796: Add SDHI pins, groups and functions
This patch adds SDHI pins, groups and functions to R8A7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-19 09:37:20 +02:00
Takeshi Kihara fc43d8b217 pinctrl: sh-pfc: r8a7796: Add SCIF pins, groups and functions
This patch adds SCIF{0,1,2,3,4,5} pins, groups and functions to R8A7796
SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-19 09:37:17 +02:00
Takeshi Kihara f9aece7344 pinctrl: sh-pfc: Initial R8A7796 PFC support
This patch adds initial pinctrl driver to support for the R8A7796 SoC.

Signed-off-by: Takeshi Kihara <takeshi.kihara.df@renesas.com>
[uli: rebased on top of renesas-drivers]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-19 09:37:11 +02:00
Laurent Pinchart 7955dac1b7 pinctrl: sh-pfc: r8a7795: Add DU support
Only the DU parallel RGB output signals are included, HDMI and TCON pins
will be added in separate groups.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-16 10:30:43 +02:00
Patrice Chotard 1e23437563 pinctrl: st: Use second parameter to gpio specifier
This patch allows to use the second parameter of gpio
specifier, which is used to specify whether the gpio is
active high or low.

Simply remove specific of_xlate callback() and of_gpio_n_cells
and use default one set by of_gpiochip_add() which allows
to use second parameter gpio specifier.

Signed-off-by: Maxime Coquelin <maxime.coquelin@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-11 16:05:45 +02:00
Julia Lawall 0f9d85b7ac pinctrl: nomadik: use of_property_read_bool
Use of_property_read_bool to check for the existence of a property.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,x;
@@
-	if (of_get_property(e1,e2,NULL))
-		x = true;
-	else
-		x = false;
+	x = of_property_read_bool(e1,e2);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-11 13:53:01 +02:00
Stephen Boyd 647dbd1e84 pinctrl: qcom: Add generic ssbi and spmi GPIO/MPP bindings
The drivers don't really need to know which PMIC they're for, so
make a generic binding for them. This alleviates us from updating
the drivers every time a new PMIC comes out. It's still
recommended that we update the binding with new PMIC models and
always specify the specific model for the MPPs and gpios before
the generic compatible string in devicetree, but this at least
cuts down on adding more and more compatible strings to the
drivers until we actually need them.

Cc: <devicetree@vger.kernel.org>
Acked-by: "Ivan T. Ivanov" <iivanov.xz@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-11 10:18:46 +02:00
Marcus Cooper 2e47707918 pinctrl: sun6i: add SPDIF to pin description.
Add the SPDIF mux functionality to the pinctrl for the Allwinner A31
SoC.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-11 10:15:43 +02:00
Sergei Shtylyov 2b84bf8929 pinctrl: sh-pfc: r8a7792: Add DU pin groups
Add DU pin groups to the R8A7792 PFC driver.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 14:32:03 +02:00
Sergei Shtylyov 7dd74bb1f0 pinctrl: sh-pfc: r8a7792: Add VIN pin groups
Add VIN[0-5] pin groups to the R8A7792 PFC driver.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[geert: Fix VI1_D14_G6_Y6 and VI1_D15_G7_Y7 pins]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 14:32:03 +02:00
Geert Uytterhoeven adc9ad09f7 pinctrl: sh-pfc: r8a7795: Correct header from R-Car Gen3 to R8A7795
This source file handles r8a7795 only, which is not the sole member of
the R-Car Gen3 family.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
2016-08-08 14:30:28 +02:00
Sergei Shtylyov 37d0d275bd pinctrl: sh-pfc: r8a7792: Add CAN pin groups
Add CAN0/1 data/clock pin groups to R8A7792 PFC driver.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 12:34:18 +02:00
Sergei Shtylyov 1373eeeb3e pinctrl: sh-pfc: r8a7792: Add SDHI pin groups
Add SDHI0 pin groups to the R8A7792 PFC driver.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 12:33:47 +02:00
Sergei Shtylyov 2e67216c8c pinctrl: sh-pfc: r8a7792: Add EtherAVB pin groups
Add the EtherAVB pin groups to the R8A7792 PFC driver.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 12:33:46 +02:00
Sergei Shtylyov 2cf59e0c20 pinctrl: sh-pfc: Add R8A7792 PFC support
Add the PFC support for the R8A7792 SoC including pin groups for some
on-chip devices such as SCIF, INTC, and LBSC...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[geert: s/LSBC/LBSC/]
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 12:33:38 +02:00
Sergei Shtylyov e729bbc19e pinctrl: sh-pfc: Fix overly long lines
The PORT_GP_CFG_<n>() macros take up more than 80 columns -- and not for
a good reason. Make the header file checkpatch.pl-proof at least in this
respect...

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 12:00:18 +02:00
Ulrich Hecht 560655247b pinctrl: sh-pfc: r8a7795: Add bias pinconf support
Implements pull-up and pull-down. On this SoC there is no simple mapping of
GP pins to bias register bits, so we need a table.

Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
2016-08-08 12:00:18 +02:00