Ticket #262 (assigned enhancement)

Opened 11 years ago

Last modified 9 years ago

Indicate different charging mode in battery applet

Reported by: laforge@… Owned by: raster
Priority: normal Milestone:
Component: E - Illume Version:
Severity: minor Keywords:
Cc: buglog@…, hozer@… Blocked By:
Blocking: Estimated Completion (week):
HasPatchForReview: no PatchReviewResult:
Reproducible:

Description

Since we can be on 100mA or 500mA charging modes, it would be nice to indicate
the mode in the battery dockapp while charging.

The kernel exports this via sysfs (see http://wiki.openmoko.org/wiki/Kernel).

Ideally we would wrap this in some hardware abstraction layer, but for now a
quick hack might be applicable

Change History

comment:1 Changed 11 years ago by mickey@…

  • Status changed from new to assigned
  • dependson set to 287

I will do this once sysfs reports anything else than "0".

comment:2 Changed 11 years ago by mickey@…

  • dependson 287 deleted

remove the depends

comment:3 Changed 11 years ago by alphaone@…

Mode detection should be possible right now via
/sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/chgmode

We still need a different icon to distinguish fast charge and pre.

comment:4 Changed 10 years ago by hozer@…

  • Cc hozer@… added

I'd also like to see the percent charge of the battery while plugged in as well

comment:5 Changed 10 years ago by mickey@…

On GTA01, reading the current is not possible while charging. If we could stop
charging for a second, we could read it. Adding an own bug for that.

comment:6 Changed 10 years ago by laforge@…

you don't need to read the actual charge current to determine 100ma/500ma mode.

You can easily read the sysfs file and see if it shows "pre" or "fast_cccv"

comment:7 Changed 10 years ago by willie_chen@…

  • Status changed from assigned to new
  • Owner changed from buglog@… to michael@…

comment:8 Changed 10 years ago by roh

  • Owner changed from michael@… to michael

comment:9 Changed 9 years ago by john_lee

  • Status changed from new to assigned
  • HasPatchForReview unset
  • Component changed from openmoko-panel-battery to E - Illume
  • Priority changed from high to normal
  • Version current svn head deleted
  • Owner changed from michael to raster

Good to have this in battery gadget.

comment:10 Changed 9 years ago by raster

put it in /sys/devices/platform/bq27000-battery.0/power_supply/bat/ somewhere and i'll think about it. basical;ly i'm not going to put code in e's battery module for 1 device on the planet - the next device from om will have some different /sys path to advertise charge mode, then some other arm will have another, and another, and another... so you end up having to make a custom config or custom snippet of code for every platform out there - in userspace. this is just plain ugly.

expose something "generic" under /sys/devices/platform/bq27000-battery.0/power_supply/bat somewhere (so it's ALWAYS got this regardless of what future platforms you have, what pmu's they use or architecture etc.). NB /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/chgmode doesn't exist on the freerunner - so it's moved/changed and living it yet another custom place to chase down from userspace :) so put it in with the power_supply abstraction class in the kernel and you're talking something useful :)

Note: See TracTickets for help on using tickets.