Re: [RFC]Johan's patch for touchscreens and port power off

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

 



On Wed, 10 Sep 2014, Oliver Neukum wrote:

> On Tue, 2014-09-09 at 14:33 -0400, Alan Stern wrote:
> 
> > Only runtime D3cold would be affected.  System suspend would still be 
> > able to use D3cold.
> 
> Yes. But it looks like system suspend is on the way out in the long run.

Regardless, this is puzzling.  As far as I am aware, the decision about 
whether to use D3hot vs. D3cold for runtime suspend is made in the PCI 
core, with no reference to whether or not any of the host controller's 
ports are still powered.

> > Also, if the user doesn't care about the touchscreen, you could unbind 
> > it from the driver.  Then the kernel would suspend it and power-off the 
> > port before the device could reconnect.
> 
> 1. This solution has an inevitable race with open()

Not our problem.  Unbinding is carried out by userspace.  If userspace 
races with itself, the kernel can't help.

> 2. Unbinding devices that need constant polling is risky.
>    Something can keep the devices awake until it reconnects.

Why does the device need constant polling if it isn't being used?

> 3. What do you do in the case of system suspend?

The same as we do for any other device whose port has been powered-off.

> In short, this looks like a very bad idea to me.

Have you tried it?

Besides, what about the fact that this entire discussion is moot?  
Johan says that the touchscreen's port can't be powered down anyway.

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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux