[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1eafffa7-9183-d9c9-2d22-410cc6e0982a@samsung.com>
Date: Mon, 3 Dec 2018 10:53:28 +0100
From: Krzysztof Opasiak <k.opasiak@...sung.com>
To: Yu Chen <chenyu56@...wei.com>, linux-usb@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: suzhuangluan@...ilicon.com, kongfei@...ilicon.com,
Felipe Balbi <balbi@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
John Stultz <john.stultz@...aro.org>,
Binghui Wang <wangbinghui@...ilicon.com>
Subject: Re: [PATCH v1 11/12] usb: gadget: Add configfs attribuite for
controling match_existing_only
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
Powered by blists - more mailing lists