summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-sensor-custom.c
diff options
context:
space:
mode:
authorYauhen Kharuzhy <jekhor@gmail.com>2022-11-06 00:34:22 +0200
committerJiri Kosina <jkosina@suse.cz>2022-11-14 15:01:05 +0100
commit9861a25fc248508c781c18b198436c0a97cb3d99 (patch)
tree361efeebf20705164822355eb3cb47834912c6d0 /drivers/hid/hid-sensor-custom.c
parent9c730fe10493d309f402cbd28ad539379b13a24d (diff)
HID: hid-sensor-custom: Allow more than one hinge angle sensor
Some devices has two sets of accelerometers and the sensor hub exports two hinge angle 'sensors' based on accelerometer values. To allow more than one sensor of the same type, use PLATFORM_DEVID_AUTO instead of PLATFORM_DEVID_NONE when registering platform device for it. Checked on the Lenovo Yoga Book YB1-X91L tablet. Signed-off-by: Yauhen Kharuzhy <jekhor@gmail.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-sensor-custom.c')
-rw-r--r--drivers/hid/hid-sensor-custom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-sensor-custom.c b/drivers/hid/hid-sensor-custom.c
index 32c2306e240d..a6fc89ee1287 100644
--- a/drivers/hid/hid-sensor-custom.c
+++ b/drivers/hid/hid-sensor-custom.c
@@ -862,7 +862,7 @@ hid_sensor_register_platform_device(struct platform_device *pdev,
return ERR_PTR(-ENOMEM);
custom_pdev = platform_device_register_data(pdev->dev.parent, dev_name,
- PLATFORM_DEVID_NONE, hsdev,
+ PLATFORM_DEVID_AUTO, hsdev,
sizeof(*hsdev));
kfree(dev_name);
return custom_pdev;