nuke old 2.6.23 code for brcm47xx
[openwrt.git] / target / linux / s3c24xx / patches-2.6.26 / 1074-contrib-fix-chgstate-array-bloat.patch.patch
1 diff --git a/drivers/i2c/chips/pcf50606.c b/drivers/i2c/chips/pcf50606.c
2 index a1c92d3..aaec6e8 100644
3 --- a/drivers/i2c/chips/pcf50606.c
4 +++ b/drivers/i2c/chips/pcf50606.c
5 @@ -72,12 +72,19 @@ static unsigned short normal_i2c[] = { 0x08, I2C_CLIENT_END };
6
7 I2C_CLIENT_INSMOD_1(pcf50606);
8
9 -#define PCF50606_F_CHG_FAST 0x00000001 /* Charger Fast allowed */
10 -#define PCF50606_F_CHG_PRESENT 0x00000002 /* Charger present */
11 -#define PCF50606_F_CHG_FOK 0x00000004 /* Fast OK for battery */
12 -#define PCF50606_F_CHG_ERR 0x00000008 /* Charger Error */
13 -#define PCF50606_F_CHG_PROT 0x00000010 /* Charger Protection */
14 -#define PCF50606_F_CHG_READY 0x00000020 /* Charging completed */
15 +#define PCF50606_B_CHG_FAST 0 /* Charger Fast allowed */
16 +#define PCF50606_B_CHG_PRESENT 1 /* Charger present */
17 +#define PCF50606_B_CHG_FOK 2 /* Fast OK for battery */
18 +#define PCF50606_B_CHG_ERR 3 /* Charger Error */
19 +#define PCF50606_B_CHG_PROT 4 /* Charger Protection */
20 +#define PCF50606_B_CHG_READY 5 /* Charging completed */
21 +
22 +#define PCF50606_F_CHG_FAST (1<<PCF50606_B_CHG_FAST) /* Charger Fast allowed */
23 +#define PCF50606_F_CHG_PRESENT (1<<PCF50606_B_CHG_PRESENT) /* Charger present */
24 +#define PCF50606_F_CHG_FOK (1<<PCF50606_B_CHG_FOK) /* Fast OK for battery */
25 +#define PCF50606_F_CHG_ERR (1<<PCF50606_B_CHG_ERR) /* Charger Error */
26 +#define PCF50606_F_CHG_PROT (1<<PCF50606_B_CHG_PROT) /* Charger Protection */
27 +#define PCF50606_F_CHG_READY (1<<PCF50606_B_CHG_READY) /* Charging completed */
28 #define PCF50606_F_CHG_MASK 0x000000fc
29
30 #define PCF50606_F_PWR_PRESSED 0x00000100
31 @@ -1087,12 +1094,12 @@ static ssize_t set_chgmode(struct device *dev, struct device_attribute *attr,
32 static DEVICE_ATTR(chgmode, S_IRUGO | S_IWUSR, show_chgmode, set_chgmode);
33
34 static const char *chgstate_names[] = {
35 - [PCF50606_F_CHG_FAST] = "fast_enabled",
36 - [PCF50606_F_CHG_PRESENT] = "present",
37 - [PCF50606_F_CHG_FOK] = "fast_ok",
38 - [PCF50606_F_CHG_ERR] = "error",
39 - [PCF50606_F_CHG_PROT] = "protection",
40 - [PCF50606_F_CHG_READY] = "ready",
41 + [PCF50606_B_CHG_FAST] = "fast_enabled",
42 + [PCF50606_B_CHG_PRESENT] = "present",
43 + [PCF50606_B_CHG_FOK] = "fast_ok",
44 + [PCF50606_B_CHG_ERR] = "error",
45 + [PCF50606_B_CHG_PROT] = "protection",
46 + [PCF50606_B_CHG_READY] = "ready",
47 };
48
49 static ssize_t show_chgstate(struct device *dev, struct device_attribute *attr,
50 --
51 1.5.6.3
52
This page took 0.055499 seconds and 5 git commands to generate.