summaryrefslogtreecommitdiffstats
path: root/drivers/power/sbs-battery.c
Commit message (Collapse)AuthorAgeFilesLines
* sbs-battery.c: Capacity attr = remaining relative capacityNikolaus Voss2012-05-051-1/+1
| | | | | | | | | | | | | | | | | | Currently, the capacity exported by this driver refers to reg 0x0e, which is the absolute state of charge which according to SBS refers to the design capacity/ energy of the battery. It can be > 100 % and drops below 100 % for a fully charged battery with the battery aging. This is not what the user exspects of a remaining capacity indication between 0 and 100 % with 100 % referring to a fully charged battery. This is provided by SBS reg 0x0d, which is the relative state of charge referring to the full charge capacity. Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Acked-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
* power_supply: Convert i2c drivers to module_i2c_driverAxel Lin2012-03-261-12/+1
| | | | | | | | | | | | | | | Factor out some boilerplate code for i2c driver registration into module_i2c_driver. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Woogyom Kim <milo.kim@ti.com> Cc: Daniel Jeong <daniel.jeong@ti.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Peter Edwards <sweetlilmre@gmail.com> Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com> Acked-by: Rhyland Klein <rklein@nvidia.com> Acked-by: Ryan Mallon <rmallon@gmail.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
* sbs-battery: Fix devicetree match tableOlof Johansson2012-01-061-1/+1
| | | | | | | | It should be an of module table, not i2c. Signed-off-by: Olof Johansson <olof@lixom.net> Acked-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* sbs-battery: Change power supply nameRhyland Klein2012-01-061-3/+16
| | | | | | | | | The power supply name used to be fixed as "battery". This change allows for multiple batteries by generating the name rather than using a fixed value. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* sbs-battery: Rename internals to new nameRhyland Klein2012-01-061-219/+204
| | | | | | | | Now that this driver is named more generally, this change updates the internal variables, defines and functions to use this new name. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
* bq20z75: Rename to sbs-batteryRhyland Klein2012-01-061-0/+871
This driver for the bq20z75 implemented the register spec defined by the SBS standard. As this is not unique to this the TI part this was originally written for, we can generalize this driver to show its support for any SBS compliant battery. Signed-off-by: Rhyland Klein <rklein@nvidia.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>