Skip to content

Commit

Permalink
sh-pfc: Make function GPIOs support optional
Browse files Browse the repository at this point in the history
The target is to get rid of function GPIOs completely. To reach this,
make function GPIOs support optional by skipping the function GPIO chip
registration if no function GPIOS are defined in SoC data.

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>
  • Loading branch information
Laurent Pinchart authored and Simon Horman committed Apr 3, 2013
1 parent 48b1e3e commit 542a564
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/pinctrl/sh-pfc/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
}

/* Register the function GPIOs chip. */
if (pfc->info->nr_func_gpios == 0)
return 0;

chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup);
if (IS_ERR(chip))
return PTR_ERR(chip);
Expand Down

0 comments on commit 542a564

Please sign in to comment.