[ar71xx] remove duplicated includes
[openwrt.git] / target / linux / s3c24xx / patches-2.6.24 / 1088-introduce-bq27000-battery-driver.patch.patch
1 From 7b70de51df68659d3789481cf2446f8bc01e5387 Mon Sep 17 00:00:00 2001
2 From: Andy Green <andy@openmoko.com>
3 Date: Sun, 13 Apr 2008 07:25:48 +0100
4 Subject: [PATCH] introduce-bq27000-battery-driver.patch
5
6 This is a driver for the bq27000 found in the Highcell A5
7 battery, and the platform device stuff for it for GTA02. It
8 is a Power Supply Class battery device.
9
10 The driver doesn't contain an HDQ engine but accepts pointers
11 from the platform data to the HDQ action routines; our
12 platform data plugs it into the FIQ HDQ engine stuff.
13
14 The Power Supply class exposes the battery down /sys so you
15 can find out battery status by doing the equivalent of this
16 bash command
17
18 for i in capacity charge_full current_now present status technology temp time_to_empty_now time_to_full_now type voltage_now ; do echo -n "$i " ; cat /sys/devices/platform/bq27000-battery.0/power_supply/bat/$i ; done
19
20 Here is the kind of result you get from a battery discharging
21
22 capacity 0
23 charge_full 1215585
24 current_now 183375
25 present 1
26 status Discharging
27 technology Li-ion
28 temp 276
29 time_to_empty_now 0
30 time_to_full_now 3932100
31 type Battery
32 voltage_now 2761000
33
34 Note that temp is in 1/10 degrees C, other values are in uV,
35 uA, uW. The time_to_* reported are bogus, but that is what
36 the battery actually reports.
37
38 We can make more mappings to entries in power_supply class
39 but this is enough to get started with.
40
41 Signed-off-by: Andy Green <andy@openmoko.com>
42 ---
43 defconfig-2.6.24 | 1 +
44 drivers/power/Kconfig | 7 -------
45 2 files changed, 1 insertions(+), 7 deletions(-)
46
47 diff --git a/defconfig-2.6.24 b/defconfig-2.6.24
48 index 6d750a5..9467f4b 100644
49 --- a/defconfig-2.6.24
50 +++ b/defconfig-2.6.24
51 @@ -1826,3 +1826,4 @@ CONFIG_PLIST=y
52 CONFIG_HAS_IOMEM=y
53 CONFIG_HAS_DMA=y
54 CONFIG_GTA02_HDQ=y
55 +CONFIG_BATTERY_BQ27000_HDQ=y
56 diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
57 index 5ace872..8c50ecb 100644
58 --- a/drivers/power/Kconfig
59 +++ b/drivers/power/Kconfig
60 @@ -64,10 +64,3 @@ config GTA02_HDQ
61
62 endif # POWER_SUPPLY
63
64 -config GTA02_HDQ
65 - tristate "Neo Freerunner HDQ"
66 - depends on MACH_NEO1973_GTA02 && FIQ && S3C2440_C_FIQ
67 - help
68 - Say Y to enable support for communicating with an HDQ battery
69 - on the Neo Freerunner. You probably want to select
70 - at least BATTERY_BQ27000_HDQ as well
71 --
72 1.5.6.5
73
This page took 0.050389 seconds and 5 git commands to generate.