[PATCH v3 1/5] power: supply: correct capacity computation

Thomas Antoine t.antoine at uclouvain.be
Wed Apr 23 00:48:42 PDT 2025


Hi Dimitri,

On 4/22/25 11:46, Dimitri Fedrau wrote:
> Hi Thomas,
> 
> On Mon, Apr 21, 2025 at 08:13:32PM +0200, Thomas Antoine via B4 Relay wrote:
>> From: Thomas Antoine <t.antoine at uclouvain.be>
[...]
>> -static int max172xx_capacity_to_ps(unsigned int reg)
>> +static int max172xx_capacity_to_ps(unsigned int reg,
>> +				   struct max1720x_device_info *info)
>>  {
>> -	return reg * 500;	/* in uAh */
>> +	return reg * (500000 / info->rsense);	/* in uAh */
>>  }
>>  
>>  /*
>>
>> -- 
>> 2.49.0
>>
>>
> thanks for finding this.
> 
> Reviewed-by: Dimitri Fedrau <dimitri.fedrau at liebherr.com>
> 
> Best regards,
> Dimitri Fedrau

I just realized I forgot to change the function calls in this patch, it is only
changed in the next patch. This will not compile as the function call does not
pass info as argument. I will change this in the next version.

Best regards,
Thomas Antoine



More information about the linux-arm-kernel mailing list