summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPhilippe Langlais <philippe.langlais@stericsson.com>2012-06-04 19:45:28 +0800
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-06-04 19:45:28 +0800
commit2e603f2fe80f061c2267e39775c3fbbc242257ae (patch)
treeb4b95dbf6ed95ffad62db187ffe54dead6ea5f57 /include
parentce8fdbf6b69bcd0c80e9a4558c631c6fdbeedabc (diff)
parent2b85348ec0be48a89fb2689bc59d943fbee8a625 (diff)
Merge topic branch 'usb' into integration-linux-ux500
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/mfd/abx500/ab8500.h1
-rw-r--r--include/linux/usb.h12
-rw-r--r--include/linux/usb/ch9.h12
-rw-r--r--include/linux/usb/gadget.h7
-rw-r--r--include/linux/usb/otg.h5
5 files changed, 35 insertions, 2 deletions
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h
index 30435405c07..4aee57c9853 100644
--- a/include/linux/mfd/abx500/ab8500.h
+++ b/include/linux/mfd/abx500/ab8500.h
@@ -297,6 +297,7 @@ struct ab8500_platform_data {
struct abx500_fg_platform_data *fg;
struct abx500_chargalg_platform_data *chargalg;
struct ab8500_gpio_platform_data *gpio;
+ struct abx500_usbgpio_platform_data *usb;
struct ab8500_sysctrl_platform_data *sysctrl;
struct ab8500_pwmled_platform_data *pwmled;
};
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 73b68d1f2cb..3645e63e029 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -331,6 +331,10 @@ struct usb_bus {
u8 otg_port; /* 0, or number of OTG/HNP port */
unsigned is_b_host:1; /* true during some HNP roleswitches */
unsigned b_hnp_enable:1; /* OTG: did A-Host enable HNP? */
+#ifdef CONFIG_USB_OTG
+ unsigned hnp_support:1; /* OTG: HNP is supported on OTG port */
+ struct delayed_work hnp_polling;/* OTG: HNP polling work */
+#endif
unsigned sg_tablesize; /* 0 or largest number of sg list entries */
int devnum_next; /* Next open device number in
@@ -372,7 +376,15 @@ struct usb_bus {
* limit. Because the arrays need to add a bit for hub status data, we
* do 31, so plus one evens out to four bytes.
*/
+
+#ifdef CONFIG_ARCH_U8500
+/**
+* On U8500 platform we support 16 ports only
+*/
+#define USB_MAXCHILDREN (16)
+#else
#define USB_MAXCHILDREN (31)
+#endif
struct usb_tt;
diff --git a/include/linux/usb/ch9.h b/include/linux/usb/ch9.h
index af21f311591..1ed2af81975 100644
--- a/include/linux/usb/ch9.h
+++ b/include/linux/usb/ch9.h
@@ -152,6 +152,12 @@
#define USB_ENDPOINT_HALT 0 /* IN/OUT will STALL */
+#ifdef CONFIG_USB_OTG
+/* OTG 2.0 spec 6.2 and 6.3 sections */
+#define OTG_STATUS_SELECTOR 0xF000
+#define THOST_REQ_POLL 1500 /* 1000 - 2000 msec */
+#define HOST_REQUEST_FLAG 0
+#endif
/* Bit array elements as returned by the USB_REQ_GET_STATUS request. */
#define USB_DEV_STAT_U1_ENABLED 2 /* transition into U1 state */
#define USB_DEV_STAT_U2_ENABLED 3 /* transition into U2 state */
@@ -651,8 +657,10 @@ struct usb_qualifier_descriptor {
struct usb_otg_descriptor {
__u8 bLength;
__u8 bDescriptorType;
-
- __u8 bmAttributes; /* support for HNP, SRP, etc */
+#ifdef CONFIG_USB_OTG
+ __u8 bmAttributes; /* support for HNP, SRP, ADP etc */
+ __le16 bcdOTG;
+#endif
} __attribute__ ((packed));
/* from usb_otg_descriptor.bmAttributes */
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index 9517466abab..164c9a03052 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -476,6 +476,8 @@ struct usb_gadget_ops {
int (*start)(struct usb_gadget_driver *,
int (*bind)(struct usb_gadget *));
int (*stop)(struct usb_gadget_driver *);
+ struct usb_ep* (*configure_ep)(struct usb_gadget *, u8 type,
+ struct usb_endpoint_descriptor *);
};
/**
@@ -534,6 +536,11 @@ struct usb_gadget {
unsigned b_hnp_enable:1;
unsigned a_hnp_support:1;
unsigned a_alt_hnp_support:1;
+#ifdef CONFIG_USB_OTG_20
+ unsigned host_request:1;
+ unsigned otg_hnp_reqd:1;
+ unsigned otg_srp_reqd:1;
+#endif
const char *name;
struct device dev;
};
diff --git a/include/linux/usb/otg.h b/include/linux/usb/otg.h
index 38ab3f46346..3583bd09d38 100644
--- a/include/linux/usb/otg.h
+++ b/include/linux/usb/otg.h
@@ -41,6 +41,11 @@ enum usb_phy_events {
USB_EVENT_ID, /* id was grounded */
USB_EVENT_CHARGER, /* usb dedicated charger */
USB_EVENT_ENUMERATED, /* gadget driver enumerated */
+ USB_EVENT_RIDA,
+ USB_EVENT_RIDB,
+ USB_EVENT_RIDC,
+ USB_EVENT_PREPARE, /* restore context and clocks */
+ USB_EVENT_CLEAN, /* disable clocks */
};
struct usb_phy;