summaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-04-28 09:41:20 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-30 02:24:35 +0200
commitb002ff6e268b6024d6927a1ce330a14ca162b6ab (patch)
tree83bd5dde6f872396cd42762b59f96cf9c024d30a /drivers/usb/renesas_usbhs/mod.h
parentusb: renesas_usbhs: use delayed_work instead of work_struct (diff)
downloadlinux-b002ff6e268b6024d6927a1ce330a14ca162b6ab.tar.xz
linux-b002ff6e268b6024d6927a1ce330a14ca162b6ab.zip
usb: renesas_usbhs: add autonomy mode
Current renesas_usbhs was designed to save power when USB is not connected. And it assumed platform uses callback to notify connection/disconnection by external interrupt. But some SuperH / platform board doesn't have such feature. This patch adds autonomy mode which detect USB connection/disconnection by internal interrupt. But power will be always ON when autonomy mode is selected. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod.h')
-rw-r--r--drivers/usb/renesas_usbhs/mod.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/renesas_usbhs/mod.h b/drivers/usb/renesas_usbhs/mod.h
index 8644191e164f..5c845a28a21c 100644
--- a/drivers/usb/renesas_usbhs/mod.h
+++ b/drivers/usb/renesas_usbhs/mod.h
@@ -68,6 +68,19 @@ struct usbhs_mod {
struct usbhs_mod_info {
struct usbhs_mod *mod[USBHS_MAX];
struct usbhs_mod *curt; /* current mod */
+
+ /*
+ * INTSTS0 :: VBINT
+ *
+ * This function will be used as autonomy mode
+ * when platform cannot call notify_hotplug.
+ *
+ * This callback cannot be member of "struct usbhs_mod"
+ * because it will be used even though
+ * host/gadget has not been selected.
+ */
+ int (*irq_vbus)(struct usbhs_priv *priv,
+ struct usbhs_irq_state *irq_state);
};
/*
@@ -81,6 +94,8 @@ int usbhs_mod_change(struct usbhs_priv *priv, int id);
int usbhs_mod_probe(struct usbhs_priv *priv);
void usbhs_mod_remove(struct usbhs_priv *priv);
+void usbhs_mod_autonomy_mode(struct usbhs_priv *priv);
+
/*
* status functions
*/