[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1706091046270.2100-100000@iolanthe.rowland.org>
Date: Fri, 9 Jun 2017 10:48:41 -0400 (EDT)
From: Alan Stern <stern@...land.harvard.edu>
To: Yueyao Zhu <yueyao.zhu@...il.com>
cc: Jiri Kosina <jikos@...nel.org>,
Benjamin Tissoires <benjamin.tissoires@...hat.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>, <linux-usb@...r.kernel.org>,
<linux-input@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
Andrew Chant <achant@...gle.com>,
Badhri Jagan Sridharan <badhri@...gle.com>,
Dmitry Torokhov <dtor@...gle.com>,
Yueyao Zhu <yueyao@...gle.com>
Subject: Re: [PATCH 0/3] USB: add API for interface driver to vote for
autosuspend
On Thu, 8 Jun 2017, Yueyao Zhu wrote:
> From: Yueyao Zhu <yueyao@...gle.com>
>
> Currently, if a USB driver would like to enable autosuspend on the USB
> device, usb_enable_autosuspend() seems to be the only option. However,
> this acts on the device level, and other interfaces might not desire
> to autosuspend the USB device.
>
> For example, for the usb digital audio driver to enable autosuspend on
> a device, calling usb_enable_autosuspend() from the interface driver
> might not be a good idea as the USB device might have a keyboard HID
> interface which generally doesn't handle autosupend very well.
>
> This patch series introduces an API for interface driver to vote
> for autosuspend on the interface, and when all interfaces agree to
> it, autosuspend can then be enabled on the usb device.
The whole idea of this seems questionable. USB interface drivers are
generally not supposed to enable or disable autosuspend -- that is a
policy decision left up to userspace. There are a few exceptions for
things like hubs, but this is generally true.
Why should the USB digital audio driver want to enable autosuspend?
Alan Stern
Powered by blists - more mailing lists