aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/renesas_usbhs/mod.h
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2011-04-28 03:41:20 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-29 20:24:35 -0400
commitb002ff6e268b6024d6927a1ce330a14ca162b6ab (patch)
tree83bd5dde6f872396cd42762b59f96cf9c024d30a /drivers/usb/renesas_usbhs/mod.h
parentbc57381e634782009b1cb2e86b18013699ada576 (diff)
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 {
68struct usbhs_mod_info { 68struct usbhs_mod_info {
69 struct usbhs_mod *mod[USBHS_MAX]; 69 struct usbhs_mod *mod[USBHS_MAX];
70 struct usbhs_mod *curt; /* current mod */ 70 struct usbhs_mod *curt; /* current mod */
71
72 /*
73 * INTSTS0 :: VBINT
74 *
75 * This function will be used as autonomy mode
76 * when platform cannot call notify_hotplug.
77 *
78 * This callback cannot be member of "struct usbhs_mod"
79 * because it will be used even though
80 * host/gadget has not been selected.
81 */
82 int (*irq_vbus)(struct usbhs_priv *priv,
83 struct usbhs_irq_state *irq_state);
71}; 84};
72 85
73/* 86/*
@@ -81,6 +94,8 @@ int usbhs_mod_change(struct usbhs_priv *priv, int id);
81int usbhs_mod_probe(struct usbhs_priv *priv); 94int usbhs_mod_probe(struct usbhs_priv *priv);
82void usbhs_mod_remove(struct usbhs_priv *priv); 95void usbhs_mod_remove(struct usbhs_priv *priv);
83 96
97void usbhs_mod_autonomy_mode(struct usbhs_priv *priv);
98
84/* 99/*
85 * status functions 100 * status functions
86 */ 101 */