aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/mux.h
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2010-12-22 21:42:35 -0500
committerTony Lindgren <tony@atomide.com>2010-12-22 21:42:35 -0500
commit9796b323b5a1940f9ec62c3a6cf7e442bf540d53 (patch)
tree8fb2b57e5cbc7cfdfc5a26c4f5daf6f8c884353e /arch/arm/mach-omap2/mux.h
parent8419fdbaf2118a0a169441be82f09f7be93a5ca1 (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.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/mux.h b/arch/arm/mach-omap2/mux.h
index f5f7f4938057..9c48b9d3ec29 100644
--- a/arch/arm/mach-omap2/mux.h
+++ b/arch/arm/mach-omap2/mux.h
@@ -145,6 +145,32 @@ struct omap_board_mux {
145 u16 value; 145 u16 value;
146}; 146};
147 147
148#define OMAP_DEVICE_PAD_ENABLED BIT(7) /* Not needed for board-*.c */
149#define OMAP_DEVICE_PAD_REMUX BIT(1) /* Dynamically remux a pad,
150 needs enable, idle and off
151 values */
152#define OMAP_DEVICE_PAD_WAKEUP BIT(0) /* Pad is wake-up capable */
153
154/**
155 * struct omap_device_pad - device specific pad configuration
156 * @name: signal name
157 * @flags: pad specific runtime flags
158 * @enable: runtime value for a pad
159 * @idle: idle value for a pad
160 * @off: off value for a pad, defaults to safe mode
161 * @partition: mux partition
162 * @mux: mux register
163 */
164struct omap_device_pad {
165 char *name;
166 u8 flags;
167 u16 enable;
168 u16 idle;
169 u16 off;
170 struct omap_mux_partition *partition;
171 struct omap_mux *mux;
172};
173
148#if defined(CONFIG_OMAP_MUX) 174#if defined(CONFIG_OMAP_MUX)
149 175
150/** 176/**
@@ -161,6 +187,14 @@ int omap_mux_init_gpio(int gpio, int val);
161 */ 187 */
162int omap_mux_init_signal(const char *muxname, int val); 188int omap_mux_init_signal(const char *muxname, int val);
163 189
190/**
191 * omap_hwmod_mux_init - initialize hwmod specific mux data
192 * @bpads: Board specific device signal names
193 * @nr_pads: Number of signal names for the device
194 */
195extern struct omap_hwmod_mux_info *
196omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads);
197
164#else 198#else
165 199
166static inline int omap_mux_init_gpio(int gpio, int val) 200static 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)
172 return 0; 206 return 0;
173} 207}
174 208
209static inline struct omap_hwmod_mux_info *
210omap_hwmod_mux_init(struct omap_device_pad *bpads, int nr_pads)
211{
212 return NULL;
213}
214
175static struct omap_board_mux *board_mux __initdata __maybe_unused; 215static struct omap_board_mux *board_mux __initdata __maybe_unused;
176 216
177#endif 217#endif