summaryrefslogtreecommitdiff
path: root/drivers/acpi/pmic/intel_pmic.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2021-11-26 18:21:08 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-12-08 17:34:57 +0300
commitc5200609c9176482ea96ac73e52bd466b622f385 (patch)
treece231b39152f129bdcb0caf4821049304761e157 /drivers/acpi/pmic/intel_pmic.c
parente172e650eda3274964df3a74cf12d210eae9a044 (diff)
downloadlinux-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.c')
-rw-r--r--drivers/acpi/pmic/intel_pmic.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/pmic/intel_pmic.c b/drivers/acpi/pmic/intel_pmic.c
index 98bbfd99c709..f20dbda1a831 100644
--- a/drivers/acpi/pmic/intel_pmic.c
+++ b/drivers/acpi/pmic/intel_pmic.c
@@ -95,7 +95,7 @@ static int pmic_read_temp(struct intel_pmic_opregion *opregion,
return 0;
}
- temp = acpi_lpat_raw_to_temp(opregion->lpat_table, raw_temp);
+ temp = opregion->data->lpat_raw_to_temp(opregion->lpat_table, raw_temp);
if (temp < 0)
return temp;