From: Rafael J. Wysocki Date: Mon, 10 Jan 2022 16:22:15 +0000 (+0100) Subject: Merge branches 'acpi-tables', 'acpi-numa', 'acpi-sysfs', 'acpi-cppc', 'acpi-thermal... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=70df8e1bdc941431af2370270f5140291dcbb282;p=linux.git Merge branches 'acpi-tables', 'acpi-numa', 'acpi-sysfs', 'acpi-cppc', 'acpi-thermal' and 'acpi-battery' Merge ACPI tables parsing code update, NUMA-related ACPI update, CPPC documentation update, ACPI sysfs attributes handling update and ACPI thermal and battery drivers updates for 5.17-rc1: - Add AEST to the list of known ACPI table signatures (Shuuichirou Ishii). - Make ACPI NUMA code take hotpluggable memblocks into account when CONFIG_MEMORY_HOTPLUG is not set (Vitaly Kuznetsov). - Use default_groups in kobj_type in the ACPI sysfs code (Greg Kroah-Hartman). - Rearrange _CPC structure documentation (Andy Shevchenko). - Drop an always true check from the ACPI thermal driver (Adam Borowski). - Add new "not charging" quirk for Lenovo ThinkPads to the ACPI battery driver (Thomas Weißschuh). * acpi-tables: ACPI: tables: Add AEST to the list of known table signatures * acpi-numa: ACPI: NUMA: Process hotpluggable memblocks when !CONFIG_MEMORY_HOTPLUG * acpi-sysfs: ACPI: sysfs: use default_groups in kobj_type * acpi-cppc: ACPI: CPPC: Amend documentation in the comments * acpi-thermal: ACPI: thermal: drop an always true check * acpi-battery: ACPI: battery: Add the ThinkPad "Not Charging" quirk --- 70df8e1bdc941431af2370270f5140291dcbb282 diff --cc drivers/acpi/battery.c index bf4b7f0b627aa,8afa85d6eb6a7,8afa85d6eb6a7,8afa85d6eb6a7,8afa85d6eb6a7,8afa85d6eb6a7,ead0114f27c9f..ea31ae01458b4 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@@@@@@@ -52,6 -52,7 -52,7 -52,7 -52,7 -52,7 -52,8 +52,7 @@@@@@@@ static bool battery_driver_registered 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"); @@@@@@@@ -1098,6 -1104,13 -1104,13 -1104,13 -1104,13 -1104,13 -1107,19 +1101,12 @@@@@@@@ battery_ac_is_broken_quirk(const struc 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 */ @@@@@@@@ -1126,6 -1139,22 -1139,22 -1139,22 -1139,22 -1139,22 -1148,35 +1135,19 @@@@@@@@ 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"), + }, + }, {}, };