Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
Hi, On 22 September 2016 at 20:53, Felipe Balbi wrote: > > > Hi, > > Baolin Wang writes: static const struct usb_gadget_driver configfs_driver_template = { .bind = configfs_composite_bind, .unbind =

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
Hi, On 22 September 2016 at 20:53, Felipe Balbi wrote: > > > Hi, > > Baolin Wang writes: static const struct usb_gadget_driver configfs_driver_template = { .bind = configfs_composite_bind, .unbind = configfs_composite_unbind, +#ifdef

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Badhri Jagan Sridharan
Hi all, I do agree that udc-core's uevents can potentially be used here. I will check the complete list of uevents sent by the udc-core's usb_gadget_set_state function and see if the userspace is happy to work with it. Now that Android is starting to use the configfs driver, it might be much

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Badhri Jagan Sridharan
Hi all, I do agree that udc-core's uevents can potentially be used here. I will check the complete list of uevents sent by the udc-core's usb_gadget_set_state function and see if the userspace is happy to work with it. Now that Android is starting to use the configfs driver, it might be much

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Mark Brown
On Thu, Sep 22, 2016 at 03:38:30PM +0200, Greg KH wrote: > On Thu, Sep 22, 2016 at 08:41:09PM +0800, Baolin Wang wrote: > > OK. I will talk with Badhri if I can upstream these. > That's not an issue, you can keep the "From:" line on it, if you got it > in a legal way, and then just have your

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Mark Brown
On Thu, Sep 22, 2016 at 03:38:30PM +0200, Greg KH wrote: > On Thu, Sep 22, 2016 at 08:41:09PM +0800, Baolin Wang wrote: > > OK. I will talk with Badhri if I can upstream these. > That's not an issue, you can keep the "From:" line on it, if you got it > in a legal way, and then just have your

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 08:41:09PM +0800, Baolin Wang wrote: > On 22 September 2016 at 20:23, Greg KH wrote: > > On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: > >> From: Badhri Jagan Sridharan > >> > >> Some USB managament on

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 08:41:09PM +0800, Baolin Wang wrote: > On 22 September 2016 at 20:23, Greg KH wrote: > > On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: > >> From: Badhri Jagan Sridharan > >> > >> Some USB managament on userspace (like Android system) rely on the uevents >

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> static const struct usb_gadget_driver configfs_driver_template = { >>> .bind = configfs_composite_bind, >>> .unbind = configfs_composite_unbind, >>> >>> +#ifdef CONFIG_USB_CONFIGFS_UEVENT >>> + .setup

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Felipe Balbi
Hi, Baolin Wang writes: >>> static const struct usb_gadget_driver configfs_driver_template = { >>> .bind = configfs_composite_bind, >>> .unbind = configfs_composite_unbind, >>> >>> +#ifdef CONFIG_USB_CONFIGFS_UEVENT >>> + .setup = configfs_setup, >>>

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
On 22 September 2016 at 20:23, Greg KH wrote: > On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: >> From: Badhri Jagan Sridharan >> >> Some USB managament on userspace (like Android system) rely on the uevents >> generated by the

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
On 22 September 2016 at 20:23, Greg KH wrote: > On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: >> From: Badhri Jagan Sridharan >> >> Some USB managament on userspace (like Android system) rely on the uevents >> generated by the composition driver to generate user notifications.

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: > From: Badhri Jagan Sridharan > > Some USB managament on userspace (like Android system) rely on the uevents > generated by the composition driver to generate user notifications. Thus this > patch adds uevents to be

Re: [PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Greg KH
On Thu, Sep 22, 2016 at 07:43:59PM +0800, Baolin Wang wrote: > From: Badhri Jagan Sridharan > > Some USB managament on userspace (like Android system) rely on the uevents > generated by the composition driver to generate user notifications. Thus this > patch adds uevents to be generated whenever

[PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
From: Badhri Jagan Sridharan Some USB managament on userspace (like Android system) rely on the uevents generated by the composition driver to generate user notifications. Thus this patch adds uevents to be generated whenever USB changes its state: connected, disconnected,

[PATCH v2] usb: gadget: Add uevent to notify userspace

2016-09-22 Thread Baolin Wang
From: Badhri Jagan Sridharan Some USB managament on userspace (like Android system) rely on the uevents generated by the composition driver to generate user notifications. Thus this patch adds uevents to be generated whenever USB changes its state: connected, disconnected, configured. The