public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Måns Rullgård" <mans@mansr.com>
Cc: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	linux-usb@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] dt-bindings: usb: add non-removable device property
Date: Thu, 28 Feb 2019 19:06:19 +0100	[thread overview]
Message-ID: <20190228180619.GB30532@kroah.com> (raw)
In-Reply-To: <yw1x4l8nvmu6.fsf@mansr.com>

On Thu, Feb 28, 2019 at 05:34:25PM +0000, Måns Rullgård wrote:
> >> --- a/drivers/usb/core/hub.c
> >> +++ b/drivers/usb/core/hub.c
> >> @@ -2392,6 +2392,14 @@ static void set_usb_port_removable(struct usb_device *udev)
> >>                 break;
> >>         }
> >>  
> >> +       /*
> >> +        * Otherwise, check whether DT indicates this device is non-removable.
> >> +        */
> >> +       if (of_property_read_bool(udev->dev.of_node, "non-removable")) {
> >> +               udev->removable = USB_DEVICE_FIXED;
> >> +               return;
> >> +       }
> >
> > Shouldn't this be an attribute of the USB hub's port, not the device
> > itself?  That's the way it works with ACPI, and odds are any description
> > of USB devices in DT is also going to look much like how ACPI describes
> > the devices, let's not try to diverge when it is not necessary.
> 
> Fine with me.  That's why I asked.
> 
> How about a non-removable-ports property in the hub node listing the
> hardwired ports?

Sounds reasonable to me as that should mirror what happens in ACPI, so
you should be able to just mirror what drivers/usb/core/usb-acpi.c does
for dt.

thanks,

greg k-h

      reply	other threads:[~2019-02-28 18:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 14:33 [RFC][PATCH] dt-bindings: usb: add non-removable device property Mans Rullgard
2019-02-28 15:13 ` Greg Kroah-Hartman
2019-02-28 15:22   ` Måns Rullgård
2019-02-28 15:52     ` Greg Kroah-Hartman
2019-02-28 17:34       ` Måns Rullgård
2019-02-28 18:06         ` Greg Kroah-Hartman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190228180619.GB30532@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mans@mansr.com \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox