aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sh/pfc/core.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-12-15 17:50:46 -0500
committerSimon Horman <horms+renesas@verge.net.au>2013-01-24 19:24:21 -0500
commit6f6a4a683be97837f3baae443aacd2b0e6162b10 (patch)
treef1a3970e00dfd46df21769c11c7d795ebd192c25 /drivers/sh/pfc/core.h
parentf9492fda70c87b410e61675095212dc806bdf615 (diff)
sh-pfc: Merge PFC core and gpio
The PFC core calls the gpio module gpiochip registration in its register_sh_pfc() function, itself called at arch initialization time. If the gpio module isn't present then the gpiochip will never be registered. As the gpio module can only be present at arch initialization time if it's builtin, there's no point in allowing to build it as a module. Make it a boolean option, and initialize it synchronously with the core if selected. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'drivers/sh/pfc/core.h')
-rw-r--r--drivers/sh/pfc/core.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/sh/pfc/core.h b/drivers/sh/pfc/core.h
index b07ae259c0eb..f3032b232fb0 100644
--- a/drivers/sh/pfc/core.h
+++ b/drivers/sh/pfc/core.h
@@ -20,14 +20,18 @@ struct pfc_window {
20 unsigned long size; 20 unsigned long size;
21}; 21};
22 22
23struct sh_pfc_chip;
24
23struct sh_pfc { 25struct sh_pfc {
24 struct sh_pfc_platform_data *pdata; 26 struct sh_pfc_platform_data *pdata;
25 spinlock_t lock; 27 spinlock_t lock;
26 28
27 struct pfc_window *window; 29 struct pfc_window *window;
30 struct sh_pfc_chip *gpio;
28}; 31};
29 32
30int sh_pfc_register_gpiochip(struct sh_pfc *pfc); 33int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
34int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc);
31 35
32int sh_pfc_register_pinctrl(struct sh_pfc *pfc); 36int sh_pfc_register_pinctrl(struct sh_pfc *pfc);
33 37