diff options
author | Hans de Goede <hdegoede@redhat.com> | 2021-11-26 18:21:08 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2021-12-08 17:34:57 +0300 |
commit | c5200609c9176482ea96ac73e52bd466b622f385 (patch) | |
tree | ce231b39152f129bdcb0caf4821049304761e157 /drivers/acpi/pmic/intel_pmic.h | |
parent | e172e650eda3274964df3a74cf12d210eae9a044 (diff) | |
download | linux-c5200609c9176482ea96ac73e52bd466b622f385.tar.xz |
ACPI: PMIC: allow drivers to provide a custom lpat_raw_to_temp() function
The LPAT tables used in the DSDT for some PMICs require special handling,
allow the PMIC OpRegion drivers to provide an alternative implementation
by adding a lpat_raw_to_temp function pointer to struct pmic_table;
and initialize this to the default acpi_lpat_raw_to_temp function
for all PMICs.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pmic/intel_pmic.h')
-rw-r--r-- | drivers/acpi/pmic/intel_pmic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/acpi/pmic/intel_pmic.h b/drivers/acpi/pmic/intel_pmic.h index 467a39966dc8..d956b03a6ca0 100644 --- a/drivers/acpi/pmic/intel_pmic.h +++ b/drivers/acpi/pmic/intel_pmic.h @@ -2,6 +2,8 @@ #ifndef __INTEL_PMIC_H #define __INTEL_PMIC_H +#include <acpi/acpi_lpat.h> + struct pmic_table { int address; /* operation region address */ int reg; /* corresponding thermal register */ @@ -17,6 +19,8 @@ struct intel_pmic_opregion_data { int (*update_policy)(struct regmap *r, int reg, int bit, int enable); int (*exec_mipi_pmic_seq_element)(struct regmap *r, u16 i2c_address, u32 reg_address, u32 value, u32 mask); + int (*lpat_raw_to_temp)(struct acpi_lpat_conversion_table *lpat_table, + int raw); struct pmic_table *power_table; int power_table_count; struct pmic_table *thermal_table; |