gpio: omap: Allow building as a loadable module
We currently get all kinds of errors building the omap gpio driver as a module starting with: undefined reference to `omap2_gpio_resume_after_idle' undefined reference to `omap2_gpio_prepare_for_idle' ... Let's fix the issue by adding inline functions to the header. Note that we can now also remove the two unused functions for omap_set_gpio_debounce and omap_set_gpio_debounce_time. Then doing rmmod on the module produces further warnings because of missing exit related functions. Let's add those. And finally, we can make the Kconfig entry just a tristate option that's selected for omaps. Cc: Javier Martinez Canillas <javier@dowhile0.org> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Grygorii Strashko <grygorii.strashko@linaro.org> Acked-by: Santosh Shilimkar <ssantosh@kernel.org> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
606f13e9ef
commit
cac089f902
3 changed files with 35 additions and 3 deletions
|
@ -208,9 +208,17 @@ struct omap_gpio_platform_data {
|
|||
int (*get_context_loss_count)(struct device *dev);
|
||||
};
|
||||
|
||||
#if IS_BUILTIN(CONFIG_GPIO_OMAP)
|
||||
extern void omap2_gpio_prepare_for_idle(int off_mode);
|
||||
extern void omap2_gpio_resume_after_idle(void);
|
||||
extern void omap_set_gpio_debounce(int gpio, int enable);
|
||||
extern void omap_set_gpio_debounce_time(int gpio, int enable);
|
||||
#else
|
||||
static inline void omap2_gpio_prepare_for_idle(int off_mode)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void omap2_gpio_resume_after_idle(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue