Merge tag 'usb-5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux-block.git] / drivers / usb / chipidea / otg.h
CommitLineData
d9958306 1/* SPDX-License-Identifier: GPL-2.0 */
c10b4f03 2/*
5332ff1f 3 * Copyright (C) 2013-2014 Freescale Semiconductor, Inc.
c10b4f03
PC
4 *
5 * Author: Peter Chen
c10b4f03
PC
6 */
7
8#ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
9#define __DRIVERS_USB_CHIPIDEA_OTG_H
10
0c33bf78
LJ
11u32 hw_read_otgsc(struct ci_hdrc *ci, u32 mask);
12void hw_write_otgsc(struct ci_hdrc *ci, u32 mask, u32 data);
c10b4f03 13int ci_hdrc_otg_init(struct ci_hdrc *ci);
cbec6bd5
PC
14void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
15enum ci_role ci_otg_role(struct ci_hdrc *ci);
a107f8c5 16void ci_handle_vbus_change(struct ci_hdrc *ci);
be6b0c1b
PC
17static inline void ci_otg_queue_work(struct ci_hdrc *ci)
18{
19 disable_irq_nosync(ci->irq);
8b97d73c
LP
20 if (queue_work(ci->wq, &ci->work) == false)
21 enable_irq(ci->irq);
be6b0c1b 22}
c10b4f03
PC
23
24#endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */