Battery

From WebOS Internals
Jump to navigation Jump to search

Here I will describe how the chip inside the battery of pre and pixi works. I used this information for the app Dr.Battery.
This is just the start. I'm still working on it.

Intro

The Pre and the Pixi are using the same battery. The battery includes a chip providing WebOS with all information about the condition of the battery.
The battery communicates with the operating system through a "A 1-Wire® interface".
The chip also includes a nonvolatile storage. All needed informations are stored within this storage. WebOS doesn't store any information about the battery on the device.

Chip inside the battery

The battery is using the "Dallas Semiconductor Maxim DS2784 1-Cell Stand-Alone Fuel Gauge IC with Li+ Protector and SHA-1".
The manual of the chip can be found here: Manual of the DS2784

Interface used by WebOS

The communication with the battery is done by the kernel device driver "w1_ds2784.c" written by palm.
At boottime webOS creates a directory structure in "/sys/devices/w1_bus_master1" with character device files.
An application is able to read and write to and from the battery through these "files".