QtMoko v33 - More battery info and questions

Neil Jerram neiljerram at gmail.com
Sat Mar 26 12:23:43 CET 2011

On 26 March 2011 09:54, Philip Rhoades <phil at pricom.com.au> wrote:
> People,
> Using:
>  echo bq27000-battery.0 > /sys/bus/platform/drivers/bq27000-battery/unbind
>  modprobe platform_battery
> allows me to check the value of:
>  /sys/class/power_supply/battery/capacity
> and using:
>  rmmod platform_battery
>  echo bq27000-battery.0 > /sys/bus/platform/drivers/bq27000-battery/bind
> restores the "smart" battery function.
> I attach a graph of the resulting discharge rate of the fully charged Nokia
> BL-6C battery.
> Questions:
> - Even with the "dumb" battery configuration, the battery charging animated
> icon continues after USB (power) disconnection - should that happen?
> - Using the methods above, both "bind" and "unbind" files exist in the
> driver directory - shouldn't there be only one at any one time?

I would guess not, because the ".0" at the end of bq27000-battery.0
suggests that there might be multiple battery instances, of which, at
a given moment, some might be bound and others not.

>  If not,
> don't the files only need to be created once instead of repeatedly each time
> the scripts/aliases are run?

Are you thinking that those echo commands create the files?  I doubt
it works like that; files in /sys and /proc are special, and it's more
like echoing something into them causes some action to happen, or some
config change.  Cf. "echo 1 > /proc/sys/net/ipv4/ip_forward" to enable
IP forwarding.


More information about the community mailing list