usb serial driver: private data already deallocated when release function is called

2013-01-06 Thread Tilman
Hello I am porting a usb test driver from kernel version 3.0.8 to kernel version 3.7.1. The release function was working on V3.0.0. On V3.7.1, the private data stored in serial->port.device->p->driver_data seems already to be deallocated (or never correctly be allocated): usb_get_serial_port

Re: Linux USB file storage gadget with new UDC

2013-01-06 Thread victor yeo
Hi, >> Now the endpoint address is ok, i guess. >> After i do insmod usbmon, g_file_storage, and my UDC driver, the >> "lsusb -v" shows nothing. > > usbmon doesn't do anything on the gadget side; it is meant to be used > on the host. The same is true for lsusb. > >> Should my UDC driver provide t

[PATCH 1/1] USB: OHCI: Fix definition overriding while registering Exynos OHCI driver

2013-01-06 Thread Sachin Kamat
Exynos OHCI driver does not get registered if generic OHCI driver is also selected as the macro PLATFORM_DRIVER gets re-defined to 'ohci_platform_driver' instead of 'exynos_ohci_driver'. Hence define it separately. Also, silences the following compilation warnings: drivers/usb/host/ohci-hcd.c:1191

[PATCH 1/1] usb: gadget: s3c-hsudc: Use devm_regulator_bulk_get

2013-01-06 Thread Sachin Kamat
devm_regulator_bulk_get is device managed and makes exit code simpler. Signed-off-by: Sachin Kamat --- drivers/usb/gadget/s3c-hsudc.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/s3c-hsudc.c b/drivers/usb/gadget/s3c-hsudc.c index 52379b1..d2b8791

Re: [PATCH v2 0/1] Input: xpad - Implement wireless controller LED setting and fix connect time LED setting

2013-01-06 Thread Chris Moeller
On Mon, 10 Dec 2012 05:24:02 -0800 Chris Moeller wrote: > On Mon, 10 Dec 2012 04:43:54 -0800 > Chris Moeller wrote: > > > On Mon, 10 Dec 2012 02:58:25 -0800 > > Chris Moeller wrote: > > > > > On Sun, 2 Dec 2012 23:43:18 -0800 > > > Dmitry Torokhov wrote: > > > > > > > On Fri, Nov 30, 2012 a

Re: [PATCH v3 9/9] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-06 Thread Lan Tianyu
On 2013年01月06日 23:16, Sergei Shtylyov wrote: > Hello. > > On 06-01-2013 12:29, Lan Tianyu wrote: > >> 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 to allow or prohibit

Re: [PATCH v3 9/9] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-06 Thread Sergei Shtylyov
Hello. On 06-01-2013 12:29, Lan Tianyu wrote: 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 to allow or prohibit device to be power off the device. Call

[PATCH v3 9/9] usb: add usb_device_allow_power_off() and usb_device_prevent_power_off() function.

2013-01-06 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 to allow or prohibit device to be power off the device. Call pm_runtime_get_sync(portdev) to increase port's usage count and then por

[PATCH v3 8/9] usb: expose usb port's pm qos flags to user space

2013-01-06 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 power off. Signed-off-by: Lan Tianyu --- drivers/usb/core/port.c |9 +++-- 1 file changed, 7 insertions(+), 2 de

[PATCH v3 7/9] usb: add usb port auto power off mechanism

2013-01-06 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 cle

[PATCH v3 5/9] usb: Register usb port's acpi power resources

2013-01-06 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 --- drivers/usb/core/port.c |3 +++ drivers/usb/core/usb-acpi.c | 20 drivers/usb/core/usb.h |6 ++ 3

[PATCH v3 6/9] usb: add runtime pm support for usb port device

2013-01-06 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 power off when it is activ

[PATCH v3 4/9] usb: Create link files between child device and usb port device.

2013-01-06 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 --- drivers/usb/core/hub.c | 26 ++ 1 file c

[PATCH v3 3/9] usb: Add "portX/connect_type" attribute to expose usb port's connect type

2013-01-06 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 --- Documentation/ABI/testing/sysfs-bus-usb |9 +++ drivers/usb/core/port.c | 43

[PATCH v3 1/9] usb: Add driver/usb/core/(port.c,hub.h) files

2013-01-06 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 --- drivers/usb/core/Makefile |1 + drivers/usb/core/hub.c| 107 + drivers/usb/core/hub.h| 97

[PATCH v3 2/9] USB: Set usb port's DeviceRemovable according acpi information

2013-01-06 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 V3 0/9] usb: usb port power off mechanism anc expose usb port connect type

2013-01-06 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 call