mbox series

[v5,0/1] power: supply: Add new "charge_types" property

Message ID 20241221125140.345776-1-hdegoede@redhat.com
Headers show
Series power: supply: Add new "charge_types" property | expand

Message

Hans de Goede Dec. 21, 2024, 12:51 p.m. UTC
Here is v5 of my "charge_types" property series, most of this series
has already been merged, leaving only the dell-laptop patch.

Changes in v5:
- Drop patches 1-3 (already merged)
- dell-laptop: Return ENOENT instead of EIO in charge_types_store() when
  the requested mode was accepted by power_supply_charge_types_parse() but
  for some reason is not found in the battery_modes[] array

As already discussed since the dependencies are merged into
linux-power-supply/for-next this patch should also be merged through
linux-power-supply/for-next.

Ilpo, this new version addresses your review comment, can you please
provide your Acked-by for merging this through linux-power-supply/for-next?

Sebastian, can you merge this once acked by Ilpo?

Regards,

Hans


Hans de Goede (1):
  platform/x86: dell-laptop: Use power_supply_charge_types_show/_parse()
    helpers

 drivers/platform/x86/dell/dell-laptop.c | 54 ++++++++++++-------------
 1 file changed, 25 insertions(+), 29 deletions(-)

Comments

Ilpo Järvinen Dec. 23, 2024, 7:19 p.m. UTC | #1
On Sat, 21 Dec 2024, Hans de Goede wrote:

> Make battery_modes a map between tokens and enum power_supply_charge_type
> values instead of between tokens and strings and use the new
> power_supply_charge_types_show/_parse() helpers for show()/store()
> to ensure that things are handled in the same way as in other drivers.
> 
> This also changes battery_supported_modes to be a bitmap of charge-types
> (enum power_supply_charge_type values) rather then a bitmap of indices
> into battery_modes[].
> 
> Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Acked-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>