Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1489705
| From | Baolin Wang <baolin.wang@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] usb: gadget: Add uevent to notify userspace |
| Date | 2016-09-23 04:20 +0200 |
| Message-ID | <skofL-687-5@gated-at.bofh.it> (permalink) |
| References | <skaFQ-5LW-21@gated-at.bofh.it> <skbiy-6i0-39@gated-at.bofh.it> <skbBT-6t2-3@gated-at.bofh.it> <skbLz-6w3-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi,
On 22 September 2016 at 20:53, Felipe Balbi <balbi@kernel.org> wrote:
>
>
> Hi,
>
> Baolin Wang <baolin.wang@linaro.org> 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,
>>>> + .reset = configfs_disconnect,
>>>> + .disconnect = configfs_disconnect,
>>>> +#else
>>>> .setup = composite_setup,
>>>> .reset = composite_disconnect,
>>>> .disconnect = composite_disconnect,
>>>> +#endif
>
> nope, this is quite wrong.
>
>>>> @@ -1453,6 +1556,10 @@ static struct config_group *gadgets_make(
>>>> gi->composite.gadget_driver.function = kstrdup(name, GFP_KERNEL);
>>>> gi->composite.name = gi->composite.gadget_driver.function;
>>>>
>>>> +#ifdef CONFIG_USB_CONFIGFS_UEVENT
>>>> + INIT_WORK(&gi->work, configfs_work);
>>>> +#endif
>>>
>>> This is just way too ugly, please make it so there are no #ifdefs in the
>>> .c files.
>>>
>>> Or, as others said, why is this a build option at all, why would you not
>>> always want this enabled if you are relying on it all of the time?
>>
>> Sometimes userspace does not need the notification, it is not all the
>> time. Anyway I will remove the macro if you still insist on that.
>
> what's wrong with the sysfs we already have for this?
If Android system userspace can support udc-core's uevents like Badhri
said, I am fine with that.
--
Baolin.wang
Best Regards
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2] usb: gadget: Add uevent to notify userspace Baolin Wang <baolin.wang@linaro.org> - 2016-09-22 13:50 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Greg KH <gregkh@linuxfoundation.org> - 2016-09-22 14:30 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Baolin Wang <baolin.wang@linaro.org> - 2016-09-22 14:50 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Felipe Balbi <balbi@kernel.org> - 2016-09-22 15:00 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Baolin Wang <baolin.wang@linaro.org> - 2016-09-23 04:20 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Greg KH <gregkh@linuxfoundation.org> - 2016-09-22 15:50 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Mark Brown <broonie@kernel.org> - 2016-09-22 18:40 +0200
Re: [PATCH v2] usb: gadget: Add uevent to notify userspace Badhri Jagan Sridharan <badhri@google.com> - 2016-09-22 23:00 +0200
csiph-web