lkml.org 
[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v1 11/12] usb: gadget: Add configfs attribuite for controling match_existing_only
From
Date


On 03.12.2018 04:45, Yu Chen wrote:
> Currently the "match_existing_only" of usb_gadget_driver in configfs is
> set to one which is not flexible.
> Dwc3 udc will be removed when usb core switch to host mode. This causes
> failure of writing name of dwc3 udc to configfs's UDC attribuite.
> To fix this we need to add a way to change the config of
> "match_existing_only".
> This patch adds a configfs attribuite for controling match_existing_only
> which allow user to config "match_existing_only".
>

To be honest I strongly disagree with that patch.
This attribute was intended for build-in gadgets to allow user to decide
whether probe should fail or gadget should wait for UDC (used when
gadget is built-in). For ConfigFS we expect the UDC to always exist
prior to binding a gadget to it. If UDC goes away from what ever reason
gadget should be unbound.

So what this patch does in my opinion is abusing the attribute and
hacking the kernel instead of creating a simple udev rule that whenever
dwc3 appears and it gadget should be enabled write its name to UDC
attribute.

Best regards,
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics

\
 
 \ /
  Last update: 2018-12-03 10:55    [W:1.109 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site