On Fri, 30 Nov 2012, Lan Tianyu wrote: > On 2012年11月29日 01:44, Alan Stern wrote: > > On Sat, 17 Nov 2012, Lan Tianyu wrote: > > > >> This patch is to expose usb port's pm qos flags(pm_qos_no_power_off, > >> pm_qos_remote_wakeup) to user space. User can set pm_qos_no_power_off > >> flag to prohibit the port from being power off. > > > > Do we really need this? The user already can prevent the port from > > being powered off by writing "on" to the power/control attribute. > > > Hi Alan: > First, I think your suggestion could work. But I still have some concerns. > (1) power/control is to control runtime pm rather than power off, this > maybe confuse user space to use it to prevent power off. PM qos would be > more generic and friendly since it is dedicated to power off control. Well, power-off is a form of power management, so preventing power-off by preventing runtime PM makes sense. > (2) Some other buses(e.g SATA, PCI and etc) would also use PM qos to > control power off, too. So, I think we should keep consistency to be > convenient for user space to control. Keep using one same attribute to > control all kinds of devices. This second point is a very good one. You should include it in the patch description. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html