| 2bd1870a | 29-Apr-2025 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86: dell-ddv: Expose the battery health to userspace
The health of a given battery is exposed over the Dell DDV WMI interface using the "BatteryManufactureAceess" WMI method. The resulting
platform/x86: dell-ddv: Expose the battery health to userspace
The health of a given battery is exposed over the Dell DDV WMI interface using the "BatteryManufactureAceess" WMI method. The resulting data contains, among other data, the health status of the battery.
Expose this value to userspace using the power supply extension interface.
Tested on a Dell Inspiron 3505.
Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250429003606.303870-4-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
| 303ecf69 | 29-Apr-2025 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86: dell-ddv: Expose the battery manufacture date to userspace
The manufacture date of a given battery is exposed over the Dell DDV WMI interface using the "BatteryManufactureDate" WMI met
platform/x86: dell-ddv: Expose the battery manufacture date to userspace
The manufacture date of a given battery is exposed over the Dell DDV WMI interface using the "BatteryManufactureDate" WMI method. The resulting data contains the manufacture date of the battery encoded inside a 16-bit value as described in the Smart Battery Data Specification.
Expose this value to userspace using the power supply extension interface.
Tested on a Dell Inspiron 3505.
Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250429003606.303870-3-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
| 058de163 | 29-Apr-2025 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86: dell-ddv: Implement the battery matching algorithm
Since commit db0a507cb24d ("ACPICA: Update integer-to-hex-string conversions") the battery serial number is no longer distorted, allo
platform/x86: dell-ddv: Implement the battery matching algorithm
Since commit db0a507cb24d ("ACPICA: Update integer-to-hex-string conversions") the battery serial number is no longer distorted, allowing us to finally implement the battery matching algorithm.
The battery matchign algorithm is necessary when translating between ACPI batteries and the associated indices used by the WMI interface based on the battery serial number. Since this serial number can only be retrieved when the battery is present we cannot perform the initial translation inside dell_wmi_ddv_add_battery() because the ACPI battery might be absent at this point in time.
Introduce dell_wmi_ddv_battery_translate() which implements the battery matching algorithm and replaces dell_wmi_ddv_battery_index(). Also implement a translation cache for caching previous translations between ACPI batteries and indices. This is necessary because performing a translation can be very expensive.
Tested on a Dell Inspiron 3505.
Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250429003606.303870-2-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|
| 8d5316c6 | 16-Feb-2025 |
Armin Wolf <W_Armin@gmx.de> |
platform/x86: wmi: Update documentation regarding the GUID-based API
Warn WMI driver developers to not use GUID-based and non-GUID-based functions for querying WMI data blocks and handling WMI event
platform/x86: wmi: Update documentation regarding the GUID-based API
Warn WMI driver developers to not use GUID-based and non-GUID-based functions for querying WMI data blocks and handling WMI events simultaneously on the same device, as this will corrupt the WMI device state and might thus lead to erratic behaviour.
Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20250216193251.866125-9-W_Armin@gmx.de Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
show more ...
|