USB: misc: Add USB3503 High-Speed Hub Controller
PATCH 1/1 USB: misc: Add USB3503 High-Speed Hub Controller
This patch adds new driver of SMSC USB3503 USB 2.0 hub controller with HSIC upstream connectivity and three USB 2.0 downstream ports. The specification can be found from 'http://www.smsc.com/index.php?tid=295&pid=325'.
The current version have been tested very basic features switching the modes, HUB-MODE and STANDBY-MODE.
--- drivers/usb/misc/Kconfig | 6 + drivers/usb/misc/Makefile | 1 + drivers/usb/misc/usb3503.c | 323 +++++++++++++++++++++++++++++++++ include/linux/platform_data/usb3503.h | 17 ++ 4 files changed, 347 insertions(+) create mode 100644 drivers/usb/misc/usb3503.c create mode 100644 include/linux/platform_data/usb3503.h
drivers/usb/misc/Kconfig +6 -0
@@ -250,3 +250,9 @@ config USB_EZUSB_FX2 help Say Y here if you need EZUSB device support. (Cypress FX/FX2/FX2LP microcontrollers) + +config USB_HSIC_USB3503 + tristate "USB3503 HSIC to USB20 Driver" + depends on I2C + help + This option enables support for SMSC USB3503 HSIC to USB 2.0 Driver.
drivers/usb/misc/Makefile +1 -0
@@ -26,5 +26,6 @@ obj-$(CONFIG_USB_TRANCEVIBRATOR) += trancevibrator.o obj-$(CONFIG_USB_USS720) += uss720.o obj-$(CONFIG_USB_SEVSEG) += usbsevseg.o obj-$(CONFIG_USB_YUREX) += yurex.o +obj-$(CONFIG_USB_HSIC_USB3503) += usb3503.o obj-$(CONFIG_USB_SISUSBVGA) += sisusbvga/
drivers/usb/misc/usb3503.c new file +323 -0
323 lines not on this page · raw message
include/linux/platform_data/usb3503.h new file +17 -0
@@ -0,0 +1,17 @@ +#ifndef __USB3503_H__ +#define __USB3503_H__ + +enum usb3503_mode { +USB3503_MODE_UNKNOWN , +USB3503_MODE_HUB , +USB3503_MODE_STANDBY , +}; + +struct usb3503_platform_data { +enum usb3503_mode initial_mode; +int gpio_intn; +int gpio_connect; +int gpio_reset; +}; + +#endif
Signature · 1 line
1.7.10.4
Greg Kroah-Hartman
maintainerQuoted 6 lines · Dongjin Kim
This patch adds new driver of SMSC USB3503 USB 2.0 hub controller with HSIC upstream connectivity and three USB 2.0 downstream ports. The specification can be found from 'http://www.smsc.com/index.php?tid=295&pid=325'.
The current version have been tested very basic features switching the modes, HUB-MODE and STANDBY-MODE.
What causes the modes to be switched? From reading the driver, that only seems possible to do at boot/load time when the driver reads the platform data, right? After that, nothing happens to the device from what I can tell.
Is something going to cause the state of the device to change in the future?
drivers/usb/misc/usb3503.c line 160
Quoted 2 lines
drivers/usb/misc/usb3503.c new file +2
-0+ hub->mode = mode; +dev_info (&i2c->dev,"switched to HUB mode\n" );
Can you please switch all of the dev_info() calls to dev_dbg()? There's no need to tell the world what is going on in this driver, no one really cares. And if they do, they can dynamically enable debugging and get the information then :)
thanks,
greg k-h
Hi Greg,
Thanks for your reviewing.
The mode switching is required for power management, and actually it is not tested properly yet. Therefore suspend/resume functions are missing in the current patch but kept the switching function for the future.
Thanks again.
Dongjin.
Quoted 27 lines · Greg Kroah-Hartman
Quoted 6 lines · Dongjin Kim
This patch adds new driver of SMSC USB3503 USB 2.0 hub controller with HSIC upstream connectivity and three USB 2.0 downstream ports. The specification can be found from 'http://www.smsc.com/index.php?tid=295&pid=325'.
The current version have been tested very basic features switching the modes, HUB-MODE and STANDBY-MODE.
What causes the modes to be switched? From reading the driver, that only seems possible to do at boot/load time when the driver reads the platform data, right? After that, nothing happens to the device from what I can tell.
Is something going to cause the state of the device to change in the future?
drivers/usb/misc/usb3503.c line 160
Quoted 2 lines
drivers/usb/misc/usb3503.c new file +2
-0+ hub->mode = mode; +dev_info (&i2c->dev,"switched to HUB mode\n" );Can you please switch all of the
dev_info()calls todev_dbg()? There's no need to tell the world what is going on in this driver, no one really cares. And if they do, they can dynamically enable debugging and get the information then :)thanks,
greg k-h