From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Rajat Jain <rajatja@google.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Alan Stern" <stern@rowland.harvard.edu>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
linux-usb@vger.kernel.org, helgaas@kernel.org,
"Oliver Neukum" <oneukum@suse.com>,
"David Laight" <David.Laight@aculab.com>,
"Krzysztof Wilczyński" <kw@linux.com>,
rajatxjain@gmail.com, jsbarnes@google.com, dtor@google.com
Subject: Re: [PATCH v5 1/2] driver core: Move the "removable" attribute from USB to core
Date: Thu, 27 May 2021 09:40:40 +0200 [thread overview]
Message-ID: <YK9M+OQ33+A5PFVB@kroah.com> (raw)
In-Reply-To: <20210524171812.18095-1-rajatja@google.com>
On Mon, May 24, 2021 at 10:18:11AM -0700, Rajat Jain wrote:
> Move the "removable" attribute from USB to core in order to allow it to be
> supported by other subsystem / buses. Individual buses that want to support
> this attribute can populate the removable property of the device while
> enumerating it with the 3 possible values -
> - "unknown"
> - "fixed"
> - "removable"
> Leaving the field unchanged (i.e. "not supported") would mean that the
> attribute would not show up in sysfs for that device. The UAPI (location,
> symantics etc) for the attribute remains unchanged.
>
> Move the "removable" attribute from USB to the device core so it can be
> used by other subsystems / buses.
>
> By default, devices do not have a "removable" attribute in sysfs.
>
> If a subsystem or bus driver wants to support a "removable" attribute, it
> should call device_set_removable() before calling device_register() or
> device_add(), e.g.:
>
> device_set_removable(dev, DEVICE_REMOVABLE);
> device_register(dev);
>
> The possible values and the resulting sysfs attribute contents are:
>
> DEVICE_REMOVABLE_UNKNOWN -> "unknown"
> DEVICE_REMOVABLE -> "removable"
> DEVICE_FIXED -> "fixed"
>
> Convert the USB "removable" attribute to use this new device core
> functionality. There should be no user-visible change in the location or
> semantics of attribute for USB devices.
>
> Signed-off-by: Rajat Jain <rajatja@google.com>
> Reviewed-by: Bjorn Helgaas <bhelgaas@google.com>
> ---
> v5: - Update commit log per Bjorn's suggestion, and add "Reviewed by".
> - don't check for dev!=NULL
I've applied this series to my USB tree now, thanks for reworking it so
many times.
greg k-h
prev parent reply other threads:[~2021-05-27 7:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-24 17:18 [PATCH v5 1/2] driver core: Move the "removable" attribute from USB to core Rajat Jain
2021-05-24 17:18 ` [PATCH v5 2/2] PCI: Add sysfs "removable" attribute Rajat Jain
2021-05-27 7:40 ` 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=YK9M+OQ33+A5PFVB@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=David.Laight@aculab.com \
--cc=bhelgaas@google.com \
--cc=dtor@google.com \
--cc=helgaas@kernel.org \
--cc=jsbarnes@google.com \
--cc=kw@linux.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=rafael@kernel.org \
--cc=rajatja@google.com \
--cc=rajatxjain@gmail.com \
--cc=stern@rowland.harvard.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.