Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1583193rwb; Wed, 16 Nov 2022 21:32:22 -0800 (PST) X-Google-Smtp-Source: AA0mqf7vfu+mUIy3YLF7OqEzLQJ6jLRj4xNKVZGEn24/gfmtT7avn+3rxtIyirsTA0+UJi4EF7dY X-Received: by 2002:a05:6402:3644:b0:45f:c7f2:297d with SMTP id em4-20020a056402364400b0045fc7f2297dmr794562edb.266.1668663142670; Wed, 16 Nov 2022 21:32:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668663142; cv=none; d=google.com; s=arc-20160816; b=Lid8qFF2oVqswin2p76K4GCIoxDfbEZ0JJvBIT4JL0Ia6Y5CnlX1tK6alTt2ruGEc3 U8eWRwLUr7VXufMhQzab6LUbYzA8AvR56uZr2M8hf99hM4u7xD3qANcHVkfs8W4UqkYF 1/LBGa938WFiayXiJcs4MqUHxtnX1y7DDVLYEkTQ07HlT5pptSllJvesL/LrMIQPv4rz J5eK/NBb4OLFTO2v9Mxcdqj0pRO6KiXnXIxj24+/FPW1ERXaKWFbACwnFBfU84af0uPD GKqTZrKUSMQRMvBS7tGCQ4FrsznDF05nzaHpileYh+Bls/nmNeoZRvI1PwbaDWIoL01r 1vjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=myNreSzq2tXl00tVK0KpKRoMwWz5bnSHnKMHwe8+GaA=; b=v6x6ruedm4Jccnjru7aF63e951YlUXzq5eiRunJRPofJR/R5p2RD/EWy8qaColY2Wo C1sLS3QN+fvTaNpJR0V9hKR7XRRdXHnobTMw0uvrXQTA/pEcdxAAhsxgvzpGnpz6s+ot p7VyVqlIyi7bl+h8VbYbd0D6Fq7DGNf77e8tqeapzAt3gvS6og71PFR7aR0jqZYQ+rA8 yD5Up/i+obzVHNXPFlPkXFngXJRgysXC5kAr4IfBPtv/3dmEgFiF/Gd14yD7uZWJhfax JcGkPTcEYgXFQtq6JyvWA2NgRzCg9bFDlpTg66OKX3CD9j3whxuWbbw/TzRPrwBdGzyL 2ZcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d11-20020a056402400b00b004637f0abb77si92359eda.487.2022.11.16.21.32.01; Wed, 16 Nov 2022 21:32:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233199AbiKQExO (ORCPT + 91 others); Wed, 16 Nov 2022 23:53:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232809AbiKQExK (ORCPT ); Wed, 16 Nov 2022 23:53:10 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5811E27FF7; Wed, 16 Nov 2022 20:53:09 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id 40EEB80A6; Thu, 17 Nov 2022 04:43:05 +0000 (UTC) Date: Thu, 17 Nov 2022 06:53:07 +0200 From: Tony Lindgren To: Ivaylo Dimitrov Cc: Sebastian Reichel , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, philipp@uvos.xyz, Pavel Machek Subject: Re: [PATCH 2/3] power: supply: cpcap-battery: Fix battery identification Message-ID: References: <1667647544-12945-1-git-send-email-ivo.g.dimitrov.75@gmail.com> <1667647544-12945-3-git-send-email-ivo.g.dimitrov.75@gmail.com> <20221110160559.bsvzr4txum5ed2qz@mercury.elektranox.org> <715a60b5-2f3c-caf7-2b24-61ec92bda9be@gmail.com> <90314373-de30-019a-dc0c-f5cab57a48c6@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <90314373-de30-019a-dc0c-f5cab57a48c6@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Ivaylo Dimitrov [221115 15:31]: > Hi, > > On 15.11.22 г. 15:49 ч., Tony Lindgren wrote: > > Hi, > > > > * Ivaylo Dimitrov [221110 16:40]: > > > On 10.11.22 г. 18:05 ч., Sebastian Reichel wrote: > > > > Why do we care? > > > > > > > Because if we know the battery is genuine (or at least pretends to be :) ), > > > then we can read battery parameters from nvram, see patch 3/3. This will > > > allow us to charge HV LiPo batteries to 4.35V, using the full capacity. > > > > Let's not enable charge voltages above 4.2V automatically at all unless > > the user chooses to set a higher charge voltage via sysfs manually. > > > > We have had reports of bloated batteries if left connected to the charger > > at higher voltage than 4.2V. This seems to happen after connected for some > > weeks or months. AFAIK this happens both with Android and mainline kernel > > at higher voltages. > > > > Not that I sent such patch yet, but still, thinking about it, we should be > able to easily prevent such damage by not restarting the charging after > battery is full and voltage has dropped by 50mV or so. There can be a > threshold (lets say 4.25 or 4.2) above which charging shall not be > re-enabled unless the user reconnects the charger. Even if default stays 4.2 > and it is the user that has enabled 4.35. Just an idea. Sure the logic to handle max charge voltage and maintenance charge voltage could be there. With commit d4ee021c410f we now just wait for the charge to come down to 4.2V if charged at 4.35V with Android. We still should not enable higher charge voltages by default though. It still needs to be enabled by the user via sysfs. It's possible that also shorter peaks of higher charge voltage accelerate the battery degration. It just may happen slower than what we've seen earlier. To test this, multiple devices would need to be left connected to a charger for several months :) Regards, Tony