From 8d9af88f55be89fa4c897ded3204ef12c947731e Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Wed, 22 Dec 2010 18:42:35 -0800 Subject: omap2+: Allow hwmod state changes to mux pads based on the state changes Allow hwmod state changes to mux pads based on the state changes. By default, only enable and disable the pads. In some rare cases dynamic remuxing for the idles states is needed, this can be done by passing the enable, idle, and off pads from board-*.c file along with OMAP_DEVICE_PAD_REMUX flag. Thanks to Paul Walmsley for the comments on the hwmod related changes. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/mux.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'arch/arm/mach-omap2/mux.h') diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index 9c48b9d3ec29..c9ec50de99c9 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h @@ -171,6 +171,8 @@ struct omap_device_pad { struct omap_mux *mux; }; +struct omap_hwmod_mux_info; + #if defined(CONFIG_OMAP_MUX) /** @@ -195,6 +197,15 @@ int omap_mux_init_signal(const char *muxname, int val); extern struct omap_hwmod_mux_info * omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads); +/** + * omap_hwmod_mux - omap hwmod specific pin muxing + * @hmux: Pads for a hwmod + * @state: Desired _HWMOD_STATE + * + * Called only from omap_hwmod.c, do not use. + */ +void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state); + #else static inline int omap_mux_init_gpio(int gpio, int val) @@ -212,6 +223,10 @@ omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads) return NULL; } +static inline void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state) +{ +} + static struct omap_board_mux *board_mux __initdata __maybe_unused; #endif -- cgit v1.2.1