From 42e5ed0618030543e4f679afa5e42ec8ab9337bb Mon Sep 17 00:00:00 2001 From: Sumeet Pawnikar Date: Thu, 5 May 2022 22:30:19 +0530 Subject: ACPI: DPTF: Add support for high frequency impedance notification Add high frequency impedance notification support under DPTF. This returns high frequency impedance value that can be obtained from battery fuel gauge whenever there is change over a threshold. Also, corrected the typo from IMPEDANCED_CHNGED to IMPEDANCE_CHANGED. Signed-off-by: Sumeet Pawnikar Signed-off-by: Rafael J. Wysocki --- drivers/acpi/dptf/dptf_power.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/dptf/dptf_power.c b/drivers/acpi/dptf/dptf_power.c index 1f2e6c29773b..407b89d8a2ce 100644 --- a/drivers/acpi/dptf/dptf_power.c +++ b/drivers/acpi/dptf/dptf_power.c @@ -115,7 +115,7 @@ static const struct attribute_group dptf_battery_attribute_group = { #define POWER_STATE_CHANGED 0x81 #define STEADY_STATE_POWER_CHANGED 0x83 #define POWER_PROP_CHANGE_EVENT 0x84 -#define IMPEDANCED_CHNGED 0x85 +#define IMPEDANCE_CHANGED 0x85 #define VOLTAGE_CURRENT_CHANGED 0x86 static long long dptf_participant_type(acpi_handle handle) @@ -148,6 +148,9 @@ static void dptf_power_notify(acpi_handle handle, u32 event, void *data) case STEADY_STATE_POWER_CHANGED: attr = "max_steady_state_power_mw"; break; + case IMPEDANCE_CHANGED: + attr = "high_freq_impedance_mohm"; + break; case VOLTAGE_CURRENT_CHANGED: attr = "no_load_voltage_mv"; break; -- cgit v1.2.3