https://bugzilla.kernel.org/show_bug.cgi?id=25232





--- Comment #26 from Lan Tianyu <tianyu....@intel.com>  2013-05-09 13:08:35 ---
Sorry for late reply. From the output,
The first log show AML BIF/BIX return error charge_full and charge_full_design
/sys/class/power_supply/BAT0/charge_full:20499000 <==
/sys/class/power_supply/BAT0/charge_full_design:276000 <==
/sys/class/power_supply/BAT0/charge_now:4369000

Please try following patch
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index e710045..087c683 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -35,6 +35,7 @@
 #include <linux/slab.h>
 #include <linux/suspend.h>
 #include <asm/unaligned.h>
+#include <linux/delay.h>

 #ifdef CONFIG_ACPI_PROCFS_POWER
 #include <linux/proc_fs.h>
@@ -429,9 +430,13 @@ static int acpi_battery_get_info(struct acpi_battery
*battery)
                        "_BIX" : "_BIF";

        struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
+       int i = 3;

        if (!acpi_battery_present(battery))
                return 0;
+
+       while (i-- > 0) {
+       msleep(3000);
        mutex_lock(&battery->lock);
        status = acpi_evaluate_object(battery->device->handle, name,
                                                NULL, &buffer);
@@ -441,6 +446,7 @@ static int acpi_battery_get_info(struct acpi_battery
*battery)
                ACPI_EXCEPTION((AE_INFO, status, "Evaluating %s", name));
                return -ENODEV;
        }
+       }
        if (test_bit(ACPI_BATTERY_XINFO_PRESENT, &battery->flags))
                result = extract_package(battery, buffer.pointer,
                                extended_info_offsets,

-- 
Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may
_______________________________________________
acpi-bugzilla mailing list
acpi-bugzilla@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla

Reply via email to