Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3878795imm; Mon, 17 Sep 2018 04:51:01 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZibyVYiKogXp2+CNl/ZEpLwRil+rXXsPELMoDrJ78b+3VuqHtH6cQQUMg+WYCUz24///WE X-Received: by 2002:a63:a012:: with SMTP id r18-v6mr17681359pge.166.1537185061084; Mon, 17 Sep 2018 04:51:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537185061; cv=none; d=google.com; s=arc-20160816; b=l/P4Pesh38xAno5dkTjOY+/6bdDs5uaTiZ7mbCmDBosP+F6PhALlgpYePqn7sQJIbt 6bjPvo1OUl1byeH6dCTh0tqVB0fHgKIQdjUs/e2s4MLulUCHTLvsVFbozWfGhcmN2pq+ 0G6bqjaJ5iIR+KYkzH5Te39TMjjtblZ6PcB1OXTmMe2BWPchwKgCXpCzoTBdsFb06N3u dt66kHNMvUtHyVgkdVGjpOfN9JRnXUwiwpSOMTuStfP7swaFU3K5/qGR+ewhmi1a3vRu gg+B53QyEVDHDhnP4Ggu7whDYJwcWX1S9yzQe1Rgami2nxgm1J9kX90/z3o1FmJ5BjgU eYLw== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Qi2K7OXZeDyPwelX1WCokywHZBmR+598XTeDDoZw7qQ=; b=POyT6qE0zt1z23yEQcpK1sLFXyN6F/9EDOc1ZbUpVDZhvoBcnRUpB1hbfHr3iTGttm chzzxnupTFOiy6+6Dg5QjsUjvRkLklpdRiArWPTd+Q3XQxI0kOWWRfBhv0rSY2daR8Ft cLhiZhCOuxayTJ33yv2YJhlgScTncPpsiP3K+jgjjxJ+c0GXTGmn8F0IWaR1fooBAkby ujS0TMp90/Ht1xtFUj1eRZ0nM7/IZKAt7pujDDmVeOdiscwjeq5sZf89Uz44YLq+SwUZ QTZx2TjSo1Aeyz6hqvOB8WJLCBa8muznGj7V9GatAcm2Yj3OfIqMfMrSetrhZIzsb7Dh Krhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ytaTz4oV; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q61-v6si14953088plb.231.2018.09.17.04.50.44; Mon, 17 Sep 2018 04:51:01 -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=@kernel.org header.s=default header.b=ytaTz4oV; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728357AbeIQRQv (ORCPT + 99 others); Mon, 17 Sep 2018 13:16:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:44958 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728101AbeIQRQv (ORCPT ); Mon, 17 Sep 2018 13:16:51 -0400 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EBFB2214DC; Mon, 17 Sep 2018 11:49:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1537184992; bh=hMUnOPDpZBaflHCBC3vF+dmSexZhP9Co+ss5gQ5G234=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ytaTz4oV56bZUOh9+9BLWfh99OXH+BLawSEhd+4wjoa72niDaVAz8u5KslZMVVAuy lSk66EXyh0lV0Jp9XEQQuSN8NUol7BU0ttrfFnvyfdv0VPjQdNcj8T0lIzu5SX3z3z u70C7jx6h9+sKqU5NLhlNypKZBQdsQl607p5SWLk= Received: by mail-wr1-f50.google.com with SMTP id v17-v6so16958052wrr.9; Mon, 17 Sep 2018 04:49:51 -0700 (PDT) X-Gm-Message-State: APzg51BtWrodTuZDRMZgyD58SY23oa7Kau+M1PNr8oKhOQ49/vxYv6Wd zZyzspKjeBevwA2NBED0Qq7dNLbHkcZQ4tGCje8= X-Received: by 2002:adf:a292:: with SMTP id s18-v6mr18972811wra.100.1537184990330; Mon, 17 Sep 2018 04:49:50 -0700 (PDT) MIME-Version: 1.0 References: <1531843509-3533-1-git-send-email-pawel.mikolaj.chmiel@gmail.com> <1531843509-3533-4-git-send-email-pawel.mikolaj.chmiel@gmail.com> <20180807175741.GA30886@rob-hp-laptop> <24790346.rcfynqLzho@acerlaptop> In-Reply-To: <24790346.rcfynqLzho@acerlaptop> From: Krzysztof Kozlowski Date: Mon, 17 Sep 2018 13:49:39 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 3/3] dt-bindings: mfd: max8998: Add charger subnode binding To: pawel.mikolaj.chmiel@gmail.com Cc: robh@kernel.org, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 Sep 2018 at 16:56, Pawe=C5=82 Chmiel wrote: > > On Tuesday, August 7, 2018 11:57:42 AM CEST Rob Herring wrote: > > On Tue, Jul 17, 2018 at 06:05:09PM +0200, Pawe=C5=82 Chmiel wrote: > > > This patch adds devicetree bindings documentation for > > > battery charging controller as the subnode of MAX8998 PMIC. > > > > > > Signed-off-by: Pawe=C5=82 Chmiel > > > --- > > > Changes from v2: > > > - Make charge-restart-level-microvolt optional. > > > - Make charge-timeout-hours optional. > > > > > > Changes from v1: > > > - Removed unneeded Fixes tag > > > - Correct description of all charger values > > > - Added missing property unit > > > --- > > > Documentation/devicetree/bindings/mfd/max8998.txt | 25 +++++++++++++= ++++++++++ > > > 1 file changed, 25 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/mfd/max8998.txt b/Docu= mentation/devicetree/bindings/mfd/max8998.txt > > > index 23a3650ff2a2..264040f4ad15 100644 > > > --- a/Documentation/devicetree/bindings/mfd/max8998.txt > > > +++ b/Documentation/devicetree/bindings/mfd/max8998.txt > > > @@ -50,6 +50,24 @@ Additional properties required if max8998,pmic-buc= k2-dvs-gpio is defined: > > > - max8998,pmic-buck2-dvs-voltage: An array of 2 voltage values in mi= crovolts > > > for buck2 regulator that can be selected using dvs gpio. > > > > > > +Charger: Configuration for battery charging controller should be add= ed > > > +inside a child node named 'charger'. > > > + Required properties: > > > + - max8998,charge-eoc-percent: Setup End of Charge Level. > > > > This should have a vendor prefix and max8998 is not a vendor. Don't > > continue that pattern even if we already have some properties like that= . > > > > These seem like perhaps they should be common charger properties. > Where i could find such properties (or any other driver which is using th= ose as an example) ? > Looking at few existing drivers, most of them have custom properties (tha= t's why i've followed the same pattern for max8998). The common properties are now here: https://elixir.bootlin.com/linux/latest/source/Documentation/devicetree/bin= dings/power/supply/battery.txt The property "max8998,charge-eoc-percent" seems unusual - what does "percent" mean in such case? Usually EOC should happen at 100% of charge so what is the point to set it as 45%? Have in mind that current driver is platform data only so you do not have to maintain any backwards compatibility. If the driver now has weird meaning of "eoc" in pdata, then you can change it. Also you do not have to map the bindings one-to-one to existing platform data. If needed you can translate them from something meaningful in DT to values expected by driver. Best regards, Krzysztof