Cannot find /sys/class/power_supply/ac/online

1,855 views
Skip to first unread message

Elvis Dowson

unread,
Apr 26, 2009, 12:37:42 PM4/26/09
to android-porting
Hi,
I've ported the android-2.6.29 kernel to the Overo linux-
omap3-2.6.29 kernel version. The android logo boots up, and after
sometime, the system shuts down.

When I look in the find /sys/class/power_supply folder, I don't see
anything. I have enabled CONFIG_POWER_SUPPLY=y in my defconfig.

What could be going wrong? Why are the required devices not being
created?

Best regards,

Elvis

I/SystemServer( 865): Starting Battery Service.
E/BatteryService( 865): Could not open '/sys/class/power_supply/ac/
online'
E/BatteryService( 865): Could not open '/sys/class/power_supply/usb/
online'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/present'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/capacity'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/batt_vol'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/batt_temp'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/status'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/health'
E/BatteryService( 865): Could not open '/sys/class/power_supply/
battery/technology'

Yi Sun

unread,
Apr 26, 2009, 5:59:01 PM4/26/09
to android...@googlegroups.com, android-porting
You need to enable u AC and BAT driver.



On Apr 26, 2009, at 9:37 AM, Elvis Dowson <elvis....@gmail.com>
wrote:

Yi Sun

unread,
Apr 26, 2009, 6:22:21 PM4/26/09
to Yi Sun, android...@googlegroups.com
More hints for u; even u enable u drivers, u may still have problems.
Do check the content in sys/class/power_supply/ to make sure it has
what Android expected.Athe first thing u may need to fix is the paths
in com_android_batteryservice.cpp.
Please take a look on the X86 patches for detail.
It depends on u battery type, u may see even more issues, but most of
them are easy to fix and no need to mention here
Yi

Elvis Dowson

unread,
Apr 27, 2009, 12:03:52 AM4/27/09
to android...@googlegroups.com
Hi,
      The board that I have is an Overo Earth with Palo43 expansion board. It has not batteries connected to it. I took a quick look at the x86 patches, and it attempts to correct the paths to the actual objects. 

I'm trying to first get the appropriate objects to appear first in the power_supply folder. Its empty at the moment.

Elvis

Yi Sun

unread,
Apr 27, 2009, 12:20:37 AM4/27/09
to android...@googlegroups.com
I don't know the board you are using. But you need to have a AC driver
to register with power_supply_core to create the AC0 or ac directory.
For X86, we drivers/acpi/ac.c. You can also look at
drivers/power/goldfish_battery.c and look for
power_supply_register(&pdev->dev, &data->ac)
Yi

heyu...@gmail.com

unread,
Apr 27, 2009, 7:53:26 AM4/27/09
to android-porting
u nend enable BAT driver
1.Open ur kernel DIR
2.make menuconfig
select Device Drivers->Power supply class support -> Goldfish
battery driver
3.save
4.make ur kernel file

i think u can see it in the sys/class/power_supply/battery DIR

Elvis Dowson

unread,
Apr 27, 2009, 9:33:28 AM4/27/09
to android...@googlegroups.com
Hi,
     I am using a TI OMAP 3503 processor with a TPS69590/TWL4030 power management interface. The goldfish battery driver is probably for the emulator class correct? 
Is there some solution for the OMAP3 platform?

Best regards,

elvis

heyu...@gmail.com

unread,
Apr 27, 2009, 11:40:21 AM4/27/09
to android-porting
i am so sorry.
i didn't attention to ur develop platform.
i think you can write the power management IC 's driver by ur self.
maybe it has another solution.
Best regards.

Thx

On Apr 27, 9:33 pm, Elvis Dowson <elvis.dow...@gmail.com> wrote:
> Hi,     I am using a TI OMAP 3503 processor with a TPS69590/TWL4030 power
> management interface. The goldfish battery driver is probably for the
> emulator class correct?
> Is there some solution for the OMAP3 platform?
>
> Best regards,
>
> elvis
>
> > > battery/technology'- Hide quoted text -
>
> - Show quoted text -

Elvis Dowson

unread,
Apr 27, 2009, 3:01:49 PM4/27/09
to android-porting
Hi,
The power management IC's drivers are already there. TPS69590/
TWL4030. It's just that I can't seem to get the power_supply objects
to appear!

Best regards,

Elvis
Reply all
Reply to author
Forward
0 new messages