[QtExtended] Latest and greatest

Franky Van Liedekerke liedekef at telenet.be
Sun Apr 5 12:44:57 CEST 2009


Hi Radek,

I also fixed some logic in detecting plugged in usb cable for
suspending or not.
In the file neohardware.cpp, function NeoHardware::uevent, I changed
the cableconnected calls a bit to use the getcablestatus function. This
has been confirmed to work on different kernels (with or without usb/ac
detection bug):

  if(strcmp(buffer,"change@/class/power_supply/usb")==0)
  {
    qDebug()<<"usb change event";
    cableConnected(getCableStatus());
  }else if(strcmp(buffer,"change@/class/power_supply/ac")==0)
  {
    qDebug()<<"ac change event";
    cableConnected(getCableStatus());

Maybe you can add this to your git as well?

Franky

On Sun, 05 Apr 2009 12:14:05 +0200
Radek Polak <psonek2 at seznam.cz> wrote:

> Franky Van Liedekerke wrote:
> 
> > I think I found the suspending thing. In the patch provided by
> > Radek (0001-patch-for-2.6.28-kernels.patch), the file
> > devices/neo/server/neohardware.cpp gets patched:
> > 
> > +    else if
> > (QFileInfo("/sys/class/power_supply/usb/online").exists()) {
> > +         //freerunner kernel > 2.6.28
> > +        chargeFile = "/sys/class/power_supply/usb/online";
> > +    }
> > 
> > but this file gives me "0" as result, even when the usb is
> > connected ... So it should be (as for neo/server/neobattery.cpp):
> > 
> > +    else if
> >   (QFileInfo("/sys/class/power_supply/battery/status").exists()) {
> > +         //freerunner kernel > 2.6.28
> > +        chargeFile = "/sys/class/power_supply/battery/status";
> > +    }
> > 
> > This file (/sys/class/power_supply/battery/status) gives the correct
> > status ("Charging") when plugged in ...
> > Filip, can you confirm this?
> > 
> > Franky
> 
> Hi Franky,
> fixed this in my tree [1].
> 
> Thanks
> 
> Radek
> 
> [1]
> http://github.com/radekp/qtextended/commit/0df47d3ef72597251187fc535efbc9a0b876d745
> 
> 
> _______________________________________________
> Openmoko community mailing list
> community at lists.openmoko.org
> http://lists.openmoko.org/mailman/listinfo/community
> 




More information about the community mailing list