aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-03-09 21:19:44 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-04-02 21:30:35 -0400
commit1a4fd58f76cf331c93daaa1667daa25db297d0d4 (patch)
treee304a7cf396808b0bae82c9618b8f10056eddd81 /drivers/pinctrl
parent542a564d2ddbd2c37536b4dff8e45fa0fc239bcc (diff)
sh-pfc: Make GPIO support optional
When implemented as a separate IP block, GPIOs should be handled by a separate driver. To make this possible GPIO support needs to be optional in the sh-pfc driver. If no GPIO data registers are supplied in the SoC information structure skip registration of the gpiochip. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 7a54ec79518b..317cebb0ee4d 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -354,6 +354,9 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
354 unsigned int i; 354 unsigned int i;
355 int ret; 355 int ret;
356 356
357 if (pfc->info->data_regs == NULL)
358 return 0;
359
357 /* Register the real GPIOs chip. */ 360 /* Register the real GPIOs chip. */
358 chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup); 361 chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup);
359 if (IS_ERR(chip)) 362 if (IS_ERR(chip))