]> git.baikalelectronics.ru Git - kernel.git/commit
HID: i2c-hid: add runtime PM support
authorMika Westerberg <mika.westerberg@linux.intel.com>
Wed, 29 Jan 2014 09:24:36 +0000 (11:24 +0200)
committerJiri Kosina <jkosina@suse.cz>
Thu, 30 Jan 2014 10:18:30 +0000 (11:18 +0100)
commit2673642789ccc48bcda4c477e91c3e1313f143d3
treee21748add1b93e789520ab4503e9552d09fbca4e
parentb67dcf02c9fc692b56efd8892e7e1ac40b108670
HID: i2c-hid: add runtime PM support

This patch adds runtime PM support for the HID over I2C driver. When the
i2c-hid device is first opened we power it on and on the last close we
power it off. This is actually what the driver is already doing but in
addition it allows subsystems, like ACPI power domain to power off the
device during runtime PM suspend, which should save even more power.

The implementation is not the most power efficient because it needs some
interaction from the userspace (e.g close the device node whenever we are
no more interested in getting events), nevertheless it allows us to save
some power and works with devices that are not wake capable.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/i2c-hid/i2c-hid.c