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 42D0FCCA479 for ; Fri, 17 Jun 2022 23:12:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383337AbiFQXML (ORCPT ); Fri, 17 Jun 2022 19:12:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44468 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383081AbiFQXMK (ORCPT ); Fri, 17 Jun 2022 19:12:10 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D25164D11 for ; Fri, 17 Jun 2022 16:12:06 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id k127so124068pfd.10 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=Mj2qtazH2o0MhqgcQoCK4r8PZ0oi2aAyvM8faGtlYwR2Xfa5TJW+4nna0klVZUFPMw RlibWZRvqV4TQUStKSj6sW9+Hli4FM2OfwbSH88/Nw4kiHetPNDD9p/X5jKYzyK87RsA EgoWuIhhwnx+9eHFxk8LeB1xk0porfMsq1wn9A8m7kupmLEOxaC1EVs6dBLdbqs5XcZQ wOyxa5eA3dvzZE5XaLmRhcFiolweN6bo39V+jopWa7KOoToyDFARl/A4/DZu95Aw9yfZ scFm612SkuH+dl/l64VJQv1E6j1OvuzJT+mOygYufJjYW3jr/vDgKnvM5EYdAb74pDMQ /k/g== X-Gm-Message-State: AJIora/xAaP3BEufyMc28MPcrcQGo4bOisuMt4+LFDEJhF+s8SiYcQ5u ZyPR2jMrS+76+FjvgVLOQ+boIA== 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 Cc: jic23@kernel.org, lars@metafoo.de, matthias.bgg@gmail.com, lee.jones@linaro.org, Daniel Thompson , jingoohan1@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, szunichen@gmail.com, 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 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org 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