static int battery_bix_broken_package;
static int battery_notification_delay_ms;
static int battery_ac_is_broken;
------static int battery_check_pmic = 1;
++++++ static int battery_quirk_notcharging;
static unsigned int cache_time = 1000;
module_param(cache_time, uint, 0644);
MODULE_PARM_DESC(cache_time, "cache time in milliseconds");
return 0;
}
------static int __init
------battery_do_not_check_pmic_quirk(const struct dmi_system_id *d)
-{
- battery_check_pmic = 0;
- return 0;
-}
-
++++++ static int __init battery_quirk_not_charging(const struct dmi_system_id *d)
+ {
----- battery_check_pmic = 0;
++++++ battery_quirk_notcharging = 1;
+ return 0;
+ }
+
static const struct dmi_system_id bat_dmi_table[] __initconst = {
{
/* NEC LZ750/LS */
DMI_MATCH(DMI_BIOS_DATE, "08/22/2014"),
},
},
- {
- /* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */
- .callback = battery_do_not_check_pmic_quirk,
- .matches = {
- DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
- },
- },
- {
- /* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */
- .callback = battery_do_not_check_pmic_quirk,
- .matches = {
- DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
- DMI_MATCH(DMI_PRODUCT_NAME, "80XF"),
- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
- },
- },
+ {
----- /* ECS EF20EA, AXP288 PMIC but uses separate fuel-gauge */
----- .callback = battery_do_not_check_pmic_quirk,
----- .matches = {
----- DMI_MATCH(DMI_PRODUCT_NAME, "EF20EA"),
----- },
----- },
----- {
----- /* Lenovo Ideapad Miix 320, AXP288 PMIC, separate fuel-gauge */
----- .callback = battery_do_not_check_pmic_quirk,
++++++ /*
++++++ * On Lenovo ThinkPads the BIOS specification defines
++++++ * a state when the bits for charging and discharging
++++++ * are both set to 0. That state is "Not Charging".
++++++ */
++++++ .callback = battery_quirk_not_charging,
++++++ .ident = "Lenovo ThinkPad",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
----- DMI_MATCH(DMI_PRODUCT_NAME, "80XF"),
----- DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo MIIX 320-10ICR"),
++++++ DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad"),
+ },
+ },
{},
};