]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
HID: amd_sfh: Update HPD sensor structure elements
authorBasavaraj Natikar <Basavaraj.Natikar@amd.com>
Wed, 14 Feb 2024 14:41:41 +0000 (20:11 +0530)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:21:30 +0000 (18:21 -0400)
[ Upstream commit bbf0dec30696638b8bdc28cb2f5bf23f8d760b52 ]

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@amd.com>
Signed-off-by: Akshata MukundShetty <akshata.mukundshetty@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/amd-sfh-hid/amd_sfh_pcie.h

index 2d3203d3daeb33b7829bcb923ae2ea064d41d870..90f39bfe8050ec802bd09b5f00e99a645b7544bc 100644 (file)
@@ -119,10 +119,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;
        };