Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6964703rwb; Tue, 15 Nov 2022 06:05:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5uQdbua3gGt9M8tVwDrXV8GS/hyiE5CbL5i0hNU2Dq//GMYaz9gdanOz6XJN4UwPhWeCg8 X-Received: by 2002:a17:90a:5d95:b0:214:1440:8d8b with SMTP id t21-20020a17090a5d9500b0021414408d8bmr792211pji.4.1668521152104; Tue, 15 Nov 2022 06:05:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668521152; cv=none; d=google.com; s=arc-20160816; b=ocA5Z+qIT8eQ3eknQWlwR4aEIXHTd9Vp3XDjBJT9H9CqIosbPRptQcL34hE6FV+T3Q YUKrqVeoUnNcQaXUs+uYWhE2lXJtSNLECTRmSTwgrWRr22GLqPFY+fJZcb1m0h3noSPH EGxVFS3HB5wYV2fblb+Oa8s4XIW0eDEUAHXlWFP2A6wAwBG71S8N2ZkZ7seCSVR/OvFS t9e4nullCnFsuskf9Y2YDjJGdOTMVNrNFDCDZaPbFHosRT6cuC8n1DQxpJYeZP6Rq1+l MVDzIAhJRtja4ksZkYPlESZzmggqmnlj8zRAUMB2LEYvYfK9IBs9dLLKQteUpkIdBPfG SPNQ== 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=lmVwZnJ18VdVH4MKYNqQbBuSZqWIjZYoEKxAvLbO5eA=; b=JIeixY+dd8u+ewSjKsH/dp9Dg1lnvjaRgm7PI/hVQdmggmX4QCUlUAvOyRDMXB01TS VQXNVkwkoN7rWqgUf7FviLUzRZpmfGsNfLEBnZVPp9AhHPWLYx3aCFHctkZkgrGL81/W ROe2d2wVvAYl3P35ctEeO61BhdBk2XeepuswHl+YwE0DHx+iFgkHfdXb9PyFPFIMG9MA yjLsDqL0/jpOlyzkUt5wmInnwLY87NrKxqdXvbB84Oas2+2dDTvEa/hHVg1z6A0l9RQu Dq58JpA4hS5UEENPN5tPeb4FwiUoZC47tPLF6pO9EMA4oWnY6A5VsIyNZFrGhkmPqZkk Vvjw== 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 e27-20020a63545b000000b0046feb2838easi12461736pgm.140.2022.11.15.06.05.18; Tue, 15 Nov 2022 06:05:52 -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 S230010AbiKONu7 (ORCPT + 89 others); Tue, 15 Nov 2022 08:50:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238558AbiKONu2 (ORCPT ); Tue, 15 Nov 2022 08:50:28 -0500 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E200D24962; Tue, 15 Nov 2022 05:49:52 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id E83D780E0; Tue, 15 Nov 2022 13:39:51 +0000 (UTC) Date: Tue, 15 Nov 2022 15:49:50 +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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <715a60b5-2f3c-caf7-2b24-61ec92bda9be@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 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. For more information, please see commit d4ee021c410f ("power: supply: cpcap-charger: Limit voltage to 4.2V for battery"). No objections for using the NVRAM to detect the battery max voltages though. That is as long as the default charge voltage does not go above 4.2V. Regards, Tony