Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
0004  *
0005  * Author: Peter Chen
0006  */
0007 
0008 #ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
0009 #define __DRIVERS_USB_CHIPIDEA_OTG_H
0010 
0011 u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask);
0012 void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data);
0013 int ci_hdrc_otg_init(struct ci_hdrc *ci);
0014 void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
0015 enum ci_role ci_otg_role(struct ci_hdrc *ci);
0016 void ci_handle_vbus_change(struct ci_hdrc *ci);
0017 static inline void ci_otg_queue_work(struct ci_hdrc *ci)
0018 {
0019     disable_irq_nosync(ci->irq);
0020     if (queue_work(ci->wq, &ci->work) == false)
0021         enable_irq(ci->irq);
0022 }
0023 
0024 #endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */