Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: orientation: hid-sensor-rotation: Add PM function (fix non working driver)

This fix makes newer ISH hubs work. Previous ones worked by lucky
coincidence.

Rotation sensor function does not work due to miss PM function.
Add common hid sensor iio pm function for rotation sensor.

Further clarification from Srinivas:

If CONFIG_PM is not defined, then this prevents this sensor to
function. So above commit caused this.

This sensor was supposed to be always on to trigger wake up in prior
external hubs. But with the new ISH hub this is not the case.

Signed-off-by: Song Hongyan <hongyan.song@intel.com>
Fixes: 2b89635e9a9e ("iio: hid_sensor_hub: Common PM functions")
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>

authored by

Song Hongyan and committed by
Jonathan Cameron
8af644a7 d304286a

+1
+1
drivers/iio/orientation/hid-sensor-rotation.c
··· 335 335 .id_table = hid_dev_rot_ids, 336 336 .driver = { 337 337 .name = KBUILD_MODNAME, 338 + .pm = &hid_sensor_pm_ops, 338 339 }, 339 340 .probe = hid_dev_rot_probe, 340 341 .remove = hid_dev_rot_remove,