History log of /linux-master/drivers/hid/amd-sfh-hid/sfh1_1/amd_sfh_init.c
Revision Date Author Comments
# 6296562f 14-Feb-2024 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Extend MP2 register access to SFH

Various MP2 register sets are supported by newer processors. Therefore,
extend MP2 register access to SFH.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>


# 584f35a3 19-Dec-2023 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Add a new interface for exporting ALS data

AMDSFH has information about the Ambient light via the Ambient
Light Sensor (ALS) which is part of the AMD sensor fusion hub.

Add a new interface to export this information, where other drivers like
PMF can use this information to enhance user experiences.

Link: https://lore.kernel.org/all/ad064333-48a4-4cfa-9428-69e8a7c44667@redhat.com/
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>


# b5b0774d 19-Dec-2023 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Add a new interface for exporting HPD data

AMDSFH has information about the User presence information via the Human
Presence Detection (HPD) sensor which is part of the AMD sensor fusion hub.

Add a new interface to export this information, where other drivers like
PMF can use this information to enhance user experiences.

Link: https://lore.kernel.org/all/ad064333-48a4-4cfa-9428-69e8a7c44667@redhat.com/
Co-developed-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>


# 19b60acc 08-May-2023 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Split sensor and HID initialization for SFH1.1

Sensors are enabled independently of HID device initialization. Sensor
initialization should be kept separate in this case, while HID devices
should be initialized according to the sensor state. Hence split sensor
initialization and HID initialization for SFH1.1 into separate blocks.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# c0709c6c 08-May-2023 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Remove duplicate cleanup for SFH1.1

A duplicate cleanup is performed that is not necessary. As a result,
remove duplicate cleanup and use common cleanup.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 8455cbb2 11-Apr-2023 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Handle "no sensors" enabled for SFH1.1

Based on num_hid_devices, each sensor device is initialized. If
"no sensors" is initialized, amd_sfh work initialization and scheduling
doesn’t make sense and returns EOPNOTSUPP to stop driver probe. Hence,
add a check for "no sensors" enabled to handle the special case.

Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 2a33ad4a 02-Jan-2023 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Fix warning unwind goto

Return directly instead of using existing goto will not cleanup
previously allocated resources. Hence replace return with goto
to fix warning unwind goto which cleanups previously allocated
resources.

Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 68266bdc 27-Sep-2022 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Handle condition of "no sensors" for SFH1.1

Based on num_hid_devices, each sensor device registers to HID. If
"no sensors" then amd_sfh work initialization and scheduling
doesn’t make sense and return ENODEV to stop driver probe.
Hence add a check for num_hid_devices to handle special
case in the situation of "no sensors" for SFH1.1.

Fixes: 93ce5e0231d7 ("HID: amd_sfh: Implement SFH1.1 functionality")
Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# beb18bb2 27-Sep-2022 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Change dev_err to dev_dbg for additional debug info

Users should only be notified at most one time on systems doesn't have
any sensors connected or non-supported systems.

Check the return code and don't display error messages in those
conditions.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 93ce5e02 12-Jul-2022 Basavaraj Natikar <Basavaraj.Natikar@amd.com>

HID: amd_sfh: Implement SFH1.1 functionality

Newer AMD SOCs use SFH1.1 memory access with new PCI-id. Hence add new
sfh1_1 sub directory to implement SFH1.1 functionality by defining new
PCI id, interface functions, descriptor functions and handlers which
invokes sfh1.1.

Signed-off-by: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>