Re: [PATCH] power: supply: ab8500: Set typing and props

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

could you apply this patch please?

It's a regression.

Yours,
Linus Walleij

On Tue, Jun 13, 2023 at 11:31 PM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote:

> I had the following weird phenomena on a mobile phone: while
> the capacity in /sys/class/power_supply/ab8500_fg/capacity
> would reflect the actual charge and capacity of the battery,
> only 1/3 of the value was shown on the battery status
> indicator and warnings for low battery appeared.
>
> It turns out that utemp, the Freedesktop temperature daemon,
> will average all the power supplies of type "battery" in
> /sys/class/power_supply/* if there is more than one battery.
>
> For the AB8500, there was "battery" ab8500_fg, ab8500_btemp
> and ab8500_chargalg. The latter two don't know anything
> about the battery, and should not be considered. They were
> however averaged and with the capacity of 0.
>
> Flag ab8500_btemp and ab8500_chargalg with type "unknown"
> so they are not averaged as batteries.
>
> Remove the technology prop from ab8500_btemp as well, all
> it does is snoop in on knowledge from another supply.
>
> After this the battery indicator shows the right value.
>
> Cc: Stefan Hansson <newbyte@xxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux