summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-st.c
diff options
context:
space:
mode:
authorPatrice Chotard <patrice.chotard@st.com>2016-08-10 15:12:58 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-08-11 16:05:45 +0200
commit1e23437563dd3ad57e30c5d6c29995a982fd649b (patch)
tree34e40500ec9fe7fb17d7dbff5b2f0eddcf1de1b5 /drivers/pinctrl/pinctrl-st.c
parent0f9d85b7aca3764d7f93699129a89c11535abe1a (diff)
downloadtalos-obmc-linux-1e23437563dd3ad57e30c5d6c29995a982fd649b.tar.gz
talos-obmc-linux-1e23437563dd3ad57e30c5d6c29995a982fd649b.zip
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>
Diffstat (limited to 'drivers/pinctrl/pinctrl-st.c')
-rw-r--r--drivers/pinctrl/pinctrl-st.c17
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c
index 0de1c67dfb94..2e5c545f5040 100644
--- a/drivers/pinctrl/pinctrl-st.c
+++ b/drivers/pinctrl/pinctrl-st.c
@@ -799,21 +799,6 @@ static int st_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
return (direction == ST_GPIO_DIRECTION_IN);
}
-static int st_gpio_xlate(struct gpio_chip *gc,
- const struct of_phandle_args *gpiospec, u32 *flags)
-{
- if (WARN_ON(gc->of_gpio_n_cells < 1))
- return -EINVAL;
-
- if (WARN_ON(gpiospec->args_count < gc->of_gpio_n_cells))
- return -EINVAL;
-
- if (gpiospec->args[0] > gc->ngpio)
- return -EINVAL;
-
- return gpiospec->args[0];
-}
-
/* Pinctrl Groups */
static int st_pctl_get_groups_count(struct pinctrl_dev *pctldev)
{
@@ -1486,8 +1471,6 @@ static struct gpio_chip st_gpio_template = {
.direction_output = st_gpio_direction_output,
.get_direction = st_gpio_get_direction,
.ngpio = ST_GPIO_PINS_PER_BANK,
- .of_gpio_n_cells = 1,
- .of_xlate = st_gpio_xlate,
};
static struct irq_chip st_gpio_irqchip = {
OpenPOWER on IntegriCloud