• Mika Westerberg's avatar
    HID: i2c-hid: add runtime PM support · 34f439e4
    Mika Westerberg authored
    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: default avatarMika Westerberg <mika.westerberg@linux.intel.com>
    Reviewed-by: default avatarBenjamin Tissoires <benjamin.tissoires@redhat.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    34f439e4
i2c-hid.c 27.8 KB