[<prev] [next>] [day] [month] [year] [list]
Message-ID: <fa0492da-7b18-47f8-8c79-a640835a3174@rowland.harvard.edu>
Date: Mon, 18 Dec 2023 12:57:00 -0500
From: Alan Stern <stern@...land.harvard.edu>
To: Yinghua Yang Yang <yinghua.yang@...orolasolutions.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
zachary.zuzzio@...orolasolutions.com,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Oliver Neukum <oneukum@...e.com>, Lukas Bulwahn <lukas.bulwahn@...il.com>,
Wentong Wu <wentong.wu@...el.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org
Subject: Re: [PATCH] usb: misc: Add driver for Motorola Solutions security
accessories
On Sun, Dec 17, 2023 at 09:56:34PM -0600, Yinghua Yang Yang wrote:
> Is there a way to set the auto suspend mode for a usb device without root
> permission? I think this is a general question for many usb devices.
> According to the Linux Kernel document
> https://www.kernel.org/doc/Documentation/usb/power-management.txt, by
> default the kernel disables autosuspend for all devices. So there are many
> usb devices that support autosuspend but by default autosuspend is
> disabled. In order to support autosuspend on those devices, are the only
> solutions 1) obtain root permission and write ../power/control file using a
> script
It doesn't have to be a script; any sort of program can do it. A
power-management daemon such as PowerTOP, for example.
> 2) work with the hardware vendor on a driver/kernel to write the
> autosuspend flag?
That would be kind of silly. After all, if the vendor is willing to
work with you on a kernel driver, they certainly ought to be willing to
work with you on installing a power-management userspace program. And
installing a program should be much easier than getting a new driver
into the kernel.
But to answer your question -- Yes, the only ways to modify the
autosuspend settings are from userspace or from within the kernel.
Alan Stern
Powered by blists - more mailing lists