mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/4] power: supply: core: align charge_behaviour format with docs
@ 2024-03-03 15:31 Thomas Weißschuh
  2024-03-03 15:31 ` [PATCH v2 1/4] power: supply: mm8013: fix "not charging" detection Thomas Weißschuh
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Thomas Weißschuh @ 2024-03-03 15:31 UTC (permalink / raw)
  To: Sebastian Reichel, Hans de Goede, Konrad Dybcio
  Cc: linux-pm, linux-kernel, Sebastian Reichel, Thomas Weißschuh

The original submission of the charge_behaviour property did not
implement proper formatting in the default formatting handler in
power_supply_sysfs.c.

At that time it was not a problem because the only provider of the UAPI,
thinkpad_acpi, did its own formatting.

Now there is an in-tree driver, mm8013, and out-of-tree driver which use
the normal power-supply properties and are affected by the wrong
formatting.
In this revision the handling of CHARGE_BEHAVIOUR in mm8013 is dropped
as it is not the correct API for it to use.
That change was not tested by me as I don't have the hardware.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
---
Changes in v2:
- Simplify the backwards-compatibility logic (adds a preparatory patch)
- Extend test-power to also handle writing of charge_behaviour
- Drop incorrect CHARGE_BEHAVIOUR from mm8013 driver
- Replace special CHARGE_BEHAVIOUR_AVAILABLE property with bitmask in
  struct power_supply_desc
- Link to v1: https://lore.kernel.org/r/20240204-power_supply-charge_behaviour_prop-v1-0-06a20c958f96@weissschuh.net

---
Thomas Weißschuh (4):
      power: supply: mm8013: fix "not charging" detection
      power: supply: core: ease special formatting implementations
      power: supply: core: fix charge_behaviour formatting
      power: supply: test-power: implement charge_behaviour property

 drivers/power/supply/mm8013.c             | 13 ++-----------
 drivers/power/supply/power_supply_sysfs.c | 32 +++++++++++++++++++++++++------
 drivers/power/supply/test_power.c         | 31 ++++++++++++++++++++++++++++++
 include/linux/power_supply.h              |  1 +
 4 files changed, 60 insertions(+), 17 deletions(-)
---
base-commit: 04b8076df2534f08bb4190f90a24e0f7f8930aca
change-id: 20230929-power_supply-charge_behaviour_prop-10ccfd96a666

Best regards,
-- 
Thomas Weißschuh <linux@weissschuh.net>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-03-27 20:48 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-03 15:31 [PATCH v2 0/4] power: supply: core: align charge_behaviour format with docs Thomas Weißschuh
2024-03-03 15:31 ` [PATCH v2 1/4] power: supply: mm8013: fix "not charging" detection Thomas Weißschuh
2024-03-06  0:25   ` Sebastian Reichel
2024-03-27 10:36   ` Hans de Goede
2024-03-27 20:48   ` Konrad Dybcio
2024-03-03 15:31 ` [PATCH v2 2/4] power: supply: core: ease special formatting implementations Thomas Weißschuh
2024-03-06  0:25   ` Sebastian Reichel
2024-03-27 10:36   ` Hans de Goede
2024-03-03 15:31 ` [PATCH v2 3/4] power: supply: core: fix charge_behaviour formatting Thomas Weißschuh
2024-03-06  0:27   ` Sebastian Reichel
2024-03-27 10:43   ` Hans de Goede
2024-03-03 15:31 ` [PATCH v2 4/4] power: supply: test-power: implement charge_behaviour property Thomas Weißschuh
2024-03-06  0:39   ` Sebastian Reichel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®