:: Re: [maemo-leste] [PATCH] power: su…
Página Principal
Delete this message
Reply to this message
Autor: Sicelo
Data:  
Para: H. Nikolaus Schaller
CC: Sebastian Reichel, pali, linux-pm, maemo-leste, phone-devel, Discussions about the Letux Kernel, akemnade
Assunto: Re: [maemo-leste] [PATCH] power: supply: bq27xxx: do not report bogus zero values
Hi Nikolaus

On Fri, Feb 28, 2025 at 11:01:35AM +0100, H. Nikolaus Schaller wrote:
> >
> > Thanks for the review. I will do more thorough testing over the weekend
> > and send the patch.


I have made a follow-up patch [0], which produces the following values
on the N900:

bq27200 in 'normal' state:

DEVTYPE=power_supply
OF_NAME=bq27200
OF_FULLNAME=/ocp@68000000/i2c@48072000/bq27200@55
OF_COMPATIBLE_0=ti,bq27200
OF_COMPATIBLE_N=1
POWER_SUPPLY_NAME=bq27200-0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_HEALTH=Calibration required
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4064000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3000000
POWER_SUPPLY_VOLTAGE_NOW=3536000
POWER_SUPPLY_CURRENT_NOW=-432327
POWER_SUPPLY_POWER_AVG=1146100
POWER_SUPPLY_CHARGE_FULL_DESIGN=2056320
POWER_SUPPLY_CHARGE_FULL=2050560
POWER_SUPPLY_CHARGE_NOW=366680
POWER_SUPPLY_ENERGY_NOW=1207420
POWER_SUPPLY_CAPACITY=18
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=316
POWER_SUPPLY_TIME_TO_EMPTY_NOW=4140
POWER_SUPPLY_TIME_TO_EMPTY_AVG=3780
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_MANUFACTURER=Texas Instruments

bq27200 in 'broken' state:

DEVTYPE=power_supply
OF_NAME=bq27200
OF_FULLNAME=/ocp@68000000/i2c@48072000/bq27200@55
OF_COMPATIBLE_0=ti,bq27200
OF_COMPATIBLE_N=1
POWER_SUPPLY_NAME=bq27200-0
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_STATUS=Discharging
POWER_SUPPLY_HEALTH=Calibration required
POWER_SUPPLY_PRESENT=1
POWER_SUPPLY_TECHNOLOGY=Li-ion
POWER_SUPPLY_CYCLE_COUNT=0
POWER_SUPPLY_VOLTAGE_MAX_DESIGN=4064000
POWER_SUPPLY_VOLTAGE_MIN_DESIGN=3000000
POWER_SUPPLY_VOLTAGE_NOW=3633000
POWER_SUPPLY_CURRENT_NOW=-397341
POWER_SUPPLY_POWER_AVG=1432260
POWER_SUPPLY_CHARGE_FULL_DESIGN=2056320
POWER_SUPPLY_CHARGE_FULL=2050560
POWER_SUPPLY_CAPACITY_LEVEL=Normal
POWER_SUPPLY_TEMP=299
POWER_SUPPLY_TYPE=Battery
POWER_SUPPLY_MANUFACTURER=Texas Instruments


Hope this also works fine on your devices.

Thanks and Regards
Sicelo



[0] https://lore.kernel.org/linux-pm/20250312121712.146109-1-absicsz@gmail.com/T/#t