Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp490871pxu; Thu, 3 Dec 2020 05:39:29 -0800 (PST) X-Google-Smtp-Source: ABdhPJxOCkP8fce7VxFhemyOqtU9m9uCb15li27hD15r2ewvmfICwBrTv2697zf2ptC7SuwNRdu6 X-Received: by 2002:a17:907:700c:: with SMTP id wr12mr2504285ejb.398.1607002769716; Thu, 03 Dec 2020 05:39:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607002769; cv=none; d=google.com; s=arc-20160816; b=SI+BOkmWD2rbbdu0TEEVK7Q3q/oZhPefMH6i5FsYO+tqF/HMqT+L9GZP6KU6KkqbT+ K7ez4uWZgc2BwgvEwyCYIuFIXjwY+wp12LA0kAgpoqRZOE/FUyO/M/toOyu6pYLEQTIF BRrFSsiUPjjoKXvQ4dBaPw3gwwWF7n2mWNte8Hmu/aKwU2zFvVSxtUwIFDutoFofXV4Q sP12lr4kwC+QVCoj+7p1awDrdT4R7JCOfTYRf1P5GQAWX6joWDY9sP5N8+Pnn7ivj6IW oQG9BRop/DxKayvzLpwuZjTJuly0cHNZSWE6/6BlsYt0JyuK+GC2dNSp1CWCyGjh1P5z qPEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=vrg089NbS2pxEeL3ubBhcVwatc5/XznQLhbuuaffbkI=; b=KCeO+sDMoflyMvqN4SJJPyH5IqYMVvvkctPCSml1L+4EwpefhVIrnb5Q3UHn2h4QNJ VexJHUPmtkNeyd1hn2mu0ffG4WlHnhgVJ1eHobZFwwovzGL6b1tYfS+icJ8aWVooly8e Uy5A/b5Yskieoe83s/x/GtlaO40oIjl9qks2sQZ7mZg6f8CYssIYM+4ACxFofX1iJQIP pwkR3c8KYoyrtDlul15VhIKdwEoDvUXC0JvRApfrw+um6xwz6aKRgT2tctsj9pyfLzJ8 WrmGSpnMbI4bCFMHW4YsiMja3IFHfjO2QdLM1hzByeF0JU380AAT12VGuIgbcclbEUvc tb/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dr4si1060132ejc.56.2020.12.03.05.39.00; Thu, 03 Dec 2020 05:39:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2436611AbgLCNa3 (ORCPT + 99 others); Thu, 3 Dec 2020 08:30:29 -0500 Received: from mail.kernel.org ([198.145.29.99]:47918 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2436463AbgLCNaX (ORCPT ); Thu, 3 Dec 2020 08:30:23 -0500 From: Sasha Levin Authentication-Results: mail.kernel.org; dkim=permerror (bad message/signature format) To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hans de Goede , Sasha Levin , ibm-acpi-devel@lists.sourceforge.net, platform-driver-x86@vger.kernel.org Subject: [PATCH AUTOSEL 5.9 32/39] platform/x86: thinkpad_acpi: Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen Date: Thu, 3 Dec 2020 08:28:26 -0500 Message-Id: <20201203132834.930999-32-sashal@kernel.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20201203132834.930999-1-sashal@kernel.org> References: <20201203132834.930999-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit c986a7024916c92a775fc8d853fba3cae1d5fde4 ] The Thinkpad Yoga 11e 4th gen with the N3450 / Celeron CPU only has one battery which is named BAT1 instead of the expected BAT0, add a quirk for this. This fixes not being able to set the charging tresholds on this model; and this alsoe fixes the following errors in dmesg: ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as error thinkpad_acpi: Error probing battery 2 battery: extension failed to load: ThinkPad Battery Extension battery: extension unregistered: ThinkPad Battery Extension Note that the added quirk is for the "R0K" BIOS versions which are used on the Thinkpad Yoga 11e 4th gen's with a Celeron CPU, there is a separate "R0L" BIOS for the i3/i5 based versions. This may also need the same quirk, but if that really is necessary is unknown. Signed-off-by: Hans de Goede Link: https://lore.kernel.org/r/20201109103550.16265-1-hdegoede@redhat.com Signed-off-by: Sasha Levin --- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index cd7e782791c71..c7e9c0d29ed93 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -9704,6 +9704,7 @@ static const struct tpacpi_quirk battery_quirk_table[] __initconst = { TPACPI_Q_LNV3('R', '0', 'B', true), /* Thinkpad 11e gen 3 */ TPACPI_Q_LNV3('R', '0', 'C', true), /* Thinkpad 13 */ TPACPI_Q_LNV3('R', '0', 'J', true), /* Thinkpad 13 gen 2 */ + TPACPI_Q_LNV3('R', '0', 'K', true), /* Thinkpad 11e gen 4 celeron BIOS */ }; static int __init tpacpi_battery_init(struct ibm_init_struct *ibm) -- 2.27.0