Received: by 2002:ac0:8845:0:0:0:0:0 with SMTP id g63csp754403img; Tue, 26 Feb 2019 08:05:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ4+7H42nzR4HDdM+jRa+3Nh/chnAR0HOvWLe8aKRYSEMlD9DPAiKVF71dzTRPv80N9xP/v X-Received: by 2002:a65:6651:: with SMTP id z17mr23792525pgv.95.1551197147243; Tue, 26 Feb 2019 08:05:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551197147; cv=none; d=google.com; s=arc-20160816; b=pvCCZQnJsTJGdaPaxTMofun0PduhC+qdnBD+86Dp4EtDzyJ0B1vUXTo3OFFSHKdOFs L/FZwZJn8GeDh2zPjQSufbLXDlatHeS9j5W4bF9EIHqgKq/xJ2Lo5qP3FqsNDSYgI/QZ 1wXtuVUJ+BjJig9gCcToYUZQE9FMYHki9xlwqbxPeB/meCoXb8kcfMCNwwcZZt82dWI+ R5t/xv+ql/1l7IaT66RNBR/E/Tyh35GvS8ig1pAoNwlsejlji71Ge7jpgwQRGlYKlgqQ 5jyvSw03dt2YbICqe/YX37mCIj/4lWytHuoQizFX7CxDRLXT6DsnkNk+WVTywk385a/7 aQiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=c5zHsaI3XiPwXpZVEWtyJ9od4TDwMvh1jABeSaD5X5g=; b=tiOBcL3bVr0HU8FZznf7Cx6HbeXCAGBXo5tw8IUwf/4TLur8srPNUe4oKzibnn3Ao2 6gaOqjzzBBFSYHoEJV23R8v7iOzXmtLth+79wm8FCHaZO1G1hHvTC6q+i7w4HxylCgwl pPM3nieYT1IxkuijMQmRxcOGxTgMm4R21pL3tb1os9qHgD9LXuj4xYBkEvVLfMTijV1G UdMYlCYo/0NjeB1T/5CKn9MuWiCDebrZ1tRlw0gaJ4xkYh9Gz3Zds1+d8MccqIfqKhkC G2VD6CI9J5ZlxzWiy+UiuDwm2CtJyiDTlKQsRmfD24LJAEgANSysmHV7oOwJoJLYtfza kVGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I+bUhDYi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si100161pgs.572.2019.02.26.08.05.31; Tue, 26 Feb 2019 08:05:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=I+bUhDYi; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727216AbfBZQFD (ORCPT + 99 others); Tue, 26 Feb 2019 11:05:03 -0500 Received: from mail-ed1-f65.google.com ([209.85.208.65]:39279 "EHLO mail-ed1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726507AbfBZQFC (ORCPT ); Tue, 26 Feb 2019 11:05:02 -0500 Received: by mail-ed1-f65.google.com with SMTP id p27so11186247edc.6 for ; Tue, 26 Feb 2019 08:05:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=c5zHsaI3XiPwXpZVEWtyJ9od4TDwMvh1jABeSaD5X5g=; b=I+bUhDYiFQgfoXJTB1+2tH6vA8aDk4UzCu476z5rN43iLSFMw3DmIJ4Q4rI1vBIUSr Nmjhy7o2xMcJYlJ5KChvkJjXsj8nddcQK7VKaK2Mdl+sUx29TnEkKFdlpzc7bsjo1N1B yymvGqFGZmRlVtJhD34R6GQIICBzV41hejeQtgq677jbKbbh4EvrBIUvdwbC42UE8FpC 7Y5rRU3bui1hIZ3YkfRwUiprGO4/rv65F9CwwkjfTzRXIrtJ0BiVOV/j2tfq868BO6JX afIgm/xSCRrtI4GSrKa2DcLUJn70f9qZBbaDP4D5ynUawzNnfglZAr1iwLa6d77H1bVG b0FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=c5zHsaI3XiPwXpZVEWtyJ9od4TDwMvh1jABeSaD5X5g=; b=cbd7WPW43vt3fnnOlfIPi8rt+DVlFaV03Qeaw4DOv3PVvU55jqOzmO1fpVDsaCjWbW evfQS9ePY+NyAEM4Tr+QffHwkdCLVeXIyqqCaqCv1s7UDaBgt9exAbqvk1MRyPRPT5ZM oNArCjzhXQiGaPz6T7GO6S9tbdJRV5ub5sC3UJjL/cXu1pIhwXYRoAFhztSh0ZKBuwUm w2yBLfW40vg8DMBJcW9o5+8Pv6V3g9y0FiAkS5QYmixrvkBgVE9ghpznJJGEYILQTBG7 B4sgm61aSymO/y94bwA2a8KNdccyswKYCyfWGxA0SbVrlEYo//zSzPjARqy7/2udxjzw vjsQ== X-Gm-Message-State: AHQUAuaSP7qihd05sed8PaTxO1IlfY29Wv8kGbEXQU6pAA8Iu6LlRWOL 16/WLO6wu6nk+gQwnNqT/JQroPTYchzYOR2qE9HejQ== X-Received: by 2002:a50:be42:: with SMTP id b2mr6653277edi.78.1551197101238; Tue, 26 Feb 2019 08:05:01 -0800 (PST) MIME-Version: 1.0 References: <333cc78c-7537-7898-d753-17352df893aa@gmail.com> In-Reply-To: <333cc78c-7537-7898-d753-17352df893aa@gmail.com> From: Jouke Witteveen Date: Tue, 26 Feb 2019 17:04:50 +0100 Message-ID: Subject: Re: thinkpad_acpi: Battery quirk for Thinkpad 11e (4th gen) To: Ken Milmore Cc: linux-kernel@vger.kernel.org, Henrique de Moraes Holschuh Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 24, 2019 at 3:58 PM Ken Milmore wrote: > Setting charge thresholds seems to basically work, but one thing worth > mentioning is that charge_start_threshold and charge_stop_threshold > appear to be tied together; AFAICT setting one also sets the other to > the same value. The battery does seem to start charging whenever it > falls below the common threshold, I have it set at 80% and it has kept > the battery floating around 79%. I observe the same behavior on my Thinkpad 13. Maybe there is a bug in the driver, but it could also be a bug in the firmware. > diff -uprN linux-source-4.19~/drivers/platform/x86/thinkpad_acpi.c linux-source-4.19/drivers/platform/x86/thinkpad_acpi.c > --- linux-source-4.19~/drivers/platform/x86/thinkpad_acpi.c 2019-02-24 13:27:29.341331227 +0000 > +++ linux-source-4.19/drivers/platform/x86/thinkpad_acpi.c 2019-02-24 13:09:28.710982438 +0000 > @@ -9619,6 +9619,7 @@ static const struct tpacpi_quirk battery > 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 */ Personally, I would add the line below the 11e gen 3. > }; > > static int __init tpacpi_battery_init(struct ibm_init_struct *ibm)