usb: chipidea: move otg related things to otg file
[linux-2.6-block.git] / drivers / usb / chipidea / otg.h
CommitLineData
c10b4f03
PC
1/*
2 * Copyright (C) 2013 Freescale Semiconductor, Inc.
3 *
4 * Author: Peter Chen
5 *
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 */
10
11#ifndef __DRIVERS_USB_CHIPIDEA_OTG_H
12#define __DRIVERS_USB_CHIPIDEA_OTG_H
13
14static inline void ci_clear_otg_interrupt(struct ci_hdrc *ci, u32 bits)
15{
16 /* Only clear request bits */
17 hw_write(ci, OP_OTGSC, OTGSC_INT_STATUS_BITS, bits);
18}
19
20static inline void ci_enable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
21{
22 hw_write(ci, OP_OTGSC, bits, bits);
23}
24
25static inline void ci_disable_otg_interrupt(struct ci_hdrc *ci, u32 bits)
26{
27 hw_write(ci, OP_OTGSC, bits, 0);
28}
29
30int ci_hdrc_otg_init(struct ci_hdrc *ci);
cbec6bd5
PC
31void ci_hdrc_otg_destroy(struct ci_hdrc *ci);
32enum ci_role ci_otg_role(struct ci_hdrc *ci);
c10b4f03
PC
33
34#endif /* __DRIVERS_USB_CHIPIDEA_OTG_H */