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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 107F2C433EF for ; Fri, 17 Jun 2022 23:12:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 77E0C10FA14; Fri, 17 Jun 2022 23:12:07 +0000 (UTC) Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by gabe.freedesktop.org (Postfix) with ESMTPS id 895C710FA14 for ; Fri, 17 Jun 2022 23:12:06 +0000 (UTC) Received: by mail-pf1-x42d.google.com with SMTP id bo5so5329736pfb.4 for ; Fri, 17 Jun 2022 16:12:06 -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=294ojvCzJG+QxzRogH/Uf6cGP9X/olCBo7vsCMUaWUs=; b=rRMAv5j+Hd/iJN32vcBDVL12U3rDEOOrDCl0MNjeuoB8nfWV1YTHVPRQxhLQzoJgkX ZJG8iKXWOMEzcoSSx4BzvL4tW/FkQYqnQyv12OpGhLHgnqsF6MA0Zv/JSKUyme4TAdC1 PK4UNdO1p7nq6ua9IRX7f5y8kq4TRP0rZ11wo6jCd21bxBCR0qCtS3EqGZPgSOcsLfsG FG4f5UYmY07Jsv9z6xEuBtiNjJlIeAgxtaZTK9tJdqWjWANTPiGOVJybe7hvJ9oZqXL9 HFn/y5aQTdGOOA9aVIAvXAe7Q0YJ5X8tMP0RYR8Qd7xIDEPKM+u0LrMy9wJIkIzH20SK yGQw== 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=294ojvCzJG+QxzRogH/Uf6cGP9X/olCBo7vsCMUaWUs=; b=vQKgj0glX9A0wu7n88P08vuwA739iomR7ZrWwJPV3MNNyv/U+NlWHPC9YGXFeJlh8H c/rX2ESWR/GbmSI9PDJMx5Db7U/84/M70QZ/DCj9TpqNMqMT3u1okGeAy6INdguTtnPE aUNOl5AQy93xyYr35OOUjkJ6P+33Mz9gahiCfjrKXi007EfEXZdKLwUFwchamLbsCYpL spc4v3OJ9aVln7WQBSNzef+2Pu2euZrHDquk56//vcpROVsltMFMVOIS4+53NM54fg/x A0Mw1C8TFeCIX+YLIsyiod78tCvaYpudf1s5o9cn6lYFubkpQ+dKN5s+/ELhk6blWZEg oTWA== X-Gm-Message-State: AJIora92H5557yx/FvBNBXQ3NuKQEZKKLNG2MhpRGrSKJsLzfTktdoOi wi94kgKp6mgTtuq3JQHxiya8tg== X-Google-Smtp-Source: AGRyM1stFAPlhmMkLY1NazO67J7oIwcpQv5+571CFcD+wsnGDHo4hdZrZyBBUSUL5SYGrTcERU92tQ== X-Received: by 2002:a63:4f05:0:b0:405:5463:2ea8 with SMTP id d5-20020a634f05000000b0040554632ea8mr10679545pgb.94.1655507526105; Fri, 17 Jun 2022 16:12:06 -0700 (PDT) Received: from [172.31.235.92] ([216.9.110.6]) by smtp.gmail.com with ESMTPSA id c2-20020a639602000000b003fb098151c9sm4301292pge.64.2022.06.17.16.12.04 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Jun 2022 16:12:05 -0700 (PDT) Message-ID: Date: Fri, 17 Jun 2022 16:12:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH v2 02/15] dt-bindings: power: supply: Add Mediatek MT6370 Charger Content-Language: en-US To: ChiaEn Wu References: <20220613111146.25221-1-peterwu.pub@gmail.com> <20220613111146.25221-3-peterwu.pub@gmail.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Daniel Thompson , krzysztof.kozlowski+dt@linaro.org, linux-pm@vger.kernel.org, linux-iio@vger.kernel.org, jingoohan1@gmail.com, ChiaEn Wu , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, szunichen@gmail.com, robh+dt@kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, pavel@ucw.cz, matthias.bgg@gmail.com, lee.jones@linaro.org, linux-leds@vger.kernel.org, jic23@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 17/06/2022 03:19, ChiaEn Wu wrote: > Hi Krzysztof, > > Thanks for your helpful comments! I have so some questions want to ask > you below. > > Krzysztof Kozlowski 於 2022年6月17日 週五 清晨5:05寫道: >> >> On 13/06/2022 04:11, ChiaEn Wu wrote: >>> From: ChiaEn Wu >>> >>> Add Mediatek MT6370 Charger binding documentation. >>> >>> Signed-off-by: ChiaEn Wu >>> --- >>> .../power/supply/mediatek,mt6370-charger.yaml | 60 +++++++++++++++++++ >>> 1 file changed, 60 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml >>> >>> diff --git a/Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml b/Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml >>> new file mode 100644 >>> index 000000000000..b63553ebb15b >>> --- /dev/null >>> +++ b/Documentation/devicetree/bindings/power/supply/mediatek,mt6370-charger.yaml >>> @@ -0,0 +1,60 @@ >>> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) >>> +%YAML 1.2 >>> +--- >>> +$id: http://devicetree.org/schemas/power/supply/mediatek,mt6370-charger.yaml# >>> +$schema: http://devicetree.org/meta-schemas/core.yaml# >>> + >>> +title: Mediatek MT6370 Battery Charger >>> + >>> +maintainers: >>> + - ChiaEn Wu >>> + >>> +description: | >>> + This module is part of the MT6370 MFD device. >>> + Provides Battery Charger, Boost for OTG devices and BC1.2 detection. >>> + >>> +properties: >>> + compatible: >>> + const: mediatek,mt6370-charger >>> + >>> + interrupts: >>> + description: | >>> + Specify what irqs are needed to be handled by MT6370 Charger driver. IRQ >>> + "MT6370_IRQ_CHG_MIVR", "MT6370_IRQ_ATTACH" and "MT6370_IRQ_OVPCTRL_UVP_D" >>> + are required. >>> + items: >>> + - description: BC1.2 done irq >>> + - description: usb plug in irq >>> + - description: mivr irq >>> + >>> + interrupt-names: >>> + items: >>> + - const: attach_i >>> + - const: uvp_d_evt >>> + - const: mivr >>> + >>> + io-channels: >>> + description: | >>> + Use ADC channel to read vbus, ibus, ibat, etc., info. Ibus ADC channel >>> + is required. >> >> Add io-channel-names and describe each item - what type of ADC it is >> expected to be. >> > > I'm afraid I might not be understanding what you mean. > I will try to add some text in "description" and "io-channel-names", like below > ---------------------------------- > io-channels: > description: | > Use ADC channel to read VBUS, IBUS, IBAT, etc., info. Ibus ADC channel > is required. It can be seen in > include/dt-bindings/iio/adc/mediatek,mt6370_adc.h > minItems: 1 > maxItems: 9 > > io-channel-names: > items: > - const: vbusdiv5 > - const: vbusdiv2 Almost. The best would be something like this: Documentation/devicetree/bindings/power/supply/cpcap-charger.yaml so also "items" with description under "io-channels". You need to skip maxItems in such case (keep minItems). > - ... > ---------------------------------- > Did these modifications meet your expectations? > >>> + minItems: 1 >>> + maxItems: 9 >>> + >>> + usb-otg-vbus-regulator: >>> + type: object >>> + description: OTG boost regulator. >>> + $ref: /schemas/regulator/regulator.yaml# >> >> unevaluatedProperties: false > > I will add this in the next patch. > >> >>> + >>> + properties: >>> + enable-gpio: >> >> "gpios", so: >> enable-gpios > > If this otg regulator only uses one GPIO Pin, do I still need to > change to "gpios"? Yes, because "gpios" is the preferred suffix. This is requirement for all such properties. enable-gpios are also documented here: Documentation/devicetree/bindings/gpio/gpio-consumer-common.yaml > If so, I will refine it along with the regulator "enable-gpio" in MFD > dt-binding. Yes, there it should be "enable-gpios" as well. Best regards, Krzysztof