summaryrefslogtreecommitdiffstats
path: root/drivers/sh/pfc/core.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-12-15 23:50:46 +0100
committerSimon Horman <horms+renesas@verge.net.au>2013-01-25 09:24:21 +0900
commit6f6a4a683be97837f3baae443aacd2b0e6162b10 (patch)
treef1a3970e00dfd46df21769c11c7d795ebd192c25 /drivers/sh/pfc/core.h
parentf9492fda70c87b410e61675095212dc806bdf615 (diff)
downloadlinux-6f6a4a683be97837f3baae443aacd2b0e6162b10.tar.bz2
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 {
unsigned long size;
};
+struct sh_pfc_chip;
+
struct sh_pfc {
struct sh_pfc_platform_data *pdata;
spinlock_t lock;
struct pfc_window *window;
+ struct sh_pfc_chip *gpio;
};
int sh_pfc_register_gpiochip(struct sh_pfc *pfc);
+int sh_pfc_unregister_gpiochip(struct sh_pfc *pfc);
int sh_pfc_register_pinctrl(struct sh_pfc *pfc);