diff options
| author | Dongjin Kim <tobetter@gmail.com> | 2013-05-21 16:20:08 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 08:32:52 -0400 |
| commit | e8e44a4896a5f0bde1af36a31b7ec662bdaa44ef (patch) | |
| tree | 7a0fe07609710facb735efc01dde7422517395f4 /include/linux/platform_data | |
| parent | 45f6bc5ff9c3387387f048ec85dcb4e69acf0b03 (diff) | |
usb: misc: usb3503: Add to select the ports to disable
This patch is to disable the USB ports unconnected to USB3503. In order to
disable the port, 'port_off_mask' must be set.
* Disable PORT1 only
.port_off_mask = USB3503_OFF_PORT1;
* Disable PORT1 and PORT3 only
.port_off_mask = USB3503_OFF_PORT1 | USB3503_OFF_PORT3;
* Enables all ports
.port_off_mask = 0;
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/platform_data')
| -rw-r--r-- | include/linux/platform_data/usb3503.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/platform_data/usb3503.h b/include/linux/platform_data/usb3503.h index 85dcc709f7e9..1d1b6ef871f6 100644 --- a/include/linux/platform_data/usb3503.h +++ b/include/linux/platform_data/usb3503.h | |||
| @@ -3,6 +3,10 @@ | |||
| 3 | 3 | ||
| 4 | #define USB3503_I2C_NAME "usb3503" | 4 | #define USB3503_I2C_NAME "usb3503" |
| 5 | 5 | ||
| 6 | #define USB3503_OFF_PORT1 (1 << 1) | ||
| 7 | #define USB3503_OFF_PORT2 (1 << 2) | ||
| 8 | #define USB3503_OFF_PORT3 (1 << 3) | ||
| 9 | |||
| 6 | enum usb3503_mode { | 10 | enum usb3503_mode { |
| 7 | USB3503_MODE_UNKNOWN, | 11 | USB3503_MODE_UNKNOWN, |
| 8 | USB3503_MODE_HUB, | 12 | USB3503_MODE_HUB, |
| @@ -11,6 +15,7 @@ enum usb3503_mode { | |||
| 11 | 15 | ||
| 12 | struct usb3503_platform_data { | 16 | struct usb3503_platform_data { |
| 13 | enum usb3503_mode initial_mode; | 17 | enum usb3503_mode initial_mode; |
| 18 | u8 port_off_mask; | ||
| 14 | int gpio_intn; | 19 | int gpio_intn; |
| 15 | int gpio_connect; | 20 | int gpio_connect; |
| 16 | int gpio_reset; | 21 | int gpio_reset; |
