dwc_otg: Provide sysfs interface to user space to switch host mode and
authorYu Wang <yu.y.wang@intel.com>
Fri, 30 Mar 2012 08:08:31 +0000 (16:08 +0800)
committerbuildbot <buildbot@intel.com>
Sun, 1 Apr 2012 16:22:26 +0000 (09:22 -0700)
commit6acc1bcd91b4f7e5c9fc36a808e47b0e2f4ff7bf
tree685fc78b6671e17d2cbc44ceb443eee2ed654e63
parentc17bd343334bb89403cd31502c917475fee9d1bf
dwc_otg: Provide sysfs interface to user space to switch host mode and
device mode.

BZ: 29834

Because currently there is no workable micro A usb3 cable on market. So
provide sysfs interface to support switch host mode and device mode from
user space.

Usage(commands):
switch to host: echo A > /sys/devices/pci0000:00/0000:00:11:0/otg_id
switch to device: echo A > /sys/devices/pci0000:00/0000:00:11:0/otg_id

Signed-off-by: Yu Wang <yu.y.wang@intel.com>
Change-Id: I60a4cefa72508f6f3dc70abbea5bc8f954eb644b
Signed-off-by: Yu Wang <yu.y.wang@intel.com>
Reviewed-on: http://android.intel.com:8080/41865
Reviewed-by: Meng, Zhe <zhe.meng@intel.com>
Tested-by: Meng, Zhe <zhe.meng@intel.com>
Reviewed-by: Tang, Richard <richard.tang@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
arch/x86/configs/i386_mrfl_defconfig
drivers/usb/otg/dwc_otg3.c
include/linux/usb/dwc_otg3.h