Re: [PATCH 1/2] power: supply: fix charge_behaviour attribute initialization

From: Hans de Goede
Date: Wed Jan 05 2022 - 05:31:04 EST


Hi,

On 1/5/22 07:42, Thomas Weißschuh wrote:
> All properties have to be added to power_supply_attrs which was missed
> before.
>
> Fixes: 1b0b6cc8030d ("power: supply: add charge_behaviour attributes")
> Reported-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
> Suggested-by: Heiner Kallweit <hkallweit1@xxxxxxxxx>
> Signed-off-by: Thomas Weißschuh <linux@xxxxxxxxxxxxxx>

Thank you for the quick fix.

Since the base commit for this is from pdx86/for-next I'm merging this
fix through the pdx86 tree too:

Thank you for your patch, I've applied this patch to my review-hans
branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans

Note it will show up in my review-hans branch once I've pushed my
local branch there, which might take a while.

Once I've run some tests on this branch the patches there will be
added to the platform-drivers-x86/for-next branch and eventually
will be included in the pdx86 pull-request to Linus for the next
merge-window.

Regards,

Hans




> ---
> drivers/power/supply/power_supply_sysfs.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c
> index 5e3b8c15ddbe..491ffec7bf47 100644
> --- a/drivers/power/supply/power_supply_sysfs.c
> +++ b/drivers/power/supply/power_supply_sysfs.c
> @@ -178,6 +178,7 @@ static struct power_supply_attr power_supply_attrs[] = {
> POWER_SUPPLY_ATTR(CHARGE_CONTROL_LIMIT_MAX),
> POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD),
> POWER_SUPPLY_ATTR(CHARGE_CONTROL_END_THRESHOLD),
> + POWER_SUPPLY_ENUM_ATTR(CHARGE_BEHAVIOUR),
> POWER_SUPPLY_ATTR(INPUT_CURRENT_LIMIT),
> POWER_SUPPLY_ATTR(INPUT_VOLTAGE_LIMIT),
> POWER_SUPPLY_ATTR(INPUT_POWER_LIMIT),
>
> base-commit: 998e7ea8c641fc6bbca1acd478c6824733ac9851
>