Skip to contentSkip to conversation

HID: amd_sfh: Stop sensor before starting

PATCH Applied Mario Limonciello (AMD) 2 participants 2 messages Oct 20, 2025 – Oct 30, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

Fixes 93ce5e0231d79 ("HID: amd_sfh: Implement SFH1.1 functionality")
---
 drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c +2 -0
index 0a9b44ce4904e..b0bab2a1ddcc5 100644
@@ -194,6 +194,8 @@ static int amd_sfh1_1_hid_client_init(struct amd_mp2_dev *privdata)
 		if (rc)
 			goto cleanup;
 
+		mp2_ops->stop(privdata, cl_data->sensor_idx[i]);
+		amd_sfh_wait_for_response(privdata, cl_data->sensor_idx[i], DISABLE_SENSOR);
 		writel(0, privdata->mmio + amd_get_p2c_val(privdata, 0));
 		mp2_ops->start(privdata, info);
 		status = amd_sfh_wait_for_response
Signature · 1 line
2.43.0
maintainer Applied
#1 lore raw
Quoted 7 lines · Mario Limonciello (AMD)

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.

Quoted 6 lines
Fixes 93ce5e0231d79 ("HID: amd_sfh: Implement SFH1.1 functionality")

Applied, thanks.

Signature · 2 lines
Jiri Kosina
SUSE Labs