[PATCH 5/8] HID: amd_sfh: Update HPD sensor structure elements

Li Ma li.ma at amd.com
Fri Mar 29 10:17:47 UTC 2024


From: Basavaraj Natikar <Basavaraj.Natikar at amd.com>

HPD sensor data is not populating properly because of wrong order of HPD
sensor structure elements. So update the order of structure elements to
match the HPD sensor data received from the firmware.

Fixes: 24a31ea94922 ("HID: amd_sfh: Add initial support for HPD sensor")
Co-developed-by: Akshata MukundShetty <akshata.mukundshetty at amd.com>
Signed-off-by: Akshata MukundShetty <akshata.mukundshetty at amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar at amd.com>
(cherry picked from commit 8ca9ae7d61b322df7158d07d03509d6c483b8d70)
---
 drivers/hid/amd-sfh-hid/amd_sfh_pcie.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
index 70add75fc506..05e400a4a83e 100644
--- a/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
+++ b/drivers/hid/amd-sfh-hid/amd_sfh_pcie.h
@@ -90,10 +90,10 @@ enum mem_use_type {
 struct hpd_status {
 	union {
 		struct {
-			u32 human_presence_report : 4;
-			u32 human_presence_actual : 4;
-			u32 probablity		  : 8;
 			u32 object_distance       : 16;
+			u32 probablity		  : 8;
+			u32 human_presence_actual : 4;
+			u32 human_presence_report : 4;
 		} shpd;
 		u32 val;
 	};
-- 
2.25.1



More information about the amd-gfx mailing list