Re: [PATCH v4 1/2] Input: enable i8042-level wakeup control

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

 



On 08/03/2011 02:59 PM, Dmitry Torokhov wrote:
Hi Daniel,

On Tue, Aug 02, 2011 at 04:49:15PM +0100, Daniel Drake wrote:
The OLPC XO laptop is able to use the PS/2 controller as a wakeup source.
When used as a wakeup source, the key press/mouse motion must not be lost.

Add infrastructure to allow controllers to be marked as wakeup-capable,
and avoid doing power control/reset on the i8042/serio/input devices when
running in this mode. For systems where this functionality is available,
you are expected to enable wakeups on the i8042 device, the serio
devices, and the relevant input devices, to ensure that the hardware is
left powered and untouched throughout the suspend/resume.

Signed-off-by: Daniel Drake<dsd@xxxxxxxxxx>
---
  drivers/input/input.c                 |    6 +++-
  drivers/input/keyboard/atkbd.c        |    4 ++-
  drivers/input/mouse/hgpk.c            |    2 +
  drivers/input/mouse/psmouse-base.c    |    4 ++-
  drivers/input/serio/i8042-io.h        |    4 ++
  drivers/input/serio/i8042-ip22io.h    |    4 ++
  drivers/input/serio/i8042-jazzio.h    |    4 ++
  drivers/input/serio/i8042-ppcio.h     |    4 ++
  drivers/input/serio/i8042-snirm.h     |    4 ++
  drivers/input/serio/i8042-sparcio.h   |    4 ++
  drivers/input/serio/i8042-x86ia64io.h |    4 ++
  drivers/input/serio/i8042.c           |   62 +++++++++++++++++++++++++++++---
  drivers/input/serio/serio.c           |   29 +++++++++++++--
  13 files changed, 122 insertions(+), 13 deletions(-)


  	serio->port_data	= port;
-	serio->dev.parent	=&i8042_platform_device->dev;
+	serio->dev.parent	= parent;
+	device_set_wakeup_capable(&serio->dev, device_can_wakeup(parent));
  	if (idx<  0) {
  		strlcpy(serio->name, "i8042 AUX port", sizeof(serio->name));
  		strlcpy(serio->phys, I8042_AUX_PHYS_DESC, sizeof(serio->phys));
@@ -1403,6 +1450,9 @@ static int __init i8042_probe(struct platform_device *dev)
  		i8042_dritek_enable();
  #endif

+	if (i8042_enable_wakeup)
+		device_set_wakeup_capable(&dev->dev, true);
+

	device_set_wakeup_capable(&dev->dev, i8042_enable_wakeup); ?

Hi Daniel:
	May be you missed this comment by Dmitry?

Thanks
Best Regards
Wanlong Gao
--
To unsubscribe from this list: send the line "unsubscribe linux-input" 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 Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux