summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/gadget.h2
-rw-r--r--include/linux/usb/otg_id.h6
2 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index dd1571db55e..5802cb09fda 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -430,6 +430,8 @@ struct usb_gadget_ops {
int (*pullup) (struct usb_gadget *, int is_on);
int (*ioctl)(struct usb_gadget *,
unsigned code, unsigned long param);
+ struct usb_ep* (*configure_ep)(struct usb_gadget *, u8 type,
+ struct usb_endpoint_descriptor *);
};
/**
diff --git a/include/linux/usb/otg_id.h b/include/linux/usb/otg_id.h
index b686ab06795..46a44637c11 100644
--- a/include/linux/usb/otg_id.h
+++ b/include/linux/usb/otg_id.h
@@ -28,6 +28,10 @@
* get called first.
* @detect: Called during otg_id_notify. Return OTG_ID_HANDLED if the USB cable
* has been identified
+ * @proxy_wait: Called during otg_id_notify if a previous handler returns
+ * OTG_ID_PROXY_WAIT. This should wait on ID change then call otg_id_notify.
+ * This is used when a handler knows what's connected but can't detect
+ * the change itself.
* @cancel: Called after detect has returned OTG_ID_HANDLED to ask it to
* release detection resources to allow a new identification to occur.
*/
@@ -35,10 +39,12 @@
struct otg_id_notifier_block {
int priority;
int (*detect)(struct otg_id_notifier_block *otg_id_nb);
+ int (*proxy_wait)(struct otg_id_notifier_block *otg_id_nb);
void (*cancel)(struct otg_id_notifier_block *otg_id_nb);
struct plist_node p;
};
+#define OTG_ID_PROXY_WAIT 2
#define OTG_ID_HANDLED 1
#define OTG_ID_UNHANDLED 0