thermal: intel: int340x: Capability to map user space to firmware values
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Wed, 19 Jun 2024 12:45:59 +0000 (05:45 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 21 Jun 2024 13:20:28 +0000 (15:20 +0200)
commit332ed4e5c4a347f79acc2a45575700cbf22ff9fe
tree9671b0aee237464b7ebbc38cc0ec31ec33fce7ea
parent822b2a7c958c7115feb94417d6b941bdc558d621
thermal: intel: int340x: Capability to map user space to firmware values

To ensure compatibility between user inputs and firmware requirements,
a conversion mechanism is necessary for certain attributes. For instance,
on some platforms, the DLVR frequency must be translated into a predefined
index before being communicated to the firmware. On Lunar Lake platform:
RFI_FREQ_SELECT and RFI_FREQ:
Index 0 corresponds to a DLVR frequency of 2227.2 MHz
Index 1 corresponds to a DLVR frequency of 2140 MHz

Introduce a feature that enables the conversion of values between user
space inputs and firmware-accepted formats. This feature would also
facilitate the reverse process, converting firmware values back into user
friendly display values.

To support this functionality, a model-specific mapping table will be
utilized. When available, this table will provide the necessary
translations between user space values and firmware values, ensuring
seamless communication and accurate settings.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Link: https://patch.msgid.link/20240619124600.491168-3-srinivas.pandruvada@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/thermal/intel/int340x_thermal/processor_thermal_rfim.c