Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2668538imm; Mon, 16 Jul 2018 12:00:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeebnGKEXbRVLhn9Se5I8AH0KgzrqPu0Q8PDjuUFPW/4CK+FAkFbG9rQ7szInmfllPwNqUw X-Received: by 2002:a65:6211:: with SMTP id d17-v6mr16884119pgv.450.1531767613507; Mon, 16 Jul 2018 12:00:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531767613; cv=none; d=google.com; s=arc-20160816; b=0ubIkbFTEptAJZuZ2ONf5Vh+xjCQZhwpFFK+Is21BKNvC25x00ftg+nJ1o13zSEmLf gBaZ8xPFQ63pKpgLrlGa4bsaysjOS6aaRj99rcfxhYNl1PV0HGYOomDxeOUafsHHoAnr YyAjlbEsTWnjU3CJZKaYJgQ08aGWNGUyDUqTRz6ow4Xg4NkNhUPRyZ2vtXkf0gYelcs9 b/UZxhyKnQ2PLyLO2ZmIME0iEI1tFUbTIZJtd41/ir7yngiC51ableRkwgAfPnQVdGOE S4fnCZQIPbMe6yEuM8iugHajSOO4zJVZMuDUbfK0d+wleh4EZslCsaQHiyFEinlvmfL1 wk0g== 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:mime-version :references:in-reply-to:user-agent:message-id:date:subject:cc:to :from:dkim-signature:arc-authentication-results; bh=G3uIkz76EDm9W6BvIgahNVHn3FFTrrwcxghTLyVYzto=; b=NmW/obSB6gNYO8s18qcgoD/VTCIZa/SXFHu70UAX4WvVkkbIe/Rp+pPq/CHhKEO3Xx n3JBoFmyZZJjZJJ+Ye7gbrwzc2AtT/bobqgksfL4pW/Fq9z6WfbBkEdQ7i8vVnbTdTSz njDvA6ukgNLt7Ik9ZzfJY1fS3nJT93mcQbxqEGAHl0fGSitvTeF4mQlXIq0J36R1TSr/ kxZFV6PdJHLNuayjKBALIsUSoJt29cIcL7efyvL/2r6dDv+hX6oz/oaDJnF1622OwWKq qsjfmURUeao6ifkSlzqGldxUDu+43a1C/LnsldmXpFD5Hd+cWOjpS7ZmU6YhPpJq1hOF kc5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TUXxyqoh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j24-v6si29131712pgj.145.2018.07.16.11.59.58; Mon, 16 Jul 2018 12:00:13 -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=pass header.i=@gmail.com header.s=20161025 header.b=TUXxyqoh; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729603AbeGPT2I (ORCPT + 99 others); Mon, 16 Jul 2018 15:28:08 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:39327 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728550AbeGPT2I (ORCPT ); Mon, 16 Jul 2018 15:28:08 -0400 Received: by mail-lj1-f193.google.com with SMTP id l15-v6so10736483lji.6; Mon, 16 Jul 2018 11:59:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=G3uIkz76EDm9W6BvIgahNVHn3FFTrrwcxghTLyVYzto=; b=TUXxyqohJWOqfT8dGST9KjG4Si+BKbiCZIqvISmafO8+3J/cpTFXd8vBSLakhb+335 4ab/7FWKcgGtwBaHByvPas8iWFFX65WUBS1kh7G2IPQdO5lYvdCY+I/GlE7qoB52NyAu ItUsrmcmMUT/HxB+lBr+Vc9V6jDT/SqFqUqxT/d4Hf5Wb5xfocwzjRMj0KSUtsfLQg4s R1YKbgoQuaxH4CVTZSgXXfQ0KyJIwX7lmdKImAJSZLTqXUBtPHfF9SThvqKAoEBxPBQG 6xyZgqn1QqMv6lluCyTrgGmzLg4XyotVSso2Szt6k6uSSTPVBjeElxoeczze0mjS6Lfq 1iCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=G3uIkz76EDm9W6BvIgahNVHn3FFTrrwcxghTLyVYzto=; b=X5tYuaO1vsUbf04fCrmRZPdEMUc/bgDq8f1TvpnQ762esYH9J3M/lSYelPG/HPRO69 OYTchARloo1NOsIXdWFjINKeOR2RCsHFsDLfDZl2ACCmhKKwqf++lw22nJawmIpdb1PD D/a2wq7z9Jc7QHdbgJu4PPHzbERsU3abOE4F3Va8F0hR31sEBQt3Ac1DBb36uLlg61f/ gB7NUbi6hqE656wFzfAtdoyT0fdWlE4YVm8B9SxkEDkEpNbHt8u3SUs/zhXXJ7waM+mo wU025RV6GTU3X/OdUAnXwe/QXXCfpt0aDfylZb/It7uv0rnIVc+kkc4YVS06YRjShPLu CbIg== X-Gm-Message-State: AOUpUlGQZPfaetQTOTW4bH1s+6enuAwhQNHw1cE269x+xfipb/HMnjju qDoJKYVNUYCW6sYP+I+jluM= X-Received: by 2002:a2e:1b03:: with SMTP id b3-v6mr11595367ljb.24.1531767562152; Mon, 16 Jul 2018 11:59:22 -0700 (PDT) Received: from acerlaptop.localnet (user-94-254-174-73.play-internet.pl. [94.254.174.73]) by smtp.gmail.com with ESMTPSA id h40-v6sm3238864lfi.84.2018.07.16.11.59.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jul 2018 11:59:21 -0700 (PDT) From: =?utf-8?B?UGF3ZcWC?= Chmiel To: Rob Herring Cc: lgirdwood@gmail.com, broonie@kernel.org, sre@kernel.org, lee.jones@linaro.org, mark.rutland@arm.com, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 3/3] dt-bindings: mfd: max8998: Add charger subnode binding Date: Mon, 16 Jul 2018 20:59:20 +0200 Message-ID: <2652044.7dgYAUSR2v@acerlaptop> User-Agent: KMail/5.1.3 (Linux/4.15.0-24-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20180716180003.GA16037@rob-hp-laptop> References: <1531571213-30593-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> <1531571213-30593-4-git-send-email-pawel.mikolaj.chmiel@gmail.com> <20180716180003.GA16037@rob-hp-laptop> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, July 16, 2018 12:00:03 PM CEST Rob Herring wrote: > On Sat, Jul 14, 2018 at 02:26:53PM +0200, Pawe=C5=82 Chmiel wrote: > > This patch adds devicetree bindings documentation for > > battery charging controller as the subnode of MAX8998 PMIC. > >=20 > > Signed-off-by: Pawe=C5=82 Chmiel > > --- > > Changes from v1: > > - Removed unneeded Fixes tag > > - Correct description of all charger values > > - Added missing property unit > > --- > > Documentation/devicetree/bindings/mfd/max8998.txt | 24 +++++++++++++++= ++++++++ > > 1 file changed, 24 insertions(+) > >=20 > > diff --git a/Documentation/devicetree/bindings/mfd/max8998.txt b/Docume= ntation/devicetree/bindings/mfd/max8998.txt > > index 23a3650ff2a2..196e50097a36 100644 > > --- a/Documentation/devicetree/bindings/mfd/max8998.txt > > +++ b/Documentation/devicetree/bindings/mfd/max8998.txt > > @@ -50,6 +50,23 @@ Additional properties required if max8998,pmic-buck2= =2Ddvs-gpio is defined: > > - max8998,pmic-buck2-dvs-voltage: An array of 2 voltage values in micr= ovolts > > for buck2 regulator that can be selected using dvs gpio. > > =20 > > +Charger: Configuration for battery charging controller should be added > > +inside a child node named 'charger'. > > + Required properties: > > + - max8998,charge-eoc-percent: Setup End of Charge Level. > > + If value equals 0, leave it unchanged. > > + Otherwise it should be value from 10 to 45 by 5 step. > > + > > + - max8998,charge-restart-level-microvolt: Setup Charge Restart Level. > > + If value equals 0, leave it unchanged. > > + If value equals -1, it will be disabled. >=20 > -1 is a bit strange. Why not 'not present' is disabled? I wanted to make it work the same way, as it was in case of using it from p= latform_data.=20 But this is good idea, to change it a bit. So we would have: =2D 0 -> leave unchanged =2D property not present in devicetree -> disabled (and set to -1 - driver = is expecting it) =2D value from 10-45 or (5,6,7 in case of second property) I'll update both documentation and driver parsing code (for both properties= - restart level and full timeout) and send v3 version. Thanks for suggestion. >=20 > > + Otherwise it should be one of following values: 100, 150, 200. > > + > > + - max8998,charge-timeout-hours: Setup Charge Full Timeout. > > + If value equals 0, leave it unchanged. > > + If value equals -1, it will be disabled. > > + Otherwise it should be one of following values: 5, 6, 7. > > + > > Regulators: All the regulators of MAX8998 to be instantiated shall be > > listed in a child node named 'regulators'. Each regulator is represent= ed > > by a child node of the 'regulators' node. > > @@ -99,6 +116,13 @@ Example: > > max8998,pmic-buck2-dvs-gpio =3D <&gpx0 0 3 0 0>; /* SET3 */ > > max8998,pmic-buck2-dvs-voltage =3D <1350000>, <1300000>; > > =20 > > + /* Charger configuration */ > > + charger { > > + max8998,charge-eoc-percent =3D <0>; > > + max8998,charge-restart-level-microvolt =3D <(-1)>; > > + max8998,charge-timeout-hours =3D <7>; > > + }; > > + > > /* Regulators to instantiate */ > > regulators { > > ldo2_reg: LDO2 { >=20