blob: 9bcf4ec50a340b5ddcc0a81c59bcd3d4fa314b06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
#ifndef USB3503_H
#define USB3503_H
#define USB3503_I2C_NAME "usb3503"
#define HUB_TAG "usb3503: "
#define CFG1_REG 0x06
#define CFG1_SELF_BUS_PWR (0x1 << 7)
#define SP_ILOCK_REG 0xE7
#define SPILOCK_CONNECT_N (0x1 << 1)
#define SPILOCK_CONFIG_N (0x1 << 0)
#define CFGP_REG 0xEE
#define CFGP_CLKSUSP (0x1 << 7)
#define PDS_REG 0x0A
#define PDS_PORT1 (0x1 << 1)
#define PDS_PORT2 (0x1 << 2)
#define PDS_PORT3 (0x1 << 3)
enum usb3503_mode {
USB3503_MODE_UNKNOWN,
USB3503_MODE_HUB,
USB3503_MODE_STANDBY,
};
struct usb3503_platform_data {
char initial_mode;
int (*reset_n)(int);
int (*register_hub_handler)(void (*)(void), void *);
int (*port_enable)(int, int);
};
struct usb3503_hubctl {
int mode;
int (*reset_n)(int);
int (*port_enable)(int, int);
struct i2c_client *i2c_dev;
};
#endif
|