[PATCH 0/3] platform/x86: dell-ddv: Rework battery temperature handling

Armin Wolf posted 3 patches 11 months, 1 week ago
drivers/platform/x86/dell/dell-wmi-ddv.c | 84 +++++++++++++-----------
1 file changed, 46 insertions(+), 38 deletions(-)
[PATCH 0/3] platform/x86: dell-ddv: Rework battery temperature handling
Posted by Armin Wolf 11 months, 1 week ago
This patch series reworks the handling of the battery temperature
inside the dell-wmi-ddv driver.

The first patch fixes an issue inside the calculation formula for
the temperature value that resulted in strange temperature values
like 29.1 degrees celcius.

The second patch then simplifies the battery hook handling by using
devm_battery_hook_register().

The third patch finally makes use of the new power supply extension
mechanism to expose the battery temperature to userspace. The
power supply extension mechanism also takes care that the temperature
shows up inside the hwmon interface of the associated battery.

All patches where tested on a Dell Inspiron 3505 and appear to work.

Armin Wolf (3):
  platform/x86: dell-ddv: Fix temperature calculation
  platform/x86: dell-ddv: Use devm_battery_hook_register
  platform/x86: dell-ddv: Use the power supply extension mechanism

 drivers/platform/x86/dell/dell-wmi-ddv.c | 84 +++++++++++++-----------
 1 file changed, 46 insertions(+), 38 deletions(-)

--
2.39.5
Re: [PATCH 0/3] platform/x86: dell-ddv: Rework battery temperature handling
Posted by Ilpo Järvinen 11 months ago
On Wed, 05 Mar 2025 06:30:06 +0100, Armin Wolf wrote:

> This patch series reworks the handling of the battery temperature
> inside the dell-wmi-ddv driver.
> 
> The first patch fixes an issue inside the calculation formula for
> the temperature value that resulted in strange temperature values
> like 29.1 degrees celcius.
> 
> [...]


Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.

The list of commits applied:
[1/3] platform/x86: dell-ddv: Fix temperature calculation
      commit: 7a248294a3145bc65eb0d8980a0a8edbb1b92db4
[2/3] platform/x86: dell-ddv: Use devm_battery_hook_register
      commit: 8dc3f0161e35d6ceb12de4a70cbed593e5b0583f
[3/3] platform/x86: dell-ddv: Use the power supply extension mechanism
      commit: 99923a0df7852311fa3d01eaddb430c958780143

--
 i.
Re: [PATCH 0/3] platform/x86: dell-ddv: Rework battery temperature handling
Posted by Sebastian Reichel 11 months, 1 week ago
Hi,

On Wed, Mar 05, 2025 at 06:30:06AM +0100, Armin Wolf wrote:
> This patch series reworks the handling of the battery temperature
> inside the dell-wmi-ddv driver.
> 
> The first patch fixes an issue inside the calculation formula for
> the temperature value that resulted in strange temperature values
> like 29.1 degrees celcius.
> 
> The second patch then simplifies the battery hook handling by using
> devm_battery_hook_register().
> 
> The third patch finally makes use of the new power supply extension
> mechanism to expose the battery temperature to userspace. The
> power supply extension mechanism also takes care that the temperature
> shows up inside the hwmon interface of the associated battery.
> 
> All patches where tested on a Dell Inspiron 3505 and appear to work.

LGTM.

Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.com>

-- Sebastian

> Armin Wolf (3):
>   platform/x86: dell-ddv: Fix temperature calculation
>   platform/x86: dell-ddv: Use devm_battery_hook_register
>   platform/x86: dell-ddv: Use the power supply extension mechanism
> 
>  drivers/platform/x86/dell/dell-wmi-ddv.c | 84 +++++++++++++-----------
>  1 file changed, 46 insertions(+), 38 deletions(-)
> 
> --
> 2.39.5
> 
>