Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
include
linux
usb
msm_hsusb.h
Go to the documentation of this file.
1
/* linux/include/asm-arm/arch-msm/hsusb.h
2
*
3
* Copyright (C) 2008 Google, Inc.
4
* Author: Brian Swetland <
[email protected]
>
5
* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
6
*
7
* This software is licensed under the terms of the GNU General Public
8
* License version 2, as published by the Free Software Foundation, and
9
* may be copied, distributed, and modified under those terms.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
*/
17
18
#ifndef __ASM_ARCH_MSM_HSUSB_H
19
#define __ASM_ARCH_MSM_HSUSB_H
20
21
#include <linux/types.h>
22
#include <
linux/usb/otg.h
>
23
32
enum
usb_mode_type
{
33
USB_NONE
= 0,
34
USB_PERIPHERAL
,
35
USB_HOST
,
36
USB_OTG
,
37
};
38
49
enum
otg_control_type
{
50
OTG_NO_CONTROL
= 0,
51
OTG_PHY_CONTROL
,
52
OTG_PMIC_CONTROL
,
53
OTG_USER_CONTROL
,
54
};
55
64
enum
msm_usb_phy_type
{
65
INVALID_PHY
= 0,
66
CI_45NM_INTEGRATED_PHY
,
67
SNPS_28NM_INTEGRATED_PHY
,
68
};
69
70
#define IDEV_CHG_MAX 1500
71
#define IUNIT 100
72
87
enum
usb_chg_state
{
88
USB_CHG_STATE_UNDEFINED
= 0,
89
USB_CHG_STATE_WAIT_FOR_DCD
,
90
USB_CHG_STATE_DCD_DONE
,
91
USB_CHG_STATE_PRIMARY_DONE
,
92
USB_CHG_STATE_SECONDARY_DONE
,
93
USB_CHG_STATE_DETECTED
,
94
};
95
107
enum
usb_chg_type
{
108
USB_INVALID_CHARGER
= 0,
109
USB_SDP_CHARGER
,
110
USB_DCP_CHARGER
,
111
USB_CDP_CHARGER
,
112
};
113
128
struct
msm_otg_platform_data
{
129
int
*
phy_init_seq
;
130
void
(*
vbus_power
)(
bool
on);
131
unsigned
power_budget
;
132
enum
usb_mode_type
mode
;
133
enum
otg_control_type
otg_control
;
134
enum
usb_mode_type
default_mode
;
135
enum
msm_usb_phy_type
phy_type
;
136
void
(*
setup_gpio
)(
enum
usb_otg_state
state
);
137
char
*
pclk_src_name
;
138
};
139
162
struct
msm_otg
{
163
struct
usb_phy
phy
;
164
struct
msm_otg_platform_data
*
pdata
;
165
int
irq
;
166
struct
clk
*
clk
;
167
struct
clk
*
pclk
;
168
struct
clk
*
pclk_src
;
169
struct
clk
*
phy_reset_clk
;
170
struct
clk
*
core_clk
;
171
void
__iomem
*
regs
;
172
#define ID 0
173
#define B_SESS_VLD 1
174
unsigned
long
inputs
;
175
struct
work_struct
sm_work
;
176
atomic_t
in_lpm
;
177
int
async_int
;
178
unsigned
cur_power
;
179
struct
delayed_work
chg_work
;
180
enum
usb_chg_state
chg_state
;
181
enum
usb_chg_type
chg_type
;
182
u8
dcd_retries
;
183
};
184
185
#endif
Generated on Thu Jan 10 2013 14:52:45 for Linux Kernel by
1.8.2