From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE929C433EF for ; Tue, 5 Apr 2022 15:23:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239002AbiDEPZn (ORCPT ); Tue, 5 Apr 2022 11:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1388891AbiDEPUm (ORCPT ); Tue, 5 Apr 2022 11:20:42 -0400 Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84ABAC4E32 for ; Tue, 5 Apr 2022 06:35:07 -0700 (PDT) Received: by mail-ed1-x535.google.com with SMTP id g20so14911936edw.6 for ; Tue, 05 Apr 2022 06:35:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=5dwM+wZpTO3dJm2C/zTXFC7RztJX3MC1/t/cmygFHpM=; b=U0esJs4rP0x+B/7le3KzQk0G9D9jf8luw+Lhb+RWPQ520F2Pkjzs3DVjaaHodh5Ejw K7bJwFQphX/lsr8r79a9uqQIcQUtCWuYFPYkehbagjXAt4reilNZRI6JcOroNXL3HSm1 c1Dirae4HlQOeBoqs/mTgxhlSJw8YJjTlR92APx6zOXG6vyTCaqbTuliyVuR0CayEq60 NXSZzvAYgfZSRp66eov4utbzned9N9+RHLZFEfRHkCARQSBTK5GeS4KDiIh3xIUtJ8h+ vWME8qOzqa/NzEVS4/LMjrZG6mz8ojmpH5XjH38KhClsdBMdQuAdpllbk6spsPl8Fp6f IAeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=5dwM+wZpTO3dJm2C/zTXFC7RztJX3MC1/t/cmygFHpM=; b=6Mf0f4ezX/hwdjXb9osqD6vNf8/4sakv56tz2O12CTwzIDiXbzcXXZNpIVs+ose9sv JdwqbECC3NIOJwWY1F5Cs/J19erPtzYJ3bORGzdJKuDbsA6ja+4vZGXUJRPuVXUqZxB7 RDOHKXKFbSxFOjOQtuZUqTRjjkn7/bHtGo/snOCBQ1ykmYsHOy8GrhPH+1MsOPSJZ7Be 8pU6Dn2XLRE0JiWCAacsG9F/Pl5C4O+oqjqsyOHUiHae8aero3j5KMOzuUwItYVJRSSh YqfEfiYFyvlfLEMOOp2yGiL/RqVpo+hauRwIEnyeNS1/Jr1wrxhUMiMO7gBKeg5XNtla 0ABA== X-Gm-Message-State: AOAM5338NncWwAelW2BZS71/kFdXGHw2H3ApuOClFB7g7auE3kGSnwbp qDC5CLWaoL3n8oyjXO+Ao6zIUA== X-Google-Smtp-Source: ABdhPJyMdghdEM2XuZgbpwldmrRTm3as2pia+nLSDQYWpSbi7EJHANLmyvBkobO5HTtK6Wvy1FRIPg== X-Received: by 2002:a05:6402:3553:b0:419:6552:11b7 with SMTP id f19-20020a056402355300b00419655211b7mr3644088edd.286.1649165706043; Tue, 05 Apr 2022 06:35:06 -0700 (PDT) Received: from [192.168.0.182] (xdsl-188-155-201-27.adslplus.ch. [188.155.201.27]) by smtp.gmail.com with ESMTPSA id e3-20020a170906374300b006e7f060bf6asm2501343ejc.207.2022.04.05.06.35.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Apr 2022 06:35:05 -0700 (PDT) Message-ID: Date: Tue, 5 Apr 2022 15:35:04 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH 1/4 v5] dt-bindings: Add Rockchip rk817 battery charger support Content-Language: en-US To: Chris Morgan Cc: linux-pm@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, zhangqing@rock-chips.com, zyw@rock-chips.com, jon.lin@rock-chips.com, maccraft123mc@gmail.com, sre@kernel.org, heiko@sntech.de, krzk+dt@kernel.org, robh+dt@kernel.org, lee.jones@linaro.org, Chris Morgan References: <20220404215754.30126-1-macroalpha82@gmail.com> <20220404215754.30126-2-macroalpha82@gmail.com> <74f445c2-3194-80a6-6d52-21368eb6172a@linaro.org> <20220405131228.GA20@wintermute.localdomain> From: Krzysztof Kozlowski In-Reply-To: <20220405131228.GA20@wintermute.localdomain> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 05/04/2022 15:12, Chris Morgan wrote: > On Tue, Apr 05, 2022 at 01:16:55PM +0200, Krzysztof Kozlowski wrote: >> On 04/04/2022 23:57, Chris Morgan wrote: >>> From: Chris Morgan >>> >>> Create dt-binding documentation to document rk817 battery and charger >>> usage. New device-tree properties have been added. >>> >>> - rockchip,resistor-sense-micro-ohms: The value in microohms of the >>> sample resistor. >>> - rockchip,sleep-enter-current-microamp: The value in microamps of the >>> sleep enter current. >>> - rockchip,sleep-filter-current: The value in microamps of the sleep >>> filter current. >>> >>> Signed-off-by: Chris Morgan >>> Signed-off-by: Maya Matuszczyk >>> --- >>> .../bindings/mfd/rockchip,rk817.yaml | 48 +++++++++++++++++++ >>> 1 file changed, 48 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml >>> index bfc1720adc43..b949d406a487 100644 >>> --- a/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml >>> +++ b/Documentation/devicetree/bindings/mfd/rockchip,rk817.yaml >>> @@ -117,6 +117,47 @@ properties: >>> description: >>> Describes if the microphone uses differential mode. >>> >>> + battery: >> >> I wonder why do you call it a batter while it is a charger, isn't it? > > It is a driver for both the battery and charger. I'd argue about 95% of > it is battery functions and the other 5% is managing the IRQs for plug > removal/insertion and capturing the incoming voltage and current. In > the BSP kernel these were two seperate drivers, but there was so little > that needed to be done for the charger (and users probably don't need > plug IRQs if they aren't using a battery anyway since the system will > shut off on a plug out event due to no power...). What do you mean by driver for "battery"? Like some smart-battery system? with embedded battery (RK817 comes with embedded battery) Or a fuel gauge? Judging by power supply properties it looks like fuel gauge. "Battery" should rather be used for the node referenced by "monitored-battery"... Best regards, Krzysztof