Skip to content

platform/x86: dell-ddv: Rework battery temperature handling

Armin Wolf linux-pm lkml platform-driver-x86 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3platform/x86: dell-ddv: Fix temperature calculationdrivers/platform/x86/dell/dell-wmi-ddv.c+4 -20 replies
2/3platform/x86: dell-ddv: Use devm_battery_hook_registerdrivers/platform/x86/dell/dell-wmi-ddv.c+1 -100 replies
3/3platform/x86: dell-ddv: Use the power supply extension mechanismdrivers/platform/x86/dell/dell-wmi-ddv.c+45 -300 replies

Reviews trailers per patch

None of the 3 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchSebastian Reichel
SeriesR-b
1/3
2/3
3/3

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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