Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1488755 > unrolled thread

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

Started byMark Brown <broonie@kernel.org>
First post2016-09-22 13:00 +0200
Last post2016-09-22 13:10 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] usb: gadget: Add uevent to notify userspace Mark Brown <broonie@kernel.org> - 2016-09-22 13:00 +0200
    Re: [PATCH] usb: gadget: Add uevent to notify userspace Baolin Wang <baolin.wang@linaro.org> - 2016-09-22 13:10 +0200

#1488755 — Re: [PATCH] usb: gadget: Add uevent to notify userspace

FromMark Brown <broonie@kernel.org>
Date2016-09-22 13:00 +0200
SubjectRe: [PATCH] usb: gadget: Add uevent to notify userspace
Message-ID<sk9Tr-5fL-1@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

On Thu, Sep 22, 2016 at 06:53:12PM +0800, Baolin Wang wrote:
> From: Badhri Jagan Sridharan <Badhri@google.com>
> 
> 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 original code was created by Badhri Jagan Sridharan, and I did some
> optimization.
> 
> CC: Badhri Jagan Sridharan <Badhri@google.com>
> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>

If you're sending a patch someone else wrote you need their
Signed-off-by - if they didn't provide one you need to talk to them
about that and get it.

> +config USB_CONFIGFS_UEVENT
> +	boolean "Uevent notification of Gadget state"
> +	depends on USB_CONFIGFS
> +	help
> +	  Enable uevent notifications to userspace when the gadget
> +	  state changes. The gadget can be in any of the following
> +	  three states: "CONNECTED/DISCONNECTED/CONFIGURED"

Why not just generate the events unconditionally?

[toc] | [next] | [standalone]


#1488779

FromBaolin Wang <baolin.wang@linaro.org>
Date2016-09-22 13:10 +0200
Message-ID<ska39-5ym-67@gated-at.bofh.it>
In reply to#1488755
On 22 September 2016 at 18:58, Mark Brown <broonie@kernel.org> wrote:
> On Thu, Sep 22, 2016 at 06:53:12PM +0800, Baolin Wang wrote:
>> From: Badhri Jagan Sridharan <Badhri@google.com>
>>
>> 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 original code was created by Badhri Jagan Sridharan, and I did some
>> optimization.
>>
>> CC: Badhri Jagan Sridharan <Badhri@google.com>
>> Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
>
> If you're sending a patch someone else wrote you need their
> Signed-off-by - if they didn't provide one you need to talk to them
> about that and get it.

Ah, I missed that. I will add it if there are no objection from Badhr.i

>
>> +config USB_CONFIGFS_UEVENT
>> +     boolean "Uevent notification of Gadget state"
>> +     depends on USB_CONFIGFS
>> +     help
>> +       Enable uevent notifications to userspace when the gadget
>> +       state changes. The gadget can be in any of the following
>> +       three states: "CONNECTED/DISCONNECTED/CONFIGURED"
>
> Why not just generate the events unconditionally?

If userspace doesn't need notification, then we can save some time to
do the enumeration without the uevent things.

-- 
Baolin.wang
Best Regards

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web