Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4216381rdb; Thu, 14 Sep 2023 15:57:19 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFCVH0g1861tXRaB3aWtpKIb11Y6dmbagkJDTMfQSLFXvGuBhSTRVahk79QSMX+sdwLPUoj X-Received: by 2002:a17:90a:520c:b0:271:8d4d:d046 with SMTP id v12-20020a17090a520c00b002718d4dd046mr6484741pjh.4.1694732239166; Thu, 14 Sep 2023 15:57:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694732239; cv=none; d=google.com; s=arc-20160816; b=f0iWymABJvbqwvAkEGlzolm0/STK554907dilrpnTHnTJ1JHJ13O5uS1dSnd+R8MpF /I4hqlX2omgr2CIXmcqt8PSNTXcKqPzyJb/OwsxMGpaa57IdN2qdRiMTqntG3yg2IaFJ BgSK2y3vUqbRppBVQKaH/7dl0Lnjiyg9OK46NcNb/zHNbKamPfdO/vKyGD3Z8dRwRu+v l2w+fohH4Exq0oZNZfijWobrv3ePaqRRe6NsYvtbGNWtUsTjjI6zZjgyxoM7BhfzQ7cH cnAgmjtK0uozreTQtACDMPKqrPKj036PgZdW/Yowbmmcf4AbYDo8jllJKG+PjVdgo58a KFQw== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ORP+pLbNSAYuyswrt16PTga7/XaMEd/3ma0tpOVgecg=; fh=HBp5SeV7NIHwMCHESvsZlwH2amlVkMGb6Au6Ehek9rM=; b=MdjB0O8SojxdQ/IxRWHkvCsczYiAAk1oEgZwY4KtEr7b7df1f4xxYb1EJO8NuAqIbY FPyfjYTGJu9JSD/9w8tCFUVUEYsbOy7d+qmhho6EPtHcUiSHtE4Jh/6ZBKtsPinYJBiY N1h3o3AFnkxMCboZVhac2z1wkJP4b5wtCDxitmtUgERHxhhpoDWjb1P6ZD1EynsQLUZ3 O6oK/4/qOTAVxrHmlcgYnnxAzBxznNCpbLgwbFnZ4IwjsAFJylZrmnoQKL/4oRUIY4/3 myIhNaMScRjAzDH3br5PJlp9awL6fmEsnhK9YlPSWoMd9/+ey4qPmLX2H/fKEs2gDfvC F9CA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=lNlMcofM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id pg9-20020a17090b1e0900b0026f3e1e9639si4803410pjb.40.2023.09.14.15.56.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 15:57:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=lNlMcofM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0B3E2829F98F; Thu, 14 Sep 2023 12:17:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241818AbjINTR2 (ORCPT + 99 others); Thu, 14 Sep 2023 15:17:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240636AbjINTR0 (ORCPT ); Thu, 14 Sep 2023 15:17:26 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 35E931FFA; Thu, 14 Sep 2023 12:17:22 -0700 (PDT) Received: from mercury (unknown [185.209.196.239]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sre) by madras.collabora.co.uk (Postfix) with ESMTPSA id 199C0660734C; Thu, 14 Sep 2023 20:17:20 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1694719040; bh=+8h83Wl1ZJ9FOA73iw7dxoMzoNJHRKLssqoGddVcv6M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lNlMcofM1bz7EHdxr2v5+5T3W+PNpjVfPilbWQjzJ0AcIYWvb3nkl9qHPzNruXA9y a2qifrWI2xN/M+2q2yI1nOIVLIJyMGXhbg3agzxik9IXZ2u1JINzQ5cMIpLZ8f+OCp mMDTO+4UvlnXDuUpezi0BoS/dzhkKl5VjDqn/4O3YDvlQTH8OPoz4NYfEcaBrhu0PC bipQLjIbIPxz2aOPhCow+cno6JqoXq9Uw0nIdVfV2reNcJZFS+LSV8+i+gxbSYANgn MEEJuqnpq3HJNgGZKE1SDIO2UYTZSyaO4s1oNblGZqH1hsoqKinRtojZGEE3qjI6Tg 4HYMQe64FLO6w== Received: by mercury (Postfix, from userid 1000) id 4BD3E106098B; Thu, 14 Sep 2023 21:17:17 +0200 (CEST) Date: Thu, 14 Sep 2023 21:17:17 +0200 From: Sebastian Reichel To: Konrad Dybcio Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Konrad Dybcio , Marijn Suijten , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH RESEND v2 3/3] power: supply: Introduce MM8013 fuel gauge driver Message-ID: <20230914191717.u7jcxkfgrvpcb6hp@mercury.elektranox.org> References: <20230621-topic-mm8013-v2-0-9f1b41f4bc06@linaro.org> <20230621-topic-mm8013-v2-3-9f1b41f4bc06@linaro.org> <20230913154552.okinfq6gdxf2d7ab@mercury.elektranox.org> <36287e2f-ddff-4323-bbc2-e7a07a9283e7@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nqk2z42bayjsqcyl" Content-Disposition: inline In-Reply-To: <36287e2f-ddff-4323-bbc2-e7a07a9283e7@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Sep 2023 12:17:46 -0700 (PDT) X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email --nqk2z42bayjsqcyl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Thu, Sep 14, 2023 at 08:46:21PM +0200, Konrad Dybcio wrote: > On 13.09.2023 17:45, Sebastian Reichel wrote: > > On Wed, Aug 23, 2023 at 04:36:15PM +0200, Konrad Dybcio wrote: > >> Add a driver for the Mitsumi MM8013 fuel gauge. The driver is a vastly > >> cleaned up and improved version of the one that shipped in some obscure > >> Lenovo downstream kernel [1], with some register definitions borrowed = =66rom > >> ChromeOS EC platform code [2]. > >> > >> [1] https://github.com/adazem009/kernel_lenovo_bengal/commit/b6b346427= a871715709bd22aae449b9383f3b66b > >> [2] https://chromium.googlesource.com/chromiumos/platform/ec/+/master/= driver/battery/mm8013.h > >> Signed-off-by: Konrad Dybcio > >> --- > [...] [...] > >> + switch (psp) { > >> + case POWER_SUPPLY_PROP_CAPACITY: > >=20 > > this is in %, while the next two are in uAh. So the fuel gauge does > > not provide the current capacity in uAh > > (POWER_SUPPLY_PROP_CHARGE_NOW)? > Yes. Doesn't seem like raw values are supported. Ok. (It's quite unusual for a chip to provide design and full capacity separatly, but not providing the current capacity.) [...] > > With the next submission please include a dump of the uevent > > in sysfs in the cover letter or below the fold, so that its > > easy to validty check if the reported values look sensible. > State of what-will-be-sent in v(n+1), with additional fixups: >=20 > POWER_SUPPLY_NAME=3Dmm8013 > POWER_SUPPLY_TYPE=3DBattery > POWER_SUPPLY_CAPACITY=3D100 > POWER_SUPPLY_CHARGE_FULL=3D7124 > POWER_SUPPLY_CHARGE_FULL_DESIGN=3D7500 The unit for the above two are uAh. So that would be 7.5 mAh. With 4.4V I expect you have something bigger than a coin cell, so that's probably wrong :) > POWER_SUPPLY_CURRENT_NOW=3D-122000 > POWER_SUPPLY_CYCLE_COUNT=3D27 > POWER_SUPPLY_HEALTH=3DGood > POWER_SUPPLY_PRESENT=3D1 > POWER_SUPPLY_STATUS=3DFull > POWER_SUPPLY_TEMP=3D324 > POWER_SUPPLY_VOLTAGE_NOW=3D4407000 Otherwise looks sensible. Greetings, -- Sebastian --nqk2z42bayjsqcyl Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmUDXDIACgkQ2O7X88g7 +ppTRBAAj0xdui/gDf4QyvEwTygEOVRRAVoV2GsAtph8nsHv5lQTxkvHvzz0DC0z XU/GH6ejrwF4CpU6zPp4CxbDHNi8rnVWvf6OK8QARYKAxUqpja8h2Amz6j8Ilf/D i2mXRR+FQenY/pfoAPnaHav6Pn/9EeaZ9cr8GhGennOvJ+AtSGow6RwGhNnJYXOK BdEAG3c6O2g64eo64TE9PdbkGRDPI0bIpuCzKXsnQoNcobAlQK/DoKyvQZeof0Rb NWz1o7H+tBt9huncbUEmpdujgXUdsMsuE5lUrB/Y5Js++JBGwzNin06uss9B7pDw wPebE/e1BiGRfPhy1az6gotdubRhmK1wjC68DY9LVfqX5KXjIyTn1YEb6+0Sqhlo AAwWxe9HhFgJvVM9Zj8fA30egKQHl3H/kVFHqW3XSckte5PqBbeHKH28Zi+iT8NE 9b3jfkfeM3E0ifAv1HlOL6lYSkF59Hq365tGKjFhdLzS7xVGxLshwm7o1CoRJr2R OD/Y23KSyQf4PWqh6QPlksrmTGo863aP0oLo1P5p6WF5aXnWRuIHqIaSQJB/xVRh J5SzAkjPbEF40Vc4Cn4CDaO/nseB/pTyiO3H7vEtnpWZAKdwrQIdJ/QEgXw3DTsi ZI+VNYanv9/F95hD4aV+NTyEIHLz+k6/XF7tTj80wPVc0wdqBCg= =vZJU -----END PGP SIGNATURE----- --nqk2z42bayjsqcyl--