Skip to content

Commit 666cf30

Browse files
Daniel ThompsonJiri Kosina
authored andcommitted
HID: sensor-hub: Allow multi-function sensor devices
The Lenovo Yoga C630 has a combined keyboard and accelerometer that interfaces via i2c-hid. Currently this laptop either has a working keyboard (if CONFIG_HID_SENSOR_HUB is disabled) or a working accelerometer. only works on kernels. Put another way, most distro kernels enable CONFIG_HID_SENSOR_HUB and therefore cannot work on this device since the keyboard doesn't work! Fix this by providing a richer connect mask during the probe. With this change both keyboard and screen orientation sensors work correctly. Signed-off-by: Daniel Thompson <[email protected]> Acked-by: Srinivas Pandruvada<[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 1d75460 commit 666cf30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-sensor-hub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ static int sensor_hub_probe(struct hid_device *hdev,
632632
}
633633
INIT_LIST_HEAD(&hdev->inputs);
634634

635-
ret = hid_hw_start(hdev, 0);
635+
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
636636
if (ret) {
637637
hid_err(hdev, "hw start failed\n");
638638
return ret;

0 commit comments

Comments
 (0)