Re: [PATCH v4 1/2] driver core: Move the "removable" attribute from USB to core

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

 



On Thu, May 13, 2021 at 04:27:00PM -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.
> 
> Signed-off-by: Rajat Jain <rajatja@xxxxxxxxxx>
> ---
> v4: - instead of devicce_type->supports_removable, add 1 more value in
>       device_removable_enum
>     - documentation update.
>     - Remove "Acked-by" and "Reviewed-by" tags from previous versions.
> v3: - Minor commit log / comments updated.
>     - use sysfs_emit()
>     - Rename local variable name (state -> loc)
>     - change supports_removable flag from bool to bitfield.
> v2: Add documentation

This looks good to me, I have no further objection to it at all, nice
cleanups.

I can take this in my driver-core tree, so that other busses can use it
(and can create a tag to pull from if needed), or I can also take the
PCI patch (patch 2/2 here), if Bjorn gives his reviewed-by: for it.

Are there other busses besides PCI that you want to enable this soon
(i.e. before 5.14-rc1)?

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