summaryrefslogtreecommitdiff
path: root/include/linux/usb/chipidea.h
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2013-08-14 13:44:08 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-08-14 23:37:19 +0400
commit577b232fc9caba1b6f7a3bb9901c00b10e0ca1ba (patch)
tree7c3fd6ed7f8405c3f5f59dc9d1b83b17739da689 /include/linux/usb/chipidea.h
parent3f124d233e97db96d9471d1fb346335d43d8650d (diff)
downloadlinux-577b232fc9caba1b6f7a3bb9901c00b10e0ca1ba.tar.xz
usb: chipidea: add flag CI_HDRC_DUAL_ROLE_NOT_OTG
Since we need otgsc to know vbus's status at some chipidea controllers even it is peripheral-only mode. Besides, some SoCs (eg, AR9331 SoC) don't have otgsc register even the DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS. We inroduce flag CI_HDRC_DUAL_ROLE_NOT_OTG to indicate if the controller is dual role, but not supports OTG. If this flag is not set, we follow the rule that if DCCPARAMS_DC and DCCPARAMS_HC are both 1 at CAP_DCCPARAMS, then this controller is otg capable. Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb/chipidea.h')
-rw-r--r--include/linux/usb/chipidea.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/usb/chipidea.h b/include/linux/usb/chipidea.h
index ce4e1aa071b3..10a607ce9090 100644
--- a/include/linux/usb/chipidea.h
+++ b/include/linux/usb/chipidea.h
@@ -20,6 +20,11 @@ struct ci_hdrc_platform_data {
#define CI_HDRC_REQUIRE_TRANSCEIVER BIT(1)
#define CI_HDRC_PULLUP_ON_VBUS BIT(2)
#define CI_HDRC_DISABLE_STREAMING BIT(3)
+ /*
+ * Only set it when DCCPARAMS.DC==1 and DCCPARAMS.HC==1,
+ * but otg is not supported (no register otgsc).
+ */
+#define CI_HDRC_DUAL_ROLE_NOT_OTG BIT(4)
enum usb_dr_mode dr_mode;
#define CI_HDRC_CONTROLLER_RESET_EVENT 0
#define CI_HDRC_CONTROLLER_STOPPED_EVENT 1