[Gta04-owner] Crowdfunding an Ubuntu smartphone

Radek Polak psonek2 at seznam.cz
Wed Sep 4 09:50:48 CEST 2013


On Wednesday, September 04, 2013 09:14:48 AM NeilBrown wrote:
> On Tue, 03 Sep 2013 12:47:04 +0200 Adrien Dorsaz <adrien at adorsaz.ch> wrote:
> > Hello,
> > 
> > I've tried to restart QtMoko (software), but the battery is still
> > discharging.
> > 
> > Le dimanche 01 septembre 2013 à 16:09 +1000, NeilBrown a écrit :
> > > What does
> > > 
> > >   cat /sys/class/power_supply/twl4030_usb/uevent
> > 
> > POWER_SUPPLY_NAME=twl4030_usb
> > POWER_SUPPLY_STATUS=Not charging
> > POWER_SUPPLY_ONLINE=0
> > 
> > > show when it isn't charging but should be?
> > > 
> > > What does
> > > 
> > >  cat
> > >  /sys/devices/platform/omap_i2c.1/i2c-1/1-004b/twl4030_bci/max_current
> > > 
> > > give?
> > 
> > 599089
> > 
> > > If you
> > > 
> > >   echo N > /sys/module/twl4030_charger/parameters/allow_usb
> > >   echo 490000 >
> > >   /sys/module/twl4030_charger/parameters/default_usb_current
> > > 
> > > then plug in the power (unplugging first if necessary) does it change
> > > the contents of
> > > 
> > >    cat /sys/class/power_supply/twl4030_usb/uevent
> > 
> > POWER_SUPPLY_NAME=twl4030_usb
> > POWER_SUPPLY_STATUS=Charging
> > POWER_SUPPLY_ONLINE=1
> > POWER_SUPPLY_VOLTAGE_NOW=4892745
> > POWER_SUPPLY_CURRENT_NOW=850021
> > 
> > Yes it was modified. I've applied commands above, unplugged and then
> > plugged.
> > 
> > > or
> > > 
> > >    cat /sys/class/power_supply/bq27000-battery/uevent
> > 
> > POWER_SUPPLY_NAME=bq27000-battery
> > POWER_SUPPLY_STATUS=Charging
> > POWER_SUPPLY_PRESENT=1
> > POWER_SUPPLY_VOLTAGE_NOW=3824000
> > POWER_SUPPLY_CURRENT_NOW=-480879
> > POWER_SUPPLY_CAPACITY=23
> > POWER_SUPPLY_CAPACITY_LEVEL=Normal
> > POWER_SUPPLY_TEMP=281
> > POWER_SUPPLY_TIME_TO_FULL_NOW=9420
> > POWER_SUPPLY_TECHNOLOGY=Li-ion
> > POWER_SUPPLY_CHARGE_FULL=1099203
> > POWER_SUPPLY_CHARGE_NOW=251328
> > POWER_SUPPLY_CHARGE_FULL_DESIGN=1233792
> > POWER_SUPPLY_CYCLE_COUNT=154
> > POWER_SUPPLY_ENERGY_NOW=803000
> > POWER_SUPPLY_POWER_AVG=0
> > POWER_SUPPLY_HEALTH=Good
> > 
> > Seems good too.
> 
> Something weird here.
> 
> The initial current limit was 600mA.  This is more than a USB port is
> guaranteed to provide.  Maybe the port noticed the excess current and
> switched off.
> 
> Then you told it to limit to 490mA which a USB 2.0 port can provide.  With
> that setting it started charging, but with a current of 850mA !!!  That is
> more than it should allow, and more than the port should provide.
> 
> The battery reports an inflow of 480mA, which suggests 370mA is being used
> by the phone.  That is a little high,  but not unreasonable depending on
> which bits are turned on.
> 
> It really looks like something is going wrong with the max-current setting.
> I'll have another look at that.

Could it be that QtMoko uses udev rules that affect max_current? This is how 
they look like:


* For more info see:
    http://lists.goldelico.com/pipermail/gta04-owner/2012-April/002272.html

cat > /media/card/etc/udev/rules.d/gta04-charging.rules <<__END__
SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="floating", ATTR{../../max_current}="500000"
SUBSYSTEM=="power_supply", ACTION=="change", DEVPATH=="*power_supply/twl4030_usb" ATTRS{1-0048/twl4030_usb/id}=="102k", ATTR{../../max_current}="851000"
__END__
Regards

Radek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20130904/4faddcec/attachment.html>


More information about the Gta04-owner mailing list