[patch] spitz: better voltage-to-percentage conversion

Eric Dumazet eric.dumazet at gmail.com
Fri Nov 27 03:07:32 EST 2009


Pavel Machek a écrit :
> Old code has two huge tables... unfortunately those tables are simple
> linear relationships and wrong: li-ions do not behave like that.
> 
> Convert physical values to mV,mA,mOhm, add computation that makes
> sense for physical point of view, and provide tables based on
> measurements.
> 
> To get even better results, we should provide better battery_current
> estimate (taking backlight into account), and adjust adjust
> battery_resistance according to its age and temperature. 
> 
> Signed-off-by: Pavel Machek <pavel at ucw.cz>
> 
> 
> --- a/arch/arm/mach-pxa/corgi_pm.c	2009-11-23 20:48:26.000000000 +0100

> +typedef int miliamp_t;
> +typedef int miliohm_t;
> +typedef int milivolt_t;

milliamp, milliohm, millivolt ?




More information about the linux-arm-kernel mailing list