Skip to content

Commit 4d3a13a

Browse files
superm1Jiri Kosina
authored andcommitted
HID: amd_sfh: Stop sensor before starting
Titas reports that the accelerometer sensor on their laptop only works after a warm boot or unloading/reloading the amd-sfh kernel module. Presumably the sensor is in a bad state on cold boot and failing to start, so explicitly stop it before starting. Cc: stable@vger.kernel.org Fixes: 93ce5e0 ("HID: amd_sfh: Implement SFH1.1 functionality") Reported-by: Titas <novatitas366@gmail.com> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=220670 Tested-by: Titas <novatitas366@gmail.com> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent 743c81c commit 4d3a13a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)
194194
if (rc)
195195
goto cleanup;
196196

197+
mp2_ops->stop(privdata, cl_data->sensor_idx[i]);
198+
amd_sfh_wait_for_response(privdata, cl_data->sensor_idx[i], DISABLE_SENSOR);
197199
writel(0, privdata->mmio + amd_get_p2c_val(privdata, 0));
198200
mp2_ops->start(privdata, info);
199201
status = amd_sfh_wait_for_response

0 commit comments

Comments
 (0)