diff options
author | Tony Lindgren <tony@atomide.com> | 2010-12-22 18:42:35 -0800 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-12-22 18:42:35 -0800 |
commit | 9796b323b5a1940f9ec62c3a6cf7e442bf540d53 (patch) | |
tree | 8fb2b57e5cbc7cfdfc5a26c4f5daf6f8c884353e /arch/arm/mach-omap2/mux.h | |
parent | 8419fdbaf2118a0a169441be82f09f7be93a5ca1 (diff) |
omap2+: Add support for hwmod specific muxing of devices
This allows adding hwmod specific pads dynamically during the
platform device init.
Note that we don't currently have the hwmod specific signals
listed in the hwmod data, but struct omap_hwmod_mux_info will
make that possible if necessary.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/mux.h')
-rw-r--r-- | arch/arm/mach-omap2/mux.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h index f5f7f493805..9c48b9d3ec2 100644 --- a/arch/arm/mach-omap2/mux.h +++ b/arch/arm/mach-omap2/mux.h @@ -145,6 +145,32 @@ struct omap_board_mux { u16 value; }; +#define OMAP_DEVICE_PAD_ENABLED BIT(7) /* Not needed for board-*.c */ +#define OMAP_DEVICE_PAD_REMUX BIT(1) /* Dynamically remux a pad, + needs enable, idle and off + values */ +#define OMAP_DEVICE_PAD_WAKEUP BIT(0) /* Pad is wake-up capable */ + +/** + * struct omap_device_pad - device specific pad configuration + * @name: signal name + * @flags: pad specific runtime flags + * @enable: runtime value for a pad + * @idle: idle value for a pad + * @off: off value for a pad, defaults to safe mode + * @partition: mux partition + * @mux: mux register + */ +struct omap_device_pad { + char *name; + u8 flags; + u16 enable; + u16 idle; + u16 off; + struct omap_mux_partition *partition; + struct omap_mux *mux; +}; + #if defined(CONFIG_OMAP_MUX) /** @@ -161,6 +187,14 @@ int omap_mux_init_gpio(int gpio, int val); */ int omap_mux_init_signal(const char *muxname, int val); +/** + * omap_hwmod_mux_init - initialize hwmod specific mux data + * @bpads: Board specific device signal names + * @nr_pads: Number of signal names for the device + */ +extern struct omap_hwmod_mux_info * +omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads); + #else static inline int omap_mux_init_gpio(int gpio, int val) @@ -172,6 +206,12 @@ static inline int omap_mux_init_signal(char *muxname, int val) return 0; } +static inline struct omap_hwmod_mux_info * +omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads) +{ + return NULL; +} + static struct omap_board_mux *board_mux __initdata __maybe_unused; #endif |