Skip to content

Commit 9861a25

Browse files
jekhorJiri Kosina
authored andcommitted
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 <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Acked-by: Srinivas Pandruvada <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 9c730fe commit 9861a25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-sensor-custom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ hid_sensor_register_platform_device(struct platform_device *pdev,
862862
return ERR_PTR(-ENOMEM);
863863

864864
custom_pdev = platform_device_register_data(pdev->dev.parent, dev_name,
865-
PLATFORM_DEVID_NONE, hsdev,
865+
PLATFORM_DEVID_AUTO, hsdev,
866866
sizeof(*hsdev));
867867
kfree(dev_name);
868868
return custom_pdev;

0 commit comments

Comments
 (0)