diff options
author | 2024-05-07 12:40:45 +0530 | |
---|---|---|
committer | 2024-05-07 15:18:47 +0200 | |
commit | 7902ec988a9a6552b58d096df10605ed82d7bbc4 (patch) | |
tree | 7202df0b93855c82c2f68d58f74fee9b6b9b469f /drivers/hid | |
parent | HID: amd_sfh: Handle "no sensors" in PM operations (diff) | |
download | linux-7902ec988a9a6552b58d096df10605ed82d7bbc4.tar.gz linux-7902ec988a9a6552b58d096df10605ed82d7bbc4.tar.bz2 linux-7902ec988a9a6552b58d096df10605ed82d7bbc4.zip |
HID: amd_sfh: Use amd_get_c2p_val() to read C2P register
Newer processors support various MP2 register sets. Therefore, to ensure
compatibility and obtain C2P data, use the amd_get_c2p_val().
Co-developed-by: Patil Rajesh Reddy <patreddy@amd.com>
Signed-off-by: Patil Rajesh Reddy <patreddy@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c index 2de2668a0277..4676f060da26 100644 --- a/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c +++ b/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_interface.c @@ -97,7 +97,7 @@ static int amd_sfh_hpd_info(u8 *user_present) if (!emp2 || !emp2->dev_en.is_hpd_present) return -ENODEV; - hpdstatus.val = readl(emp2->mmio + AMD_C2P_MSG(4)); + hpdstatus.val = readl(emp2->mmio + amd_get_c2p_val(emp2, 4)); *user_present = hpdstatus.shpd.presence; return 0; |