diff options
author | Mirko Vogt <mirko@openwrt.org> | 2008-12-12 11:58:53 +0000 |
---|---|---|
committer | Mirko Vogt <mirko@openwrt.org> | 2008-12-12 11:58:53 +0000 |
commit | 614683faf8029100802db06a825648d0b6490285 (patch) | |
tree | 7401b135dc7ce24ff0175e67e0f2ce7f96296ff0 /target/linux/s3c24xx/patches-2.6.24/1084-contrib-fix-chgstate-array-bloat.patch.patch | |
parent | 4a018d2445c5f249179ff82c8fffb0e3b717f738 (diff) | |
download | mtk-20170518-614683faf8029100802db06a825648d0b6490285.zip mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.gz mtk-20170518-614683faf8029100802db06a825648d0b6490285.tar.bz2 |
changed Makefile and profiles, added patches for kernel 2.6.24 (stable-branch of Openmoko)
SVN-Revision: 13613
Diffstat (limited to 'target/linux/s3c24xx/patches-2.6.24/1084-contrib-fix-chgstate-array-bloat.patch.patch')
-rw-r--r-- | target/linux/s3c24xx/patches-2.6.24/1084-contrib-fix-chgstate-array-bloat.patch.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/target/linux/s3c24xx/patches-2.6.24/1084-contrib-fix-chgstate-array-bloat.patch.patch b/target/linux/s3c24xx/patches-2.6.24/1084-contrib-fix-chgstate-array-bloat.patch.patch new file mode 100644 index 0000000..aa51b4e --- /dev/null +++ b/target/linux/s3c24xx/patches-2.6.24/1084-contrib-fix-chgstate-array-bloat.patch.patch @@ -0,0 +1,108 @@ +From 293025ae0e971da194ecb58be304835f246b6c9e Mon Sep 17 00:00:00 2001 +From: Mike Montour <mail@mmontour.net> +Date: Sun, 13 Apr 2008 07:25:47 +0100 +Subject: [PATCH] contrib-fix-chgstate-array-bloat.patch + +--- linux-2.6.22/drivers/i2c/chips/pcf50606.c.orig 2008-01-17 22:30:16.000000000 -0800 ++++ linux-2.6.22/drivers/i2c/chips/pcf50606.c 2008-01-17 22:31:43.000000000 -0800 +@@ -71,12 +71,19 @@ + + I2C_CLIENT_INSMOD_1(pcf50606); + +-#define PCF50606_F_CHG_FAST 0x00000001 /* Charger Fast allowed */ +-#define PCF50606_F_CHG_PRESENT 0x00000002 /* Charger present */ +-#define PCF50606_F_CHG_FOK 0x00000004 /* Fast OK for battery */ +-#define PCF50606_F_CHG_ERR 0x00000008 /* Charger Error */ +-#define PCF50606_F_CHG_PROT 0x00000010 /* Charger Protection */ +-#define PCF50606_F_CHG_READY 0x00000020 /* Charging completed */ ++#define PCF50606_B_CHG_FAST 0 /* Charger Fast allowed */ ++#define PCF50606_B_CHG_PRESENT 1 /* Charger present */ ++#define PCF50606_B_CHG_FOK 2 /* Fast OK for battery */ ++#define PCF50606_B_CHG_ERR 3 /* Charger Error */ ++#define PCF50606_B_CHG_PROT 4 /* Charger Protection */ ++#define PCF50606_B_CHG_READY 5 /* Charging completed */ ++ ++#define PCF50606_F_CHG_FAST (1<<PCF50606_B_CHG_FAST) /* Charger Fast allowed */ ++#define PCF50606_F_CHG_PRESENT (1<<PCF50606_B_CHG_PRESENT) /* Charger present */ ++#define PCF50606_F_CHG_FOK (1<<PCF50606_B_CHG_FOK) /* Fast OK for battery */ ++#define PCF50606_F_CHG_ERR (1<<PCF50606_B_CHG_ERR) /* Charger Error */ ++#define PCF50606_F_CHG_PROT (1<<PCF50606_B_CHG_PROT) /* Charger Protection */ ++#define PCF50606_F_CHG_READY (1<<PCF50606_B_CHG_READY) /* Charging completed */ + #define PCF50606_F_CHG_MASK 0x000000fc + + #define PCF50606_F_PWR_PRESSED 0x00000100 +@@ -1026,12 +1033,12 @@ + static DEVICE_ATTR(chgmode, S_IRUGO | S_IWUSR, show_chgmode, set_chgmode); + + static const char *chgstate_names[] = { +- [PCF50606_F_CHG_FAST] = "fast_enabled", +- [PCF50606_F_CHG_PRESENT] = "present", +- [PCF50606_F_CHG_FOK] = "fast_ok", +- [PCF50606_F_CHG_ERR] = "error", +- [PCF50606_F_CHG_PROT] = "protection", +- [PCF50606_F_CHG_READY] = "ready", ++ [PCF50606_B_CHG_FAST] = "fast_enabled", ++ [PCF50606_B_CHG_PRESENT] = "present", ++ [PCF50606_B_CHG_FOK] = "fast_ok", ++ [PCF50606_B_CHG_ERR] = "error", ++ [PCF50606_B_CHG_PROT] = "protection", ++ [PCF50606_B_CHG_READY] = "ready", + }; + + static ssize_t show_chgstate(struct device *dev, struct device_attribute *attr, +--- + drivers/i2c/chips/pcf50606.c | 31 +++++++++++++++++++------------ + 1 files changed, 19 insertions(+), 12 deletions(-) + +diff --git a/drivers/i2c/chips/pcf50606.c b/drivers/i2c/chips/pcf50606.c +index a1c92d3..aaec6e8 100644 +--- a/drivers/i2c/chips/pcf50606.c ++++ b/drivers/i2c/chips/pcf50606.c +@@ -72,12 +72,19 @@ static unsigned short normal_i2c[] = { 0x08, I2C_CLIENT_END }; + + I2C_CLIENT_INSMOD_1(pcf50606); + +-#define PCF50606_F_CHG_FAST 0x00000001 /* Charger Fast allowed */ +-#define PCF50606_F_CHG_PRESENT 0x00000002 /* Charger present */ +-#define PCF50606_F_CHG_FOK 0x00000004 /* Fast OK for battery */ +-#define PCF50606_F_CHG_ERR 0x00000008 /* Charger Error */ +-#define PCF50606_F_CHG_PROT 0x00000010 /* Charger Protection */ +-#define PCF50606_F_CHG_READY 0x00000020 /* Charging completed */ ++#define PCF50606_B_CHG_FAST 0 /* Charger Fast allowed */ ++#define PCF50606_B_CHG_PRESENT 1 /* Charger present */ ++#define PCF50606_B_CHG_FOK 2 /* Fast OK for battery */ ++#define PCF50606_B_CHG_ERR 3 /* Charger Error */ ++#define PCF50606_B_CHG_PROT 4 /* Charger Protection */ ++#define PCF50606_B_CHG_READY 5 /* Charging completed */ ++ ++#define PCF50606_F_CHG_FAST (1<<PCF50606_B_CHG_FAST) /* Charger Fast allowed */ ++#define PCF50606_F_CHG_PRESENT (1<<PCF50606_B_CHG_PRESENT) /* Charger present */ ++#define PCF50606_F_CHG_FOK (1<<PCF50606_B_CHG_FOK) /* Fast OK for battery */ ++#define PCF50606_F_CHG_ERR (1<<PCF50606_B_CHG_ERR) /* Charger Error */ ++#define PCF50606_F_CHG_PROT (1<<PCF50606_B_CHG_PROT) /* Charger Protection */ ++#define PCF50606_F_CHG_READY (1<<PCF50606_B_CHG_READY) /* Charging completed */ + #define PCF50606_F_CHG_MASK 0x000000fc + + #define PCF50606_F_PWR_PRESSED 0x00000100 +@@ -1087,12 +1094,12 @@ static ssize_t set_chgmode(struct device *dev, struct device_attribute *attr, + static DEVICE_ATTR(chgmode, S_IRUGO | S_IWUSR, show_chgmode, set_chgmode); + + static const char *chgstate_names[] = { +- [PCF50606_F_CHG_FAST] = "fast_enabled", +- [PCF50606_F_CHG_PRESENT] = "present", +- [PCF50606_F_CHG_FOK] = "fast_ok", +- [PCF50606_F_CHG_ERR] = "error", +- [PCF50606_F_CHG_PROT] = "protection", +- [PCF50606_F_CHG_READY] = "ready", ++ [PCF50606_B_CHG_FAST] = "fast_enabled", ++ [PCF50606_B_CHG_PRESENT] = "present", ++ [PCF50606_B_CHG_FOK] = "fast_ok", ++ [PCF50606_B_CHG_ERR] = "error", ++ [PCF50606_B_CHG_PROT] = "protection", ++ [PCF50606_B_CHG_READY] = "ready", + }; + + static ssize_t show_chgstate(struct device *dev, struct device_attribute *attr, +-- +1.5.6.5 + |