otg.h (698B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2/* 3 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc. 4 * 5 * Author: Peter Chen 6 */ 7 8#ifndef __DRIVERS_USB_CHIPIDEA_OTG_H 9#define __DRIVERS_USB_CHIPIDEA_OTG_H 10 11u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask); 12void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data); 13int ci_hdrc_otg_init(struct ci_hdrc *ci); 14void ci_hdrc_otg_destroy(struct ci_hdrc *ci); 15enum ci_role ci_otg_role(struct ci_hdrc *ci); 16void ci_handle_vbus_change(struct ci_hdrc *ci); 17static inline void ci_otg_queue_work(struct ci_hdrc *ci) 18{ 19 disable_irq_nosync(ci->irq); 20 if (queue_work(ci->wq, &ci->work) == false) 21 enable_irq(ci->irq); 22} 23 24#endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */