aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2010-10-21 06:56:40 -0400
committerFelipe Balbi <balbi@ti.com>2010-12-07 01:13:25 -0500
commit3ca8abb84522f4b773678726db6ebd6fc277bc96 (patch)
tree242c7d9a7342b0a38aae47398000bcc544156fad /drivers/usb
parentfe4bfb30fe5788100a70c0ed96ddd8c6186eb9c4 (diff)
usb: musb: introduce struct musb_platform_ops
This will be passed to musb_core by platform glue layer in order to make it easier to compile support for several HW glue layers. Later patches will come using this structure and also moving HW glue layers to its own platform driver; the idea is to be able to handle platform peculiarities in a manner which doesn't affect one another. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_core.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index 6ad72f395e28..59928a235dc5 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -253,6 +253,34 @@ enum musb_g_ep0_state {
253 253
254/******************************** TYPES *************************************/ 254/******************************** TYPES *************************************/
255 255
256/**
257 * struct musb_platform_ops - Operations passed to musb_core by HW glue layer
258 * @init: turns on clocks, sets up platform-specific registers, etc
259 * @exit: undoes @init
260 * @suspend: platform-specific suspend, e.g. context save
261 * @resume: platform-specific resume, e.g. context restore
262 * @set_mode: forcefully changes operating mode
263 * @try_ilde: tries to idle the IP
264 * @vbus_status: returns vbus status if possible
265 * @set_vbus: forces vbus status
266 */
267struct musb_platform_ops {
268 int (*init)(struct musb *musb);
269 int (*exit)(struct musb *musb);
270
271 int (*suspend)(struct musb *musb);
272 int (*resume)(struct musb *musb);
273
274 void (*enable)(struct musb *musb);
275 void (*disable)(struct musb *musb);
276
277 int (*set_mode)(struct musb *musb, u8 mode);
278 void (*try_idle)(struct musb *musb, unsigned long timeout);
279
280 int (*vbus_status)(struct musb *musb);
281 void (*set_vbus)(struct musb *musb, int on);
282};
283
256/* 284/*
257 * struct musb_hw_ep - endpoint hardware (bidirectional) 285 * struct musb_hw_ep - endpoint hardware (bidirectional)
258 * 286 *