1 // SPDX-License-Identifier: GPL-2.0 2 /* 3 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. 4 * 5 * Author: Peter Chen 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as 9 * published by the Free Software Foundation. 10 */ 11 12 #ifndef __DRIVERS_USB_CHIPIDEA_OTG_H 13 #define __DRIVERS_USB_CHIPIDEA_OTG_H 14 15 u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask); 16 void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data); 17 int ci_hdrc_otg_init(struct ci_hdrc *ci); 18 void ci_hdrc_otg_destroy(struct ci_hdrc *ci); 19 enum ci_role ci_otg_role(struct ci_hdrc *ci); 20 void ci_handle_vbus_change(struct ci_hdrc *ci); 21 static inline void ci_otg_queue_work(struct ci_hdrc *ci) 22 { 23 disable_irq_nosync(ci->irq); 24 queue_work(ci->wq, &ci->work); 25 } 26 27 #endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */ 28