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


Groups > linux.kernel > #1488779

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

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Baolin Wang <baolin.wang@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] usb: gadget: Add uevent to notify userspace
Date Thu, 22 Sep 2016 13:10:03 +0200
Message-ID <ska39-5ym-67@gated-at.bofh.it> (permalink)
References <sk9Tr-5fL-3@gated-at.bofh.it> <sk9Tr-5fL-1@gated-at.bofh.it>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mq8Ed8EHkmsVM+MQ7sDCcTpsZy0WBvW24yxE52mvQYQ=; b=JJ5E3v1iYp5g5fIDxnT/T2UfM26ddKJ9U0bavXOC9HDA0fzXjdgyOdGeeyFfJ+3ahE XBJeHga7rOzp0CrmoKt8YJpZwyoXcsA0iyEXU7caTaA4SNGFfyUtoUoyUoOydMTF0TJ/ eECkNde2IJMxo6EL8u8dYmkM5KRUbBiYbONZY=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mq8Ed8EHkmsVM+MQ7sDCcTpsZy0WBvW24yxE52mvQYQ=; b=HvY4Wuvdz1NjVj5Gx/EXFA1WYAVHtndlWAjPepwL1R4lGwMtoCvsJ08nLcqXgPeKHg IRORS5bTTlPnWFuSEhK/XXGFETxcRViVVvMiN9e7pVOcwLo+VTfdP53mxnP+X6jSBJgS hH5lY6DfRIUVz+GoaCvK5Pvh70US0vPlM9zmLmTQ6I+HTL4JnI/J79sVz3YgPlnffh/m MoJMdThAEPY8/GDlGAMxVCO9lzVWrIbZmVnp8E8MBdtwx9aOh826v7+IhxyPryZ49KGq omd/RIexnc4QP/3KDRmSwSNCla2p51SpIhCg126YYVL8f74HkdGtWqbkk2hROtmigT4T DUbg==
X-Gm-Message-State AE9vXwPLOvlh18hq38KC9wFcBwjW+r7hVPZC4/IjhTswg4fkd8RlcK+BdqBBvLDjISFLe67+QYl2MHfdJ5/3bCBv
X-Received by 10.13.231.199 with SMTP id q190mr911182ywe.26.1474542432941; Thu, 22 Sep 2016 04:07:12 -0700 (PDT)
MIME-Version 1.0
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 38
Organization linux.* mail to news gateway
X-Original-Cc Felipe Balbi <balbi@kernel.org>, Greg KH <gregkh@linuxfoundation.org>, Badhri Jagan Sridharan <Badhri@google.com>, USB <linux-usb@vger.kernel.org>, LKML <linux-kernel@vger.kernel.org>
X-Original-Date Thu, 22 Sep 2016 19:07:12 +0800
X-Original-Message-ID <CAMz4kuJQrkFvpfTbeQbf1ti_0ECvK7EMNkytu8Rbu0BY19FLWA@mail.gmail.com>
X-Original-References <97a7938a44dc6850dc6c94c36242231f0431210c.1474541017.git.baolin.wang@linaro.org> <20160922105858.GM7994@sirena.org.uk>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1488779

Show key headers only | View raw


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

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web