2023-12-15 22:46:39

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH] usb: misc: Add driver for Motorola Solutions security accessories

On Fri, Dec 15, 2023 at 03:12:10PM -0600, Yinghua Yang wrote:
> New USB driver that sets power/control to autosuspend for Motorola
> Solutions security accessories. The new driver only changes the power
> control for specific USB devices, normal read/write/ioctl of the usb
> device uses the unmodified usbfs.
>
> The rationale for a vendor specific driver was to allow for autosuspend
> behavior on Linux installations that are battery powered and do not
> allow user modifications to udev settings (e.g. embedded Linux, Android,
> etc.). The idealistic generic approach that would allow any USB device
> that supports autosuspend to change the power control could not be found
> without a change to the USB standard or substantial change to the usbfs
> architecture.
>
> Signed-off-by: Yinghua Yang <[email protected]>
> ---

It seems silly to write a kernel driver for this. Isn't there any way
to handle it in userspace? All you would need is a simple shell
script.

Alan Stern