Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 28, 2019 at 02:33:44PM +0000, Mans Rullgard wrote:
> Add a boolean property indicating that a device is hardwired to the
> upstream port.  Although hubs can provide this information, they are not
> always configured correctly.  An alternate means of indicating this for
> built-in USB devices is thus useful.
> 
> Signed-off-by: Mans Rullgard <mans@xxxxxxxxx>
> ---
> I have a situation where userspace would like to know which USB devices
> are built-in, but the on-board hub doesn't have the right setting.
> Also, the hub itself can't be indicated as fixed in any other way that
> I'm aware of.

Then that's a firmware bug, right?  We have a way for firmware to export
this to the USB core, why not use that?  Your on-board hub should get a
firmware update with this information, let's not try to create
yet-another-way to define this type of information please.

> In a way, adding this property seems a bit silly since dt can only
> sensibly be used for hardwired devices in the first place.  Thus the
> mere presence of a dt node could be taken to indicate the same thing.
> On the other hand, it's conceivable that someone might dynamically
> generate a devicetree based on what happens to be connected on boot or
> something.  For that reason, and explicit property seems safer.
> ---
>  Documentation/devicetree/bindings/usb/usb-device.txt | 8 ++++++++
>  1 file changed, 8 insertions(+)

Can you show some code actually using this?  Again, this should "just
work" for USB today unless your platform is really broken (and if it is,
go complain to the vendor...)

thanks,

greg k-h



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux