Linux 3.18.139
[linux/fpc-iii.git] / drivers / usb / chipidea / otg.h
bloba5557c70034a3fb8b57ff3c24f9b9fb730d3db06
1 /*
2 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
4 * Author: Peter Chen
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
11 #ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
12 #define __DRIVERS_USB_CHIPIDEA_OTG_H
14 u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask);
15 void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data);
16 int ci_hdrc_otg_init(struct ci_hdrc *ci);
17 void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
18 enum ci_role ci_otg_role(struct ci_hdrc *ci);
19 void ci_handle_vbus_change(struct ci_hdrc *ci);
20 static inline void ci_otg_queue_work(struct ci_hdrc *ci)
22 disable_irq_nosync(ci->irq);
23 if (queue_work(ci->wq, &ci->work) == false)
24 enable_irq(ci->irq);
27 #endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */