Commit 542a564d authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Simon Horman

sh-pfc: Make function GPIOs support optional

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: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent 48b1e3e8
...@@ -384,6 +384,9 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc) ...@@ -384,6 +384,9 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
} }
/* Register the function GPIOs chip. */ /* Register the function GPIOs chip. */
if (pfc->info->nr_func_gpios == 0)
return 0;
chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup); chip = sh_pfc_add_gpiochip(pfc, gpio_function_setup);
if (IS_ERR(chip)) if (IS_ERR(chip))
return PTR_ERR(chip); return PTR_ERR(chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment