diff for duplicates of <20150317084730.GA9761@amd> diff --git a/a/1.txt b/N1/1.txt index a457106..3c7bd80 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -54,3 +54,10 @@ need similar code. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html +-------------- next part -------------- +A non-text attachment was scrubbed... +Name: zbattery.10.diff +Type: text/x-diff +Size: 15807 bytes +Desc: not available +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150317/debefd99/attachment.bin> diff --git a/a/2.hdr b/a/2.hdr deleted file mode 100644 index c1e18cd..0000000 --- a/a/2.hdr +++ /dev/null @@ -1,2 +0,0 @@ -Content-Type: text/x-diff; charset=us-ascii -Content-Disposition: attachment; filename="zbattery.10.diff" diff --git a/a/2.txt b/a/2.txt deleted file mode 100644 index 78fddaf..0000000 --- a/a/2.txt +++ /dev/null @@ -1,591 +0,0 @@ -./drivers/power - ./drivers/power.ofic -diff -X /usr/src/linux/.gitignore -ur ./drivers/power.ofic/Makefile ./drivers/power/Makefile ---- ./drivers/power.ofic/Makefile 2011-03-16 10:11:34.000000000 +0100 -+++ ./drivers/power/Makefile 2011-04-29 15:12:14.000000000 +0200 -@@ -19,7 +19,9 @@ - obj-$(CONFIG_BATTERY_PMU) += pmu_battery.o - obj-$(CONFIG_BATTERY_OLPC) += olpc_battery.o - obj-$(CONFIG_BATTERY_TOSA) += tosa_battery.o -+obj-m += spitz_battery.o - obj-$(CONFIG_BATTERY_COLLIE) += collie_battery.o -+obj-m += spitz_battery.o - obj-$(CONFIG_BATTERY_WM97XX) += wm97xx_battery.o - obj-$(CONFIG_BATTERY_BQ20Z75) += bq20z75.o - obj-$(CONFIG_BATTERY_BQ27x00) += bq27x00_battery.o -diff -X /usr/src/linux/.gitignore -ur ./drivers/power.ofic/power_supply_sysfs.c ./drivers/power/power_supply_sysfs.c ---- ./drivers/power.ofic/power_supply_sysfs.c 2011-02-02 10:54:32.000000000 +0100 -+++ ./drivers/power/power_supply_sysfs.c 2011-04-29 15:02:07.000000000 +0200 -@@ -40,7 +40,8 @@ - - static ssize_t power_supply_show_property(struct device *dev, - struct device_attribute *attr, -- char *buf) { -+ char *buf) -+{ - static char *type_text[] = { - "Battery", "UPS", "Mains", "USB", - "USB_DCP", "USB_CDP", "USB_ACA" -@@ -102,7 +103,8 @@ - - static ssize_t power_supply_store_property(struct device *dev, - struct device_attribute *attr, -- const char *buf, size_t count) { -+ const char *buf, size_t count) -+{ - ssize_t ret; - struct power_supply *psy = dev_get_drvdata(dev); - const ptrdiff_t off = attr - power_supply_attrs; -Only in ./drivers/power: spitz_battery.c -./drivers/video - ./drivers/video.ofic -diff -X /usr/src/linux/.gitignore -ur ./drivers/video.ofic/pxafb.c ./drivers/video/pxafb.c ---- ./drivers/video.ofic/pxafb.c 2011-02-02 09:44:53.000000000 +0100 -+++ ./drivers/video/pxafb.c 2011-04-29 14:50:27.000000000 +0200 -@@ -1648,6 +1648,9 @@ - #endif - - #ifdef CONFIG_PM -+ -+static struct pxafb_info *my_fbi; -+ - /* - * Power management hooks. Note that we won't be called from IRQ context, - * unlike the blank functions above, so we may sleep. -@@ -1656,6 +1659,8 @@ - { - struct pxafb_info *fbi = dev_get_drvdata(dev); - -+ my_fbi = fbi; -+ - set_ctrlr_state(fbi, C_DISABLE_PM); - return 0; - } -./arch/arm - ./arch/arm.ofic -Binary files ./arch/arm.ofic/boot/Image and ./arch/arm/boot/Image differ -Binary files ./arch/arm.ofic/boot/compressed/piggy.gzip and ./arch/arm/boot/compressed/piggy.gzip differ -Binary files ./arch/arm.ofic/boot/compressed/vmlinux and ./arch/arm/boot/compressed/vmlinux differ -Binary files ./arch/arm.ofic/boot/zImage and ./arch/arm/boot/zImage differ -diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/corgi_pm.c ./arch/arm/mach-pxa/corgi_pm.c ---- ./arch/arm.ofic/mach-pxa/corgi_pm.c 2011-02-02 10:30:38.000000000 +0100 -+++ ./arch/arm/mach-pxa/corgi_pm.c 2011-04-29 15:12:15.000000000 +0200 -@@ -43,6 +43,92 @@ - { CORGI_GPIO_KEY_INT, GPIOF_IN, "Key Interrupt" }, - }; - -+static const struct battery_thresh corgi_battery_levels_acin[] = { -+ { 213, 100}, -+ { 212, 98}, -+ { 211, 95}, -+ { 210, 93}, -+ { 209, 90}, -+ { 208, 88}, -+ { 207, 85}, -+ { 206, 83}, -+ { 205, 80}, -+ { 204, 78}, -+ { 203, 75}, -+ { 202, 73}, -+ { 201, 70}, -+ { 200, 68}, -+ { 199, 65}, -+ { 198, 63}, -+ { 197, 60}, -+ { 196, 58}, -+ { 195, 55}, -+ { 194, 53}, -+ { 193, 50}, -+ { 192, 48}, -+ { 192, 45}, -+ { 191, 43}, -+ { 191, 40}, -+ { 190, 38}, -+ { 190, 35}, -+ { 189, 33}, -+ { 188, 30}, -+ { 187, 28}, -+ { 186, 25}, -+ { 185, 23}, -+ { 184, 20}, -+ { 183, 18}, -+ { 182, 15}, -+ { 181, 13}, -+ { 180, 10}, -+ { 179, 8}, -+ { 178, 5}, -+ { 0, 0}, -+}; -+ -+static const struct battery_thresh corgi_battery_levels_noac[] = { -+ { 213, 100}, -+ { 212, 98}, -+ { 211, 95}, -+ { 210, 93}, -+ { 209, 90}, -+ { 208, 88}, -+ { 207, 85}, -+ { 206, 83}, -+ { 205, 80}, -+ { 204, 78}, -+ { 203, 75}, -+ { 202, 73}, -+ { 201, 70}, -+ { 200, 68}, -+ { 199, 65}, -+ { 198, 63}, -+ { 197, 60}, -+ { 196, 58}, -+ { 195, 55}, -+ { 194, 53}, -+ { 193, 50}, -+ { 192, 48}, -+ { 191, 45}, -+ { 190, 43}, -+ { 189, 40}, -+ { 188, 38}, -+ { 187, 35}, -+ { 186, 33}, -+ { 185, 30}, -+ { 184, 28}, -+ { 183, 25}, -+ { 182, 23}, -+ { 181, 20}, -+ { 180, 18}, -+ { 179, 15}, -+ { 178, 13}, -+ { 177, 10}, -+ { 176, 8}, -+ { 175, 5}, -+ { 0, 0}, -+}; -+ - static void corgi_charger_init(void) - { - gpio_request_array(ARRAY_AND_SIZE(charger_gpios)); -@@ -173,7 +259,6 @@ - .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT, - .bat_levels = 40, - .bat_levels_noac = sharpsl_battery_levels_noac, -- .bat_levels_acin = sharpsl_battery_levels_acin, - .status_high_acin = 188, - .status_low_acin = 178, - .status_high_noac = 185, -diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/include/mach/sharpsl_pm.h ./arch/arm/mach-pxa/include/mach/sharpsl_pm.h ---- ./arch/arm.ofic/mach-pxa/include/mach/sharpsl_pm.h 2011-02-02 10:30:38.000000000 +0100 -+++ ./arch/arm/mach-pxa/include/mach/sharpsl_pm.h 2011-04-29 15:18:19.000000000 +0200 -@@ -110,4 +110,22 @@ - int sharpsl_pm_pxa_read_max1111(int channel); - - void corgi_lcd_limit_intensity(int limit); -+ -+/* -+ * Constants -+ */ -+#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */ -+#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ -+#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ -+#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ -+ -+#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ -+#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ -+#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */ -+#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT 10 /* 10 msec */ -+#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN 10 /* 10 msec */ -+#define SHARPSL_CHARGE_WAIT_TIME 15 /* 15 msec */ -+#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */ -+#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */ -+ - #endif -diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/sharpsl_pm.c ./arch/arm/mach-pxa/sharpsl_pm.c ---- ./arch/arm.ofic/mach-pxa/sharpsl_pm.c 2011-03-16 10:07:44.000000000 +0100 -+++ ./arch/arm/mach-pxa/sharpsl_pm.c 2011-04-29 15:27:09.000000000 +0200 -@@ -32,23 +32,6 @@ - #include <mach/sharpsl_pm.h> - - /* -- * Constants -- */ --#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */ --#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */ --#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */ --#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */ -- --#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */ --#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */ --#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */ --#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT 10 /* 10 msec */ --#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN 10 /* 10 msec */ --#define SHARPSL_CHARGE_WAIT_TIME 15 /* 15 msec */ --#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */ --#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */ -- --/* - * Prototypes - */ - #ifdef CONFIG_PM -@@ -68,96 +51,32 @@ - * Variables - */ - struct sharpsl_pm_status sharpsl_pm; -+EXPORT_SYMBOL(sharpsl_pm); - static DECLARE_DELAYED_WORK(toggle_charger, sharpsl_charge_toggle); - static DECLARE_DELAYED_WORK(sharpsl_bat, sharpsl_battery_thread); - DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger); - - - --struct battery_thresh sharpsl_battery_levels_acin[] = { -- { 213, 100}, -- { 212, 98}, -- { 211, 95}, -- { 210, 93}, -- { 209, 90}, -- { 208, 88}, -- { 207, 85}, -- { 206, 83}, -- { 205, 80}, -- { 204, 78}, -- { 203, 75}, -- { 202, 73}, -- { 201, 70}, -- { 200, 68}, -- { 199, 65}, -- { 198, 63}, -- { 197, 60}, -- { 196, 58}, -- { 195, 55}, -- { 194, 53}, -- { 193, 50}, -- { 192, 48}, -- { 192, 45}, -- { 191, 43}, -- { 191, 40}, -- { 190, 38}, -- { 190, 35}, -- { 189, 33}, -- { 188, 30}, -- { 187, 28}, -- { 186, 25}, -- { 185, 23}, -- { 184, 20}, -- { 183, 18}, -- { 182, 15}, -- { 181, 13}, -- { 180, 10}, -- { 179, 8}, -- { 178, 5}, -- { 0, 0}, --}; -- - struct battery_thresh sharpsl_battery_levels_noac[] = { -- { 213, 100}, -- { 212, 98}, -- { 211, 95}, -- { 210, 93}, -- { 209, 90}, -- { 208, 88}, -- { 207, 85}, -- { 206, 83}, -- { 205, 80}, -- { 204, 78}, -- { 203, 75}, -- { 202, 73}, -- { 201, 70}, -- { 200, 68}, -- { 199, 65}, -- { 198, 63}, -- { 197, 60}, -- { 196, 58}, -- { 195, 55}, -- { 194, 53}, -- { 193, 50}, -- { 192, 48}, -- { 191, 45}, -- { 190, 43}, -- { 189, 40}, -- { 188, 38}, -- { 187, 35}, -- { 186, 33}, -- { 185, 30}, -- { 184, 28}, -- { 183, 25}, -- { 182, 23}, -- { 181, 20}, -- { 180, 18}, -- { 179, 15}, -- { 178, 13}, -- { 177, 10}, -- { 176, 8}, -- { 175, 5}, -- { 0, 0}, -+ { 3980, 100 }, -+ { 3900, 95 }, -+ { 3860, 90 }, -+ { 3800, 85 }, -+ { 3760, 80 }, -+ { 3720, 74 }, -+ { 3680, 69 }, -+ { 3620, 65 }, -+ { 3570, 59 }, -+ { 3560, 55 }, -+ { 3550, 48 }, -+ { 3530, 45 }, -+ { 3510, 39 }, -+ { 3490, 33 }, -+ { 3470, 29 }, -+ { 3450, 23 }, -+ { 3410, 16 }, -+ { 0, 0 }, - }; - - /* MAX1111 Commands */ -@@ -185,22 +104,71 @@ - return max1111_read_channel(channel >> 1); - } - --static int get_percentage(int voltage) -+ -+typedef int milliamp_t; -+typedef int milliohm_t; -+typedef int millivolt_t; -+ -+milliamp_t basic_current = 125; -+milliohm_t battery_resistance = 100; -+ -+/* 422 seems to be suitable for very old, 1Ah battery. -+ 2Ah battery probably has better resistance */ -+ -+/* Unfortunately, resistance depends on state of charge, current -+ * direction and temperature. -+ * -+ * Ouch, and dependency is actually _not_ too simple. It is lowest -+ * at 3.55V, very slowly rises at 4V (approximately linear dependency), -+ * and quickly rises towards 3.2V (in something exponential-looking). -+ * -+ * It is about same at 25Celsius and 40Celsius, and about 2.5x the value -+ * on 0Celsius, rising _very_ sharply. -+ * -+ * Li-ion should only be charged between 0 and 45 Celsius, and discharged -+ * between -20 and 60 celsius. -+ */ -+ -+extern int backlight_current; -+ -+/* Positive values: current drawn from battery */ -+milliamp_t battery_current(void) -+{ -+ if (sharpsl_pm.charge_mode == CHRG_ON) -+ return 0; -+ -+ return basic_current; -+} -+ -+millivolt_t liion_internal_voltage(millivolt_t voltage, milliamp_t current_ma) -+{ -+ return voltage + (battery_resistance * current_ma / 1000); -+} -+ -+/* returns mV */ -+millivolt_t liion_voltage(int adc) -+{ -+ /* Thanks to Stanislav B. ADC has 3.3V as reference, -+ is connected to battery over 47kOhm, -+ and to ground over 100kOhm. */ -+ return (adc * 147 * 33)/256; -+} -+ -+static int get_percentage(int voltage_adc) - { - int i = sharpsl_pm.machinfo->bat_levels - 1; - int bl_status = sharpsl_pm.machinfo->backlight_get_status ? sharpsl_pm.machinfo->backlight_get_status() : 0; - struct battery_thresh *thresh; -+ millivolt_t voltage = liion_voltage(voltage_adc); - -- if (sharpsl_pm.charge_mode == CHRG_ON) -- thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_acin_bl : sharpsl_pm.machinfo->bat_levels_acin; -- else -- thresh = bl_status ? sharpsl_pm.machinfo->bat_levels_noac_bl : sharpsl_pm.machinfo->bat_levels_noac; -+ thresh = sharpsl_pm.machinfo->bat_levels_noac; - - while (i > 0 && (voltage > thresh[i].voltage)) - i--; - - return thresh[i].percentage; - } -+EXPORT_SYMBOL(get_percentage); - - static int get_apm_status(int voltage) - { -@@ -317,6 +285,8 @@ - - static void sharpsl_charge_error(void) - { -+ dev_warn(sharpsl_pm.dev, "Charger Error\n"); -+ - sharpsl_pm_led(SHARPSL_LED_ERROR); - sharpsl_pm.machinfo->charge(0); - sharpsl_pm.charge_mode = CHRG_ERROR; -@@ -513,8 +483,10 @@ - val = get_select_val(buff); - - dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val); -- if (val > sharpsl_pm.machinfo->charge_on_temp) { -- printk(KERN_WARNING "Not charging: temperature out of limits.\n"); -+ /* FIXME: this should catch battery read errors, but we should -+ probably avoid charging in <0C temperatures, too. */ -+ if ((val < 0) || (val > sharpsl_pm.machinfo->charge_on_temp)) { -+ dev_warn(sharpsl_pm.dev, "Not charging: temperature %d out of limits.\n", val); - return -1; - } - -diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/spitz.c ./arch/arm/mach-pxa/spitz.c ---- ./arch/arm.ofic/mach-pxa/spitz.c 2011-03-16 10:07:44.000000000 +0100 -+++ ./arch/arm/mach-pxa/spitz.c 2011-04-29 15:25:47.000000000 +0200 -@@ -922,6 +922,15 @@ - #endif - - /****************************************************************************** -+ * Battery -+ ******************************************************************************/ -+ -+static struct platform_device spitz_battery_device = { -+ .name = "spitz-battery", -+ .id = -1, -+}; -+ -+/****************************************************************************** - * Machine init - ******************************************************************************/ - static void spitz_poweroff(void) -@@ -969,6 +978,7 @@ - spitz_nor_init(); - spitz_nand_init(); - spitz_i2c_init(); -+ platform_device_register(&spitz_battery_device); - } - - static void __init spitz_fixup(struct machine_desc *desc, -diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/spitz_pm.c ./arch/arm/mach-pxa/spitz_pm.c ---- ./arch/arm.ofic/mach-pxa/spitz_pm.c 2011-02-02 10:30:39.000000000 +0100 -+++ ./arch/arm/mach-pxa/spitz_pm.c 2011-04-29 15:15:16.000000000 +0200 -@@ -45,6 +45,93 @@ - { SPITZ_GPIO_CHRG_ON, GPIOF_OUT_INIT_LOW, "Charger On" }, - }; - -+static const struct battery_thresh spitz_battery_levels_acin[] = { -+ { 213, 100}, -+ { 212, 98}, -+ { 211, 95}, -+ { 210, 93}, -+ { 209, 90}, -+ { 208, 88}, -+ { 207, 85}, -+ { 206, 83}, -+ { 205, 80}, -+ { 204, 78}, -+ { 203, 75}, -+ { 202, 73}, -+ { 201, 70}, -+ { 200, 68}, -+ { 199, 65}, -+ { 198, 63}, -+ { 197, 60}, -+ { 196, 58}, -+ { 195, 55}, -+ { 194, 53}, -+ { 193, 50}, -+ { 192, 48}, -+ { 192, 45}, -+ { 191, 43}, -+ { 191, 40}, -+ { 190, 38}, -+ { 190, 35}, -+ { 189, 33}, -+ { 188, 30}, -+ { 187, 28}, -+ { 186, 25}, -+ { 185, 23}, -+ { 184, 20}, -+ { 183, 18}, -+ { 182, 15}, -+ { 181, 13}, -+ { 180, 10}, -+ { 179, 8}, -+ { 178, 5}, -+ { 0, 0}, -+}; -+ -+static const struct battery_thresh spitz_battery_levels_noac[] = { -+ { 213, 100}, -+ { 212, 98}, -+ { 211, 95}, -+ { 210, 93}, -+ { 209, 90}, -+ { 208, 88}, -+ { 207, 85}, -+ { 206, 83}, -+ { 205, 80}, -+ { 204, 78}, -+ { 203, 75}, -+ { 202, 73}, -+ { 201, 70}, -+ { 200, 68}, -+ { 199, 65}, -+ { 198, 63}, -+ { 197, 60}, -+ { 196, 58}, -+ { 195, 55}, -+ { 194, 53}, -+ { 193, 50}, -+ { 192, 48}, -+ { 191, 45}, -+ { 190, 43}, -+ { 189, 40}, -+ { 188, 38}, -+ { 187, 35}, -+ { 186, 33}, -+ { 185, 30}, -+ { 184, 28}, -+ { 183, 25}, -+ { 182, 23}, -+ { 181, 20}, -+ { 180, 18}, -+ { 179, 15}, -+ { 178, 13}, -+ { 177, 10}, -+ { 176, 8}, -+ { 175, 5}, -+ { 0, 0}, -+}; -+ -+ - static void spitz_charger_init(void) - { - gpio_request_array(ARRAY_AND_SIZE(spitz_charger_gpios)); -@@ -192,6 +279,11 @@ - } - } - -+int backlight_get_status(void) -+{ -+ return 0; -+} -+ - struct sharpsl_charger_machinfo spitz_pm_machinfo = { - .init = spitz_charger_init, - .exit = NULL, -@@ -210,7 +302,7 @@ - .charger_wakeup = spitz_charger_wakeup, - .should_wakeup = spitz_should_wakeup, - #if defined(CONFIG_LCD_CORGI) -- .backlight_limit = corgi_lcd_limit_intensity, -+ .backlight_limit = corgi_lcd_limit_intensity, - #endif - .charge_on_volt = SHARPSL_CHARGE_ON_VOLT, - .charge_on_temp = SHARPSL_CHARGE_ON_TEMP, -@@ -220,7 +312,6 @@ - .fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT, - .bat_levels = 40, - .bat_levels_noac = sharpsl_battery_levels_noac, -- .bat_levels_acin = sharpsl_battery_levels_acin, - .status_high_acin = 188, - .status_low_acin = 178, - .status_high_noac = 185, diff --git a/a/content_digest b/N1/content_digest index 2fb9d40..92cb51e 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,23 +2,11 @@ "ref\01423088075-10025-4-git-send-email-marek@goldelico.com\0" "ref\020150316210532.GA11441@amd\0" "ref\0CAAfyv34vnRY=TAyx4+7s1SW7rVE7CFh9z+OOcCsbCx63y9aVog@mail.gmail.com\0" - "From\0Pavel Machek <pavel@ucw.cz>\0" - "Subject\0Re: [PATCH v3 3/6] Documentation: DT: Document twl4030-madc-battery bindings\0" + "From\0pavel@ucw.cz (Pavel Machek)\0" + "Subject\0[PATCH v3 3/6] Documentation: DT: Document twl4030-madc-battery bindings\0" "Date\0Tue, 17 Mar 2015 09:47:30 +0100\0" - "To\0Belisko Marek <marek.belisko@gmail.com>\0" - "Cc\0Sebastian Reichel <sre@kernel.org>" - Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> - David Woodhouse <dwmw2@infradead.org> - Mark Rutland <mark.rutland@arm.com> - Tony Lindgren <tony@atomide.com> - devicetree@vger.kernel.org <devicetree@vger.kernel.org> - LKML <linux-kernel@vger.kernel.org> - linux-omap@vger.kernel.org <linux-omap@vger.kernel.org> - linux-arm-kernel <linux-arm-kernel@lists.infradead.org> - Linux PM mailing list <linux-pm@vger.kernel.org> - Dr. H. Nikolaus Schaller <hns@goldelico.com> - " GTA04 owners <gta04-owner@goldelico.com>\0" - "\01:1\0" + "To\0linux-arm-kernel@lists.infradead.org\0" + "\00:1\0" "b\0" "Hi!\n" "\n" @@ -75,600 +63,13 @@ "\t\t\t\t\t\t\t\tPavel\n" "-- \n" "(english) http://www.livejournal.com/~pavelmachek\n" - (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html - "\01:2\0" - "fn\0zbattery.10.diff\0" - "b\0" - "./drivers/power - ./drivers/power.ofic\n" - "diff -X /usr/src/linux/.gitignore -ur ./drivers/power.ofic/Makefile ./drivers/power/Makefile\n" - "--- ./drivers/power.ofic/Makefile\t2011-03-16 10:11:34.000000000 +0100\n" - "+++ ./drivers/power/Makefile\t2011-04-29 15:12:14.000000000 +0200\n" - "@@ -19,7 +19,9 @@\n" - " obj-$(CONFIG_BATTERY_PMU)\t+= pmu_battery.o\n" - " obj-$(CONFIG_BATTERY_OLPC)\t+= olpc_battery.o\n" - " obj-$(CONFIG_BATTERY_TOSA)\t+= tosa_battery.o\n" - "+obj-m\t+= spitz_battery.o\n" - " obj-$(CONFIG_BATTERY_COLLIE)\t+= collie_battery.o\n" - "+obj-m\t+= spitz_battery.o\n" - " obj-$(CONFIG_BATTERY_WM97XX)\t+= wm97xx_battery.o\n" - " obj-$(CONFIG_BATTERY_BQ20Z75)\t+= bq20z75.o\n" - " obj-$(CONFIG_BATTERY_BQ27x00)\t+= bq27x00_battery.o\n" - "diff -X /usr/src/linux/.gitignore -ur ./drivers/power.ofic/power_supply_sysfs.c ./drivers/power/power_supply_sysfs.c\n" - "--- ./drivers/power.ofic/power_supply_sysfs.c\t2011-02-02 10:54:32.000000000 +0100\n" - "+++ ./drivers/power/power_supply_sysfs.c\t2011-04-29 15:02:07.000000000 +0200\n" - "@@ -40,7 +40,8 @@\n" - " \n" - " static ssize_t power_supply_show_property(struct device *dev,\n" - " \t\t\t\t\t struct device_attribute *attr,\n" - "-\t\t\t\t\t char *buf) {\n" - "+\t\t\t\t\t char *buf)\n" - "+{\n" - " \tstatic char *type_text[] = {\n" - " \t\t\"Battery\", \"UPS\", \"Mains\", \"USB\",\n" - " \t\t\"USB_DCP\", \"USB_CDP\", \"USB_ACA\"\n" - "@@ -102,7 +103,8 @@\n" - " \n" - " static ssize_t power_supply_store_property(struct device *dev,\n" - " \t\t\t\t\t struct device_attribute *attr,\n" - "-\t\t\t\t\t const char *buf, size_t count) {\n" - "+\t\t\t\t\t const char *buf, size_t count)\n" - "+{\n" - " \tssize_t ret;\n" - " \tstruct power_supply *psy = dev_get_drvdata(dev);\n" - " \tconst ptrdiff_t off = attr - power_supply_attrs;\n" - "Only in ./drivers/power: spitz_battery.c\n" - "./drivers/video - ./drivers/video.ofic\n" - "diff -X /usr/src/linux/.gitignore -ur ./drivers/video.ofic/pxafb.c ./drivers/video/pxafb.c\n" - "--- ./drivers/video.ofic/pxafb.c\t2011-02-02 09:44:53.000000000 +0100\n" - "+++ ./drivers/video/pxafb.c\t2011-04-29 14:50:27.000000000 +0200\n" - "@@ -1648,6 +1648,9 @@\n" - " #endif\n" - " \n" - " #ifdef CONFIG_PM\n" - "+\n" - "+static struct pxafb_info *my_fbi;\n" - "+\n" - " /*\n" - " * Power management hooks. Note that we won't be called from IRQ context,\n" - " * unlike the blank functions above, so we may sleep.\n" - "@@ -1656,6 +1659,8 @@\n" - " {\n" - " \tstruct pxafb_info *fbi = dev_get_drvdata(dev);\n" - " \n" - "+\tmy_fbi = fbi;\n" - "+\n" - " \tset_ctrlr_state(fbi, C_DISABLE_PM);\n" - " \treturn 0;\n" - " }\n" - "./arch/arm - ./arch/arm.ofic\n" - "Binary files ./arch/arm.ofic/boot/Image and ./arch/arm/boot/Image differ\n" - "Binary files ./arch/arm.ofic/boot/compressed/piggy.gzip and ./arch/arm/boot/compressed/piggy.gzip differ\n" - "Binary files ./arch/arm.ofic/boot/compressed/vmlinux and ./arch/arm/boot/compressed/vmlinux differ\n" - "Binary files ./arch/arm.ofic/boot/zImage and ./arch/arm/boot/zImage differ\n" - "diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/corgi_pm.c ./arch/arm/mach-pxa/corgi_pm.c\n" - "--- ./arch/arm.ofic/mach-pxa/corgi_pm.c\t2011-02-02 10:30:38.000000000 +0100\n" - "+++ ./arch/arm/mach-pxa/corgi_pm.c\t2011-04-29 15:12:15.000000000 +0200\n" - "@@ -43,6 +43,92 @@\n" - " \t{ CORGI_GPIO_KEY_INT,\t GPIOF_IN, \"Key Interrupt\" },\n" - " };\n" - " \n" - "+static const struct battery_thresh corgi_battery_levels_acin[] = {\n" - "+\t{ 213, 100},\n" - "+\t{ 212, 98},\n" - "+\t{ 211, 95},\n" - "+\t{ 210, 93},\n" - "+\t{ 209, 90},\n" - "+\t{ 208, 88},\n" - "+\t{ 207, 85},\n" - "+\t{ 206, 83},\n" - "+\t{ 205, 80},\n" - "+\t{ 204, 78},\n" - "+\t{ 203, 75},\n" - "+\t{ 202, 73},\n" - "+\t{ 201, 70},\n" - "+\t{ 200, 68},\n" - "+\t{ 199, 65},\n" - "+\t{ 198, 63},\n" - "+\t{ 197, 60},\n" - "+\t{ 196, 58},\n" - "+\t{ 195, 55},\n" - "+\t{ 194, 53},\n" - "+\t{ 193, 50},\n" - "+\t{ 192, 48},\n" - "+\t{ 192, 45},\n" - "+\t{ 191, 43},\n" - "+\t{ 191, 40},\n" - "+\t{ 190, 38},\n" - "+\t{ 190, 35},\n" - "+\t{ 189, 33},\n" - "+\t{ 188, 30},\n" - "+\t{ 187, 28},\n" - "+\t{ 186, 25},\n" - "+\t{ 185, 23},\n" - "+\t{ 184, 20},\n" - "+\t{ 183, 18},\n" - "+\t{ 182, 15},\n" - "+\t{ 181, 13},\n" - "+\t{ 180, 10},\n" - "+\t{ 179, 8},\n" - "+\t{ 178, 5},\n" - "+\t{ 0, 0},\n" - "+};\n" - "+\n" - "+static const struct battery_thresh corgi_battery_levels_noac[] = {\n" - "+\t{ 213, 100},\n" - "+\t{ 212, 98},\n" - "+\t{ 211, 95},\n" - "+\t{ 210, 93},\n" - "+\t{ 209, 90},\n" - "+\t{ 208, 88},\n" - "+\t{ 207, 85},\n" - "+\t{ 206, 83},\n" - "+\t{ 205, 80},\n" - "+\t{ 204, 78},\n" - "+\t{ 203, 75},\n" - "+\t{ 202, 73},\n" - "+\t{ 201, 70},\n" - "+\t{ 200, 68},\n" - "+\t{ 199, 65},\n" - "+\t{ 198, 63},\n" - "+\t{ 197, 60},\n" - "+\t{ 196, 58},\n" - "+\t{ 195, 55},\n" - "+\t{ 194, 53},\n" - "+\t{ 193, 50},\n" - "+\t{ 192, 48},\n" - "+\t{ 191, 45},\n" - "+\t{ 190, 43},\n" - "+\t{ 189, 40},\n" - "+\t{ 188, 38},\n" - "+\t{ 187, 35},\n" - "+\t{ 186, 33},\n" - "+\t{ 185, 30},\n" - "+\t{ 184, 28},\n" - "+\t{ 183, 25},\n" - "+\t{ 182, 23},\n" - "+\t{ 181, 20},\n" - "+\t{ 180, 18},\n" - "+\t{ 179, 15},\n" - "+\t{ 178, 13},\n" - "+\t{ 177, 10},\n" - "+\t{ 176, 8},\n" - "+\t{ 175, 5},\n" - "+\t{ 0, 0},\n" - "+};\n" - "+\n" - " static void corgi_charger_init(void)\n" - " {\n" - " \tgpio_request_array(ARRAY_AND_SIZE(charger_gpios));\n" - "@@ -173,7 +259,6 @@\n" - " \t.fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,\n" - " \t.bat_levels = 40,\n" - " \t.bat_levels_noac = sharpsl_battery_levels_noac,\n" - "-\t.bat_levels_acin = sharpsl_battery_levels_acin,\n" - " \t.status_high_acin = 188,\n" - " \t.status_low_acin = 178,\n" - " \t.status_high_noac = 185,\n" - "diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/include/mach/sharpsl_pm.h ./arch/arm/mach-pxa/include/mach/sharpsl_pm.h\n" - "--- ./arch/arm.ofic/mach-pxa/include/mach/sharpsl_pm.h\t2011-02-02 10:30:38.000000000 +0100\n" - "+++ ./arch/arm/mach-pxa/include/mach/sharpsl_pm.h\t2011-04-29 15:18:19.000000000 +0200\n" - "@@ -110,4 +110,22 @@\n" - " int sharpsl_pm_pxa_read_max1111(int channel);\n" - " \n" - " void corgi_lcd_limit_intensity(int limit);\n" - "+\n" - "+/*\n" - "+ * Constants\n" - "+ */\n" - "+#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */\n" - "+#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */\n" - "+#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */\n" - "+#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */\n" - "+\n" - "+#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */\n" - "+#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */\n" - "+#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */\n" - "+#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT 10 /* 10 msec */\n" - "+#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN 10 /* 10 msec */\n" - "+#define SHARPSL_CHARGE_WAIT_TIME 15 /* 15 msec */\n" - "+#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */\n" - "+#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */\n" - "+\n" - " #endif\n" - "diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/sharpsl_pm.c ./arch/arm/mach-pxa/sharpsl_pm.c\n" - "--- ./arch/arm.ofic/mach-pxa/sharpsl_pm.c\t2011-03-16 10:07:44.000000000 +0100\n" - "+++ ./arch/arm/mach-pxa/sharpsl_pm.c\t2011-04-29 15:27:09.000000000 +0200\n" - "@@ -32,23 +32,6 @@\n" - " #include <mach/sharpsl_pm.h>\n" - " \n" - " /*\n" - "- * Constants\n" - "- */\n" - "-#define SHARPSL_CHARGE_ON_TIME_INTERVAL (msecs_to_jiffies(1*60*1000)) /* 1 min */\n" - "-#define SHARPSL_CHARGE_FINISH_TIME (msecs_to_jiffies(10*60*1000)) /* 10 min */\n" - "-#define SHARPSL_BATCHK_TIME (msecs_to_jiffies(15*1000)) /* 15 sec */\n" - "-#define SHARPSL_BATCHK_TIME_SUSPEND (60*10) /* 10 min */\n" - "-\n" - "-#define SHARPSL_WAIT_CO_TIME 15 /* 15 sec */\n" - "-#define SHARPSL_WAIT_DISCHARGE_ON 100 /* 100 msec */\n" - "-#define SHARPSL_CHECK_BATTERY_WAIT_TIME_TEMP 10 /* 10 msec */\n" - "-#define SHARPSL_CHECK_BATTERY_WAIT_TIME_VOLT 10 /* 10 msec */\n" - "-#define SHARPSL_CHECK_BATTERY_WAIT_TIME_ACIN 10 /* 10 msec */\n" - "-#define SHARPSL_CHARGE_WAIT_TIME 15 /* 15 msec */\n" - "-#define SHARPSL_CHARGE_CO_CHECK_TIME 5 /* 5 msec */\n" - "-#define SHARPSL_CHARGE_RETRY_CNT 1 /* eqv. 10 min */\n" - "-\n" - "-/*\n" - " * Prototypes\n" - " */\n" - " #ifdef CONFIG_PM\n" - "@@ -68,96 +51,32 @@\n" - " * Variables\n" - " */\n" - " struct sharpsl_pm_status sharpsl_pm;\n" - "+EXPORT_SYMBOL(sharpsl_pm);\n" - " static DECLARE_DELAYED_WORK(toggle_charger, sharpsl_charge_toggle);\n" - " static DECLARE_DELAYED_WORK(sharpsl_bat, sharpsl_battery_thread);\n" - " DEFINE_LED_TRIGGER(sharpsl_charge_led_trigger);\n" - " \n" - " \n" - " \n" - "-struct battery_thresh sharpsl_battery_levels_acin[] = {\n" - "-\t{ 213, 100},\n" - "-\t{ 212, 98},\n" - "-\t{ 211, 95},\n" - "-\t{ 210, 93},\n" - "-\t{ 209, 90},\n" - "-\t{ 208, 88},\n" - "-\t{ 207, 85},\n" - "-\t{ 206, 83},\n" - "-\t{ 205, 80},\n" - "-\t{ 204, 78},\n" - "-\t{ 203, 75},\n" - "-\t{ 202, 73},\n" - "-\t{ 201, 70},\n" - "-\t{ 200, 68},\n" - "-\t{ 199, 65},\n" - "-\t{ 198, 63},\n" - "-\t{ 197, 60},\n" - "-\t{ 196, 58},\n" - "-\t{ 195, 55},\n" - "-\t{ 194, 53},\n" - "-\t{ 193, 50},\n" - "-\t{ 192, 48},\n" - "-\t{ 192, 45},\n" - "-\t{ 191, 43},\n" - "-\t{ 191, 40},\n" - "-\t{ 190, 38},\n" - "-\t{ 190, 35},\n" - "-\t{ 189, 33},\n" - "-\t{ 188, 30},\n" - "-\t{ 187, 28},\n" - "-\t{ 186, 25},\n" - "-\t{ 185, 23},\n" - "-\t{ 184, 20},\n" - "-\t{ 183, 18},\n" - "-\t{ 182, 15},\n" - "-\t{ 181, 13},\n" - "-\t{ 180, 10},\n" - "-\t{ 179, 8},\n" - "-\t{ 178, 5},\n" - "-\t{ 0, 0},\n" - "-};\n" - "-\n" - " struct battery_thresh sharpsl_battery_levels_noac[] = {\n" - "-\t{ 213, 100},\n" - "-\t{ 212, 98},\n" - "-\t{ 211, 95},\n" - "-\t{ 210, 93},\n" - "-\t{ 209, 90},\n" - "-\t{ 208, 88},\n" - "-\t{ 207, 85},\n" - "-\t{ 206, 83},\n" - "-\t{ 205, 80},\n" - "-\t{ 204, 78},\n" - "-\t{ 203, 75},\n" - "-\t{ 202, 73},\n" - "-\t{ 201, 70},\n" - "-\t{ 200, 68},\n" - "-\t{ 199, 65},\n" - "-\t{ 198, 63},\n" - "-\t{ 197, 60},\n" - "-\t{ 196, 58},\n" - "-\t{ 195, 55},\n" - "-\t{ 194, 53},\n" - "-\t{ 193, 50},\n" - "-\t{ 192, 48},\n" - "-\t{ 191, 45},\n" - "-\t{ 190, 43},\n" - "-\t{ 189, 40},\n" - "-\t{ 188, 38},\n" - "-\t{ 187, 35},\n" - "-\t{ 186, 33},\n" - "-\t{ 185, 30},\n" - "-\t{ 184, 28},\n" - "-\t{ 183, 25},\n" - "-\t{ 182, 23},\n" - "-\t{ 181, 20},\n" - "-\t{ 180, 18},\n" - "-\t{ 179, 15},\n" - "-\t{ 178, 13},\n" - "-\t{ 177, 10},\n" - "-\t{ 176, 8},\n" - "-\t{ 175, 5},\n" - "-\t{ 0, 0},\n" - "+\t{ 3980, 100 },\n" - "+\t{ 3900, 95 },\n" - "+\t{ 3860, 90 },\n" - "+\t{ 3800, 85 },\n" - "+\t{ 3760, 80 },\n" - "+\t{ 3720, 74 },\n" - "+\t{ 3680, 69 },\n" - "+\t{ 3620, 65 },\n" - "+\t{ 3570, 59 },\n" - "+\t{ 3560, 55 },\n" - "+\t{ 3550, 48 },\n" - "+\t{ 3530, 45 },\n" - "+\t{ 3510, 39 },\n" - "+\t{ 3490, 33 },\n" - "+\t{ 3470, 29 },\n" - "+\t{ 3450, 23 },\n" - "+\t{ 3410, 16 },\n" - "+\t{ 0, 0 },\n" - " };\n" - " \n" - " /* MAX1111 Commands */\n" - "@@ -185,22 +104,71 @@\n" - " \treturn max1111_read_channel(channel >> 1);\n" - " }\n" - " \n" - "-static int get_percentage(int voltage)\n" - "+\n" - "+typedef int milliamp_t;\n" - "+typedef int milliohm_t;\n" - "+typedef int millivolt_t;\n" - "+\n" - "+milliamp_t basic_current = 125;\n" - "+milliohm_t battery_resistance = 100;\n" - "+\n" - "+/* 422 seems to be suitable for very old, 1Ah battery.\n" - "+ 2Ah battery probably has better resistance */\n" - "+\n" - "+/* Unfortunately, resistance depends on state of charge, current\n" - "+ * direction and temperature.\n" - "+ *\n" - "+ * Ouch, and dependency is actually _not_ too simple. It is lowest\n" - "+ * at 3.55V, very slowly rises at 4V (approximately linear dependency),\n" - "+ * and quickly rises towards 3.2V (in something exponential-looking).\n" - "+ *\n" - "+ * It is about same at 25Celsius and 40Celsius, and about 2.5x the value\n" - "+ * on 0Celsius, rising _very_ sharply.\n" - "+ *\n" - "+ * Li-ion should only be charged between 0 and 45 Celsius, and discharged\n" - "+ * between -20 and 60 celsius.\n" - "+ */\n" - "+\n" - "+extern int backlight_current;\n" - "+\n" - "+/* Positive values: current drawn from battery */\n" - "+milliamp_t battery_current(void)\n" - "+{\n" - "+\tif (sharpsl_pm.charge_mode == CHRG_ON)\n" - "+\t\treturn 0;\n" - "+\n" - "+\treturn basic_current;\n" - "+}\n" - "+\n" - "+millivolt_t liion_internal_voltage(millivolt_t voltage, milliamp_t current_ma)\n" - "+{\n" - "+\treturn voltage + (battery_resistance * current_ma / 1000);\n" - "+}\n" - "+\n" - "+/* returns mV */\n" - "+millivolt_t liion_voltage(int adc)\n" - "+{\n" - "+\t/* Thanks to Stanislav B. ADC has 3.3V as reference,\n" - "+\t is connected to battery over 47kOhm,\n" - "+\t and to ground over 100kOhm. */\n" - "+\treturn (adc * 147 * 33)/256;\n" - "+}\n" - "+\n" - "+static int get_percentage(int voltage_adc)\n" - " {\n" - " \tint i = sharpsl_pm.machinfo->bat_levels - 1;\n" - " \tint bl_status = sharpsl_pm.machinfo->backlight_get_status ? sharpsl_pm.machinfo->backlight_get_status() : 0;\n" - " \tstruct battery_thresh *thresh;\n" - "+\tmillivolt_t voltage = liion_voltage(voltage_adc);\n" - " \n" - "-\tif (sharpsl_pm.charge_mode == CHRG_ON)\n" - "-\t\tthresh = bl_status ? sharpsl_pm.machinfo->bat_levels_acin_bl : sharpsl_pm.machinfo->bat_levels_acin;\n" - "-\telse\n" - "-\t\tthresh = bl_status ? sharpsl_pm.machinfo->bat_levels_noac_bl : sharpsl_pm.machinfo->bat_levels_noac;\n" - "+\tthresh = sharpsl_pm.machinfo->bat_levels_noac;\n" - " \n" - " \twhile (i > 0 && (voltage > thresh[i].voltage))\n" - " \t\ti--;\n" - " \n" - " \treturn thresh[i].percentage;\n" - " }\n" - "+EXPORT_SYMBOL(get_percentage);\n" - " \n" - " static int get_apm_status(int voltage)\n" - " {\n" - "@@ -317,6 +285,8 @@\n" - " \n" - " static void sharpsl_charge_error(void)\n" - " {\n" - "+\tdev_warn(sharpsl_pm.dev, \"Charger Error\\n\");\n" - "+\n" - " \tsharpsl_pm_led(SHARPSL_LED_ERROR);\n" - " \tsharpsl_pm.machinfo->charge(0);\n" - " \tsharpsl_pm.charge_mode = CHRG_ERROR;\n" - "@@ -513,8 +483,10 @@\n" - " \tval = get_select_val(buff);\n" - " \n" - " \tdev_dbg(sharpsl_pm.dev, \"Temperature: %d\\n\", val);\n" - "-\tif (val > sharpsl_pm.machinfo->charge_on_temp) {\n" - "-\t\tprintk(KERN_WARNING \"Not charging: temperature out of limits.\\n\");\n" - "+\t/* FIXME: this should catch battery read errors, but we should\n" - "+\t probably avoid charging in <0C temperatures, too. */\n" - "+\tif ((val < 0) || (val > sharpsl_pm.machinfo->charge_on_temp)) {\n" - "+\t\tdev_warn(sharpsl_pm.dev, \"Not charging: temperature %d out of limits.\\n\", val);\n" - " \t\treturn -1;\n" - " \t}\n" - " \n" - "diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/spitz.c ./arch/arm/mach-pxa/spitz.c\n" - "--- ./arch/arm.ofic/mach-pxa/spitz.c\t2011-03-16 10:07:44.000000000 +0100\n" - "+++ ./arch/arm/mach-pxa/spitz.c\t2011-04-29 15:25:47.000000000 +0200\n" - "@@ -922,6 +922,15 @@\n" - " #endif\n" - " \n" - " /******************************************************************************\n" - "+ * Battery\n" - "+ ******************************************************************************/\n" - "+\n" - "+static struct platform_device spitz_battery_device = {\n" - "+\t.name\t= \"spitz-battery\",\n" - "+\t.id\t= -1,\n" - "+};\n" - "+\n" - "+/******************************************************************************\n" - " * Machine init\n" - " ******************************************************************************/\n" - " static void spitz_poweroff(void)\n" - "@@ -969,6 +978,7 @@\n" - " \tspitz_nor_init();\n" - " \tspitz_nand_init();\n" - " \tspitz_i2c_init();\n" - "+\tplatform_device_register(&spitz_battery_device);\n" - " }\n" - " \n" - " static void __init spitz_fixup(struct machine_desc *desc,\n" - "diff -X /usr/src/linux/.gitignore -ur ./arch/arm.ofic/mach-pxa/spitz_pm.c ./arch/arm/mach-pxa/spitz_pm.c\n" - "--- ./arch/arm.ofic/mach-pxa/spitz_pm.c\t2011-02-02 10:30:39.000000000 +0100\n" - "+++ ./arch/arm/mach-pxa/spitz_pm.c\t2011-04-29 15:15:16.000000000 +0200\n" - "@@ -45,6 +45,93 @@\n" - " \t{ SPITZ_GPIO_CHRG_ON,\t GPIOF_OUT_INIT_LOW, \"Charger On\" },\n" - " };\n" - " \n" - "+static const struct battery_thresh spitz_battery_levels_acin[] = {\n" - "+\t{ 213, 100},\n" - "+\t{ 212, 98},\n" - "+\t{ 211, 95},\n" - "+\t{ 210, 93},\n" - "+\t{ 209, 90},\n" - "+\t{ 208, 88},\n" - "+\t{ 207, 85},\n" - "+\t{ 206, 83},\n" - "+\t{ 205, 80},\n" - "+\t{ 204, 78},\n" - "+\t{ 203, 75},\n" - "+\t{ 202, 73},\n" - "+\t{ 201, 70},\n" - "+\t{ 200, 68},\n" - "+\t{ 199, 65},\n" - "+\t{ 198, 63},\n" - "+\t{ 197, 60},\n" - "+\t{ 196, 58},\n" - "+\t{ 195, 55},\n" - "+\t{ 194, 53},\n" - "+\t{ 193, 50},\n" - "+\t{ 192, 48},\n" - "+\t{ 192, 45},\n" - "+\t{ 191, 43},\n" - "+\t{ 191, 40},\n" - "+\t{ 190, 38},\n" - "+\t{ 190, 35},\n" - "+\t{ 189, 33},\n" - "+\t{ 188, 30},\n" - "+\t{ 187, 28},\n" - "+\t{ 186, 25},\n" - "+\t{ 185, 23},\n" - "+\t{ 184, 20},\n" - "+\t{ 183, 18},\n" - "+\t{ 182, 15},\n" - "+\t{ 181, 13},\n" - "+\t{ 180, 10},\n" - "+\t{ 179, 8},\n" - "+\t{ 178, 5},\n" - "+\t{ 0, 0},\n" - "+};\n" - "+\n" - "+static const struct battery_thresh spitz_battery_levels_noac[] = {\n" - "+\t{ 213, 100},\n" - "+\t{ 212, 98},\n" - "+\t{ 211, 95},\n" - "+\t{ 210, 93},\n" - "+\t{ 209, 90},\n" - "+\t{ 208, 88},\n" - "+\t{ 207, 85},\n" - "+\t{ 206, 83},\n" - "+\t{ 205, 80},\n" - "+\t{ 204, 78},\n" - "+\t{ 203, 75},\n" - "+\t{ 202, 73},\n" - "+\t{ 201, 70},\n" - "+\t{ 200, 68},\n" - "+\t{ 199, 65},\n" - "+\t{ 198, 63},\n" - "+\t{ 197, 60},\n" - "+\t{ 196, 58},\n" - "+\t{ 195, 55},\n" - "+\t{ 194, 53},\n" - "+\t{ 193, 50},\n" - "+\t{ 192, 48},\n" - "+\t{ 191, 45},\n" - "+\t{ 190, 43},\n" - "+\t{ 189, 40},\n" - "+\t{ 188, 38},\n" - "+\t{ 187, 35},\n" - "+\t{ 186, 33},\n" - "+\t{ 185, 30},\n" - "+\t{ 184, 28},\n" - "+\t{ 183, 25},\n" - "+\t{ 182, 23},\n" - "+\t{ 181, 20},\n" - "+\t{ 180, 18},\n" - "+\t{ 179, 15},\n" - "+\t{ 178, 13},\n" - "+\t{ 177, 10},\n" - "+\t{ 176, 8},\n" - "+\t{ 175, 5},\n" - "+\t{ 0, 0},\n" - "+};\n" - "+\n" - "+\n" - " static void spitz_charger_init(void)\n" - " {\n" - " \tgpio_request_array(ARRAY_AND_SIZE(spitz_charger_gpios));\n" - "@@ -192,6 +279,11 @@\n" - " \t}\n" - " }\n" - " \n" - "+int backlight_get_status(void)\n" - "+{\n" - "+\treturn 0;\n" - "+}\n" - "+\n" - " struct sharpsl_charger_machinfo spitz_pm_machinfo = {\n" - " \t.init = spitz_charger_init,\n" - " \t.exit = NULL,\n" - "@@ -210,7 +302,7 @@\n" - " \t.charger_wakeup = spitz_charger_wakeup,\n" - " \t.should_wakeup = spitz_should_wakeup,\n" - " #if defined(CONFIG_LCD_CORGI)\n" - "-\t.backlight_limit = corgi_lcd_limit_intensity,\n" - "+\t.backlight_limit = corgi_lcd_limit_intensity,\n" - " #endif\n" - " \t.charge_on_volt\t = SHARPSL_CHARGE_ON_VOLT,\n" - " \t.charge_on_temp\t = SHARPSL_CHARGE_ON_TEMP,\n" - "@@ -220,7 +312,6 @@\n" - " \t.fatal_noacin_volt= SHARPSL_FATAL_NOACIN_VOLT,\n" - " \t.bat_levels = 40,\n" - " \t.bat_levels_noac = sharpsl_battery_levels_noac,\n" - "-\t.bat_levels_acin = sharpsl_battery_levels_acin,\n" - " \t.status_high_acin = 188,\n" - " \t.status_low_acin = 178,\n" - " \t.status_high_noac = 185," + "(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html\n" + "-------------- next part --------------\n" + "A non-text attachment was scrubbed...\n" + "Name: zbattery.10.diff\n" + "Type: text/x-diff\n" + "Size: 15807 bytes\n" + "Desc: not available\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20150317/debefd99/attachment.bin> -f015c9d74130aada9ca5ec425eaf37498560a1fc4a3fc0c5d640b3060f754974 +b0222f87370244e85cde5b4ff0bd242d94b5268c72c010f592614db3a78e7177
diff --git a/a/content_digest b/N2/content_digest index 2fb9d40..0711bd7 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -5,7 +5,8 @@ "From\0Pavel Machek <pavel@ucw.cz>\0" "Subject\0Re: [PATCH v3 3/6] Documentation: DT: Document twl4030-madc-battery bindings\0" "Date\0Tue, 17 Mar 2015 09:47:30 +0100\0" - "To\0Belisko Marek <marek.belisko@gmail.com>\0" + "To\0Belisko Marek <marek.belisko@gmail.com>" + " mark.rutland@arm.com\0" "Cc\0Sebastian Reichel <sre@kernel.org>" Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> David Woodhouse <dwmw2@infradead.org> @@ -671,4 +672,4 @@ " \t.status_low_acin = 178,\n" " \t.status_high_noac = 185," -f015c9d74130aada9ca5ec425eaf37498560a1fc4a3fc0c5d640b3060f754974 +a9d95c3cd0b4aa52a827655a477c6935f87203c370f6f838148d24e3a3a7fd70
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.