[PATCH v4 06/10] usb: add runtime pm support for usb port device

2013-01-09 Thread Lan Tianyu
This patch is to add runtime pm callback for usb port device. Set/clear PORT_POWER feature in the resume/suspend callbak. Add portnum for struct usb_port to record port number. Do pm_rumtime_get_sync/put(portdev) when a device is plugged/unplugged to prevent it from being powered off when it is

[PATCH v4 08/10] usb: expose usb port's pm qos flags to user space

2013-01-09 Thread Lan Tianyu
This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off flag to prohibit the port from being powered off. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c | 11 ++- 1 file

[PATCH v4 09/10] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-09 Thread Lan Tianyu
Some usb devices can't be resumed correctly after power off. This patch is to add usb_device_allow_power_off() and usb_device_prevent_power_off() for device's driver. Call pm_runtime_get_sync(portdev) to increase port's usage count and then port will not be suspended. The device will not be

[PATCH v4 02/10] USB: Set usb port's DeviceRemovable according acpi information

2013-01-09 Thread Lan Tianyu
ACPI provide _PLD and _UPC aml methods to describe usb port visibility and connectability. This patch is to add usb_hub_adjust_DeviceRemovable() to adjust usb hub port's DeviceRemovable according ACPI information and invoke it in the rh_call_control(). When hub descriptor request is issued at

[PATCH v4 07/10] usb: add usb port auto power off mechanism

2013-01-09 Thread Lan Tianyu
This patch is to add usb port auto power off mechanism. When usb device is suspending, usb core will suspend usb port and usb port runtime pm callback will clear PORT_POWER feature to power off port if all conditions were met. These conditions are remote wakeup disable, pm qos NO_POWER_OFF flag

[PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Lan Tianyu
The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/base/power/qos.c

Re: TP-LINK HSUPA Modem

2013-01-09 Thread hockseng leow
I got the dmesg after having the parameters, usbserial.vendor=0x2357 usbserial.product=0x0200 in the linux start-up. I already got the modem working under usb_modeswitch. No further work need to be done in the kernel. Thanks. On Wed, Jan 9, 2013 at 12:46 AM, Greg KH gre...@linuxfoundation.org

Re: TP-LINK HSUPA Modem

2013-01-09 Thread Thomas Schäfer
Am 09.01.2013 09:54, schrieb hockseng leow: I got the dmesg after having the parameters, usbserial.vendor=0x2357 usbserial.product=0x0200 in the linux start-up. That looks not very nice. I already got the modem working under usb_modeswitch. What about other people with the same

[PATCH 2/2] usb: gadget: FunctionFS: Refactor option parsing

2013-01-09 Thread Michal Nazarewicz
From: Michal Nazarewicz min...@mina86.com The use of memcmp() is clever and all and maybe even it makes parsing a bit faster (since only options with given length need to be checked) but option parsing is hardly a critical path and the additional code complexity is not worth it. Signed-off-by:

Re: TP-LINK HSUPA Modem

2013-01-09 Thread hockseng leow
It just works with the latest Fedora 17 updates. The latest usb_modeswitch update includes the device vendor and product. On Wed, Jan 9, 2013 at 5:14 PM, Thomas Schäfer tschae...@t-online.de wrote: Am 09.01.2013 09:54, schrieb hockseng leow: I got the dmesg after having the parameters,

[PATCH 0/3] Add and use new macro module_platform_driver_probe()

2013-01-09 Thread Fabio Porcedda
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver_probe(), which replaces the module_init()/module_exit() registrations with template functions.

[PATCH 1/3] driver core: add helper macro for platform_driver_probe() boilerplate

2013-01-09 Thread Fabio Porcedda
For simple modules that contain a single platform_driver without any additional setup code then ends up being a block of duplicated boilerplate. This patch adds a new macro, module_platform_driver_probe(), which replaces the module_init()/module_exit() registrations with template functions. This

[PATCH 3/3] usb: converto drivers/usb/* to use module_platform_driver_probe()

2013-01-09 Thread Fabio Porcedda
This patch converts the drivers in drivers/usb/* to use the module_platform_driver_probe() macro which makes the code smaller and a bit simpler. Signed-off-by: Fabio Porcedda fabio.porce...@gmail.com Cc: linux-usb@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: Felipe Balbi

[PATCH 2/3] watchdog: convert drivers/watchdog/* to use module_platform_driver_probe

2013-01-09 Thread Fabio Porcedda
This makes the code a bit smaller by getting rid of some boilerplate code. Signed-off-by: Fabio Porcedda fabio.porce...@gmail.com Cc: linux-watch...@vger.kernel.org Cc: Wim Van Sebroeck w...@iguana.be Cc: Linus Walleij linus.wall...@linaro.org --- drivers/watchdog/at32ap700x_wdt.c | 12

Re: [PATCH v4 0/7] Add fully tested id switch and vbus connect detect support for Chipidea

2013-01-09 Thread Maxime Ripard
Hi Peter, Thanks for your answer. On 09/01/2013 04:23, Peter Chen wrote: On Tue, Jan 08, 2013 at 04:27:21PM +0100, Maxime Ripard wrote: Hi Peter, On 27/12/2012 07:59, Peter Chen wrote: (Sorry for update slowly due to long time business trip) Changes for v4 mainly for 2/7, 3/7, 4/7, see

Re: [PATCH v4 08/10] usb: expose usb port's pm qos flags to user space

2013-01-09 Thread Sergei Shtylyov
Hello. On 09-01-2013 12:45, Lan Tianyu wrote: This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off flag to prohibit the port from being powered off. Signed-off-by: Lan Tianyu tianyu@intel.com ---

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Sergei Shtylyov
Hello. On 09-01-2013 12:45, Lan Tianyu wrote: The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. ^ Either expose or export. Signed-off-by: Lan Tianyu tianyu@intel.com WBR,

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Alan Stern
On Wed, 9 Jan 2013, Lan Tianyu wrote: The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file changed, 1 insertion(+) diff --git

usb device removed from sysfs before input children devices

2013-01-09 Thread Karl Relton
On coming out of suspend my usb bluetooth adaptor is being reset by the system. In linux 3.7 the usb devices are being removed from the sysfs tree first, and then the various 'child' devices (like my bluetooth mouse keyboard related devices) afterwards. This is causing the udev events for the

[PATCH] usb/isp1760: Fix sparse warnings (local functions not declared static).

2013-01-09 Thread Arvid Brodin
Fix two problems detected by the sparse code analyser: drivers/usb/host/isp1760-hcd.c:935:6: warning: symbol 'schedule_ptds' was not declared. Should it be static? drivers/usb/host/isp1760-hcd.c:1288:6: warning: symbol 'errata2_function' was not declared. Should it be static? Signed-off-by:

Re: TP-LINK HSUPA Modem

2013-01-09 Thread Dan Williams
On Wed, 2013-01-09 at 16:54 +0800, hockseng leow wrote: I got the dmesg after having the parameters, usbserial.vendor=0x2357 usbserial.product=0x0200 in the linux start-up. I already got the modem working under usb_modeswitch. No further work need to be done in the kernel. Are you able to

Re: [PATCH 1/1]linux-usb:optimize to match the Huawei USB storage devices and support new switch command

2013-01-09 Thread Sebastian Andrzej Siewior
keep the CC list please. On Wed, Jan 09, 2013 at 07:28:43AM +, Fangxiaozhi (Franko) wrote: +/* This function will send + * a scsi switch command called rewind' to huawei dongle. + * When the dongle receives this command at the first time, + * it will reboot immediately, + *

Re: [PATCH v5] usb: phy: samsung: Add support to set pmu isolation

2013-01-09 Thread Sylwester Nawrocki
Hi, On 12/28/2012 10:13 AM, Vivek Gautam wrote: Adding support to parse device node data in order to get required properties to set pmu isolation for usb-phy. Signed-off-by: Vivek Gautamgautam.vi...@samsung.com ... --- a/Documentation/devicetree/bindings/usb/samsung-usbphy.txt +++

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Lan Tianyu
On 2013年01月09日 20:52, Sergei Shtylyov wrote: Hello. On 09-01-2013 12:45, Lan Tianyu wrote: The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. ^ Either expose or export.

Re: [PATCH v4 10/10] PM/Qos: Expose dev_pm_qos_flags symbol

2013-01-09 Thread Lan Tianyu
On 2013年01月09日 23:02, Alan Stern wrote: On Wed, 9 Jan 2013, Lan Tianyu wrote: The dev_pm_qos_flags() will be used in the usb core which could be compiled as a module. This patch is to epose it. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/base/power/qos.c |1 + 1 file

Re: USB autosuspend vs. URB submission

2013-01-09 Thread Ming Lei
On Thu, Jan 10, 2013 at 7:05 AM, Laurent Pinchart laurent.pinch...@ideasonboard.com wrote: I've never heard of such problems with the uvcvideo driver, and I don't see anything wrong with the code at first sight. The driver only submits URBs when IMO, there is a minor fault in the error

[PATCH 1/3] usb: add find_raw_port_number callback to struct hc_driver()

2013-01-09 Thread Lan Tianyu
xhci driver divides the root hub into two logical hubs which work respectively for usb 2.0 and usb 3.0 devices. They are independent devices in the usb core. But in the ACPI table, it's one device node and all usb2.0 and usb3.0 ports are under it. Binding usb port with its acpi node needs the raw

[PATCH 2/3] usb/acpi: binding xhci root hub usb port with ACPI

2013-01-09 Thread Lan Tianyu
This patch is to bind xhci root hub usb port with its acpi node. The port num in the acpi table matches with the sequence in the xhci extended capabilities table. So call usb_hcd_find_raw_port_number() to transfer hub port num into raw port number which associates with the sequence in the xhci

Re: [PATCH] usb: gadget: FunctionFS: Fix missing braces in parse_opts

2013-01-09 Thread Michal Nazarewicz
On Wed, Jan 09 2013, Benoit Goby ben...@android.com wrote: Add missing braces around an if block in ffs_fs_parse_opts. This broke parsing the uid/gid mount options and causes mount to fail when using uid/gid. This has been introduced by commit b9b73f7c (userns: Convert usb functionfs to use

[PATCH v4 01/10] usb: Add driver/usb/core/(port.c,hub.h) files

2013-01-09 Thread Lan Tianyu
This patch is to create driver/usb/core/(port.c,hub.h) files and move usb port related code into port.c. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/Makefile |1 + drivers/usb/core/hub.c| 107 + drivers/usb/core/hub.h

[PATCH v4 03/10] usb: Add portX/connect_type attribute to expose usb port's connect type

2013-01-09 Thread Lan Tianyu
Some platforms provide usb port connect types through ACPI. This patch is to add this new attribute to expose these information to user space. Signed-off-by: Lan Tianyu tianyu@intel.com --- Documentation/ABI/testing/sysfs-bus-usb |9 +++ drivers/usb/core/port.c | 43

[PATCH v4 04/10] usb: Create link files between child device and usb port device.

2013-01-09 Thread Lan Tianyu
To show the relationship between usb port and child device, add link file port under usb device's sysfs directoy and device under usb port device's sysfs directory. They are linked to each other. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/hub.c | 26

[PATCH V4 0/10] usb: usb port power off mechanism anc expose usb port connect type

2013-01-09 Thread Lan Tianyu
Change since v1: optimize the export connect type patch and adjust the DeviceRemovalbe flag in the rh_call_control() after GetHubDescriptor request being processed. move all debounce operation to usb port's runtime resume callback(). Add did_runtime_put in the struct usb_port to

[PATCH v4 05/10] usb: Register usb port's acpi power resources

2013-01-09 Thread Lan Tianyu
This patch is to register usb port's acpi power resources. Create link between usb port device and its acpi power resource. Signed-off-by: Lan Tianyu tianyu@intel.com --- drivers/usb/core/port.c |3 +++ drivers/usb/core/usb-acpi.c | 20 drivers/usb/core/usb.h