diff options
author | Erik Gilling <konkers@android.com> | 2011-10-01 15:09:09 +0100 |
---|---|---|
committer | Andy Green <andy.green@linaro.org> | 2011-10-02 09:40:52 +0100 |
commit | f884f0234ee5e3d5ba675391d74976fba633a4e6 (patch) | |
tree | 0c80f6bf3eb56ded4950c12bf07370e7f9d4c8df /include | |
parent | 31fdcf5401afa49d1ed6d8b243f8a156d91a8bb9 (diff) |
usb: otg: add proxy_wait handler to otg_id
Some otg_id handlers can detect what's connected but can't detect a change.
This allows that handler to pass off the waiting for ID change to a proxy.
Change-Id: Ib38b750c3da4bffc35e37b620ecee37c5d64d31f
Signed-off-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/usb/otg_id.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |