Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2531512imm; Thu, 7 Jun 2018 12:13:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIkQBTP4R4QNQBO15WgQv0M7SzJyYdXMfq7kLpDjWEHZMNgMbrzcOrtMzXAqB0xJeXtPG26 X-Received: by 2002:a17:902:9689:: with SMTP id n9-v6mr3170482plp.363.1528398814261; Thu, 07 Jun 2018 12:13:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528398814; cv=none; d=google.com; s=arc-20160816; b=F/yh22J3WNXEr2fbOGJ03pQ7qSN46Xg4l6k749KOZO1kzz/CEorZV45RTLLrLlRdCm iAZJep5Edy8VchNdBm9eBKArijwmhEDVTm7dIntUfP5WqGOO//Zjk6ktv4WQ9R5duuYD anOJ45194GcLqz1hPYXzKXYnyc0Yqm44l5uHxGfihX5Md7tXxx6NAcjLAt2o7G5N8u2K r7t+GJl/s2sAOMJLaiZkKPYIwPthrmnEnKQtozNjpxjlwyeiZPdn0/uTyFKgVK7t9OUM TPHV5d70NaWY05l1OWXH6LuqKCKNYcuL0OWwSaoI+HvO/adZMEIEvvJ71zjt4SigVdNR JQCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=f9tfPDJjCv7K3n/IusVls/rLtRDeNRVrzGe4qPnglfQ=; b=f2dOM2fDIJMQMsRc68N7CWGRbG7DzsHOEPpYof2Dm3nACe1iLMh1MNgOj9MVI4sFvG eq4RmYfKrhAsBYECJ36g2KZ6SEMJqBG6jQhb/Ir+ETPISHfHGKBi4zhliBME8wMMN13m JsNmRNGLNCglW4h1OsPmog0T9Z8x8fiOtW9+v+m5rqz3rntKtFDRY0030BLqhguyRnB2 Mc2ah7dtwu3TYxx7loVutDBr4ubKgE8d4r9HPSZtw54oUb2oqDTZ+1NEyFo7P0mfczza LsP6sCdd1IPG9JqbeRQtZRIKApXefnDnFG+AonA/msgO0/1T8/y2HyvUr0bUuZmb4P8B 5VyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=vL/r6onz; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u59-v6si54444708plb.253.2018.06.07.12.13.20; Thu, 07 Jun 2018 12:13:34 -0700 (PDT) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=vL/r6onz; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753708AbeFGTIa (ORCPT + 99 others); Thu, 7 Jun 2018 15:08:30 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57454 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753553AbeFGTI0 (ORCPT ); Thu, 7 Jun 2018 15:08:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=f9tfPDJjCv7K3n/IusVls/rLtRDeNRVrzGe4qPnglfQ=; b=vL/r6onzflk3tB9qxypt0d7r6n 2caveauToU8kq5dQqgll05l7R3h5Ed+rXt6MoUXjLNvEGlxlFBChJ/nH4z3gt314/+XeqAu+FWHPW gCjb07sUpZVB08ULR2Itw0U9gzshMqpEMK1jN5aCYTALwubH2elWhfA5KV3Fzocik7HSrDKJ40EN5 sFsmxVIbhoPUHtyR+xkJd5pOG1VRa9eS2nMBjTkiIznE8FlxdUx3xgQYcQcLUcy96H6w0WFSpyTFy 5yGk+WMEBT3wR6bHpQVHy43lqXKsYlwZBut/UoIvLHI1Ryd1HfCSc1367tacQ/jQ/wF7lRf9y3Vym swFNy+GQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fR0Gl-0002Un-7s; Thu, 07 Jun 2018 19:08:24 +0000 Subject: Re: [PATCH v5 2/4] power: supply: Add support for the Qualcomm Battery Monitoring System To: Craig Tatlor Cc: linux-arm-msm@vger.kernel.org, Sebastian Reichel , Rob Herring , Mark Rutland , Mauro Carvalho Chehab , "David S. Miller" , Greg Kroah-Hartman , Andrew Morton , Linus Walleij , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180407135934.26122-1-ctatlor97@gmail.com> <20180607181306.9766-1-ctatlor97@gmail.com> <20180607181306.9766-2-ctatlor97@gmail.com> From: Randy Dunlap Message-ID: Date: Thu, 7 Jun 2018 12:08:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180607181306.9766-2-ctatlor97@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/07/2018 11:12 AM, Craig Tatlor wrote: > This patch adds a driver for the BMS (Battery Monitoring System) > block of the PM8941 PMIC, it uses a lookup table defined in the > device tree to generate a capacity from the BMS supplied OCV, it > then ammends the coulomb counter to that to increase the accuracy amends > of the estimated capacity. > > Signed-off-by: Craig Tatlor > --- > diff --git a/drivers/power/supply/Kconfig b/drivers/power/supply/Kconfig > index 428b426842f4..6c354c37bc55 100644 > --- a/drivers/power/supply/Kconfig > +++ b/drivers/power/supply/Kconfig > @@ -82,6 +82,15 @@ config BATTERY_ACT8945A > Say Y here to enable support for power supply provided by > Active-semi ActivePath ACT8945A charger. > > +config BATTERY_BMS > + tristate "Qualcomm Battery Monitoring System driver" > + depends on MFD_SPMI_PMIC || COMPILE_TEST > + depends on OF > + depends on REGMAP_SPMI select REGMAP_SPMI I'm not a fan of "select", but it does not have a prompt string so it isn't user settable (not directly; it can be set indirectly). And all other uses of it in Kconfig files use "select". > + help > + Say Y to include support for the Battery Monitoring hardware > + found in some Qualcomm PM series PMICs. > + > config BATTERY_CPCAP > tristate "Motorola CPCAP PMIC battery driver" > depends on MFD_CPCAP && IIO -- ~Randy