Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1248771lfc; Wed, 1 Jun 2022 13:03:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwPe9DI9OSu5bRIx4c0Y0/FV/OrxDiSiZhg0Wrq1JQpgmxwIMc2vtAGbPmV9cSwenKQFOGM X-Received: by 2002:a17:90b:4b88:b0:1e2:d504:fb22 with SMTP id lr8-20020a17090b4b8800b001e2d504fb22mr1096123pjb.97.1654113781076; Wed, 01 Jun 2022 13:03:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654113781; cv=none; d=google.com; s=arc-20160816; b=NaKMVmZ0vY++hMwRyKWhuxcP4PcKKFUA3++iVR71yXmaqtGSX/2ztG2cqTz0FfbzKB XdcL+Jbi4S14M0e26GQ6YG3TxFULXIh9yhpVhBo75XaJg092SHT8+RH+8Q8DT+KiE+Pp taQpkXQzyS38sHd/UBr6ZVjHl4QUH2rs64twdN8rscjmDtUkczqyhv7L4adSQK9aO7V5 nYYRdytvXdc7UpbCC/+vxDCikpiQ3kscJglbnC2CNsRXguWj5JiKqybGSqDMBT30aki8 uxbx+30OuHRGh6QNtcZgX2z4YZy9gaeQn8jVOSBiypiVd0gLG36Orl409YVKHszwbThz KgHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=UkKpNYLV+QZV53hwWfH5fNHVrBq7gV6/OoYtJa/OWHg=; b=AHxtTHtjkjtz9xD06u1J2lxGopufsIeh+XaDdO/oMaqRB3QFF6DWl1MvcFRyCGjP7c 3QO6f1qOV72g9B/rF2G3v5+rukUQE3qNkFEH9tX2NnJ57xJ1zS84Pf4degRrmWokFTcQ 782lq+yZkCmwPZvgI4W5/2ioCDnIENej+HkOREl0BAlslYTguwyDxsElNyhU8mFeRopm 6CSnYBlOR5DdF944RQ0bptlm3u/NpDyaDR50zbZVT/yogDfNnuuLT+Cof4KL/oC+Z2ES y5xBVtv2SLA93j6JBnUxha43RLQE2z2cqWji5NR+zd5lBdJ1MmILv6C8D2cUz0fn2lQZ nsgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rMnrfEU0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c37-20020a634e25000000b003fbcd6ecc16si3513584pgb.18.2022.06.01.13.03.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:03:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rMnrfEU0; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6DDAC21E324; Wed, 1 Jun 2022 12:20:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237373AbiFAHfY (ORCPT + 99 others); Wed, 1 Jun 2022 03:35:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345986AbiFAHe7 (ORCPT ); Wed, 1 Jun 2022 03:34:59 -0400 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87BF2813D2 for ; Wed, 1 Jun 2022 00:34:57 -0700 (PDT) Received: by mail-ed1-x52a.google.com with SMTP id fd25so978835edb.3 for ; Wed, 01 Jun 2022 00:34:57 -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=UkKpNYLV+QZV53hwWfH5fNHVrBq7gV6/OoYtJa/OWHg=; b=rMnrfEU0hqxNbgO3Ngd4aiEKTa1atj5Akph4RlI7CZIaOcu1EO+hnB5M0SZ23e/3z2 rN7OEJEvscZpeWlRG7rWq53GkfQjm3Gq7tRIKXdTgw7OU0jszTjSXI/x/abDIi4/YrLW y6D4ObKimOf5l5JILct6SzrdKI//yM3Xd3wezrz3e0Jgf6E/GnN4jlSR2xoDvzSA3cEe r7+Z2Y2HxfKsW1IK7UxozvJkgXuUlooXD0+gnyqDqslcPpTu3yAt36QJjN/yef+m0H6Z 5WYBQb3lILHrheefyEo1M+ENIANP5hCJ55qRPEphBhEQNSaOv5FqsoWn1cmcw4pbaHzg g/lg== 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=UkKpNYLV+QZV53hwWfH5fNHVrBq7gV6/OoYtJa/OWHg=; b=PoBZROW7Ah3k4G0RZBw86MKWgLTy1OCadZT3bO7jPNESg0ylYzjm52VacfrjZehaSd WNUTsr27NPg+SnmPwF+YURTmfDd5ahjqO/dLbsvAws0FitIikejKt/rNta7m4FLK8SY5 ZOTR8rEJsNwtjCABGz7bs7y3Z6A6gn9Cv8BmhyilmQf7Xc240E7Ix9H1QR7z2d2UJR9I cXPoktpEOWH39TJWptOVMlt2YYTHQhJlg4/qeRoNruPhtRKAJMom20Vk1S+jHEOxmCz8 OjwLGFit69k+ruKxVdVQ9MtbUGvo9jFG25RBOKwoNihugz8WyVSVQ2EhTl+PKeP/g0/u gJ6g== X-Gm-Message-State: AOAM530uQeAPrIh9g/XY2EAlgt0G6s7shavjUlGbBt5+oUUeAurw8In5 wRa4mw3zvwk53KsDKWtF06drGw== X-Received: by 2002:a05:6402:518f:b0:42b:4404:63d4 with SMTP id q15-20020a056402518f00b0042b440463d4mr56379750edd.177.1654068896097; Wed, 01 Jun 2022 00:34:56 -0700 (PDT) Received: from [192.168.0.179] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id k11-20020a056402048b00b0042ab02e3485sm509213edv.44.2022.06.01.00.34.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Jun 2022 00:34:55 -0700 (PDT) Message-ID: <6227bc72-fe7c-561a-073d-bd5e6debc68f@linaro.org> Date: Wed, 1 Jun 2022 09:34:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 13/14] dt-bindings: backlight: Add Mediatek MT6370 backlight binding documentation Content-Language: en-US To: ChiaEn Wu , lee.jones@linaro.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, matthias.bgg@gmail.com, sre@kernel.org, chunfeng.yun@mediatek.com, gregkh@linuxfoundation.org, jic23@kernel.org, lars@metafoo.de, lgirdwood@gmail.com, broonie@kernel.org, linux@roeck-us.net, heikki.krogerus@linux.intel.com, deller@gmx.de Cc: cy_huang@richtek.com, alice_chen@richtek.com, chiaen_wu@richtek.com, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-usb@vger.kernel.org, linux-iio@vger.kernel.org, linux-fbdev@vger.kernel.org References: <20220531102809.11976-1-peterwu.pub@gmail.com> <20220531102809.11976-14-peterwu.pub@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20220531102809.11976-14-peterwu.pub@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_NONE,SPF_HELO_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 31/05/2022 12:28, ChiaEn Wu wrote: > From: ChiYuan Huang > > Add mt6370 backlight binding documentation. > > Signed-off-by: ChiYuan Huang > --- > .../backlight/mediatek,mt6370-backlight.yaml | 110 ++++++++++++++++++ > 1 file changed, 110 insertions(+) > create mode 100644 Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml > > diff --git a/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml > new file mode 100644 > index 000000000000..81d72ed44be4 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml > @@ -0,0 +1,110 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/leds/backlight/mediatek,mt6370-backlight.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Mediatek MT6370 Backlight > + > +maintainers: > + - ChiaEn Wu > + > +description: | > + MT6370 is a highly-integrated smart power management IC, which includes a > + single cell Li-Ion/Li-Polymer switching battery charger, a USB Type-C & > + Power Delivery (PD) controller, dual flash LED current sources, a RGB LED > + driver, a backlight WLED driver, a display bias driver and a general LDO for > + portable devices. Do not repeat entire device description, but describe only this part. Your other pieces of MFD were doing it correctly, so why here it is different? > + > + For the LCD backlight, it can provide 4 channel WLED driving capability. > + Each channel driving current is up to 30mA > + > +allOf: > + - $ref: common.yaml# > + > +properties: > + compatible: > + const: mediatek,mt6370-backlight > + > + default-brightness: > + minimum: 0 > + maximum: 2048 > + > + max-brightness: > + minimum: 0 > + maximum: 2048 > + > + enable-gpios: > + description: External backlight 'enable' pin > + maxItems: 1 > + > + mediatek,bled-pwm-enable: > + description: | > + Enable external PWM input for backlight dimming > + type: boolean > + > + mediatek,bled-pwm-hys-enable: > + description: | > + Enable the backlight input-hysteresis for PWM mode > + type: boolean > + > + mediatek,bled-pwm-hys-sel: > + $ref: /schemas/types.yaml#/definitions/uint8 > + enum: [0, 1, 2, 3] > + description: | > + Backlight PWM hysteresis input level selection. > + value mapping: > + - 0: 1bit > + - 1: 2bit > + - 2: 4bit > + - 3: 6bit Please explain what is this input level and what is the meaning of 6bit... In any case you cannot have values mapping, but instead you should use the logical values (so 1, 2, 4, and 6). If "sel" is shortcut of "selection" please drop it. > + > + mediatek,bled-ovp-shutdown: > + description: | > + Enable the backlight shutdown when OVP level triggered > + type: boolean > + > + mediatek,bled-ovp-level-sel: > + $ref: /schemas/types.yaml#/definitions/uint8 > + enum: [0, 1, 2, 3] > + description: | > + Backlight OVP level selection. > + value mapping: > + - 0: 17V > + - 1: 21V > + - 2: 25V > + - 3: 29V Logical values in microvolts. Name it according to unit suffices and drop any useless parts of property name like "level selection". It is simply - mediatek,bled-ovp-microvolt. > + > + mediatek,bled-ocp-shutdown: > + description: | > + Enable the backlight shutdown when OCP level triggerred. > + type: boolean > + > + mediatek,bled-ocp-level-sel: > + $ref: /schemas/types.yaml#/definitions/uint8 > + enum: [0, 1, 2, 3] > + description: | > + Backlight OC level selection. > + value mapping: > + - 0: 900mA > + - 1: 1200mA > + - 2: 1500mA > + - 3: 1800mA Same comments. > + > + mediatek,bled-channel-use: > + $ref: /schemas/types.yaml#/definitions/uint8 > + description: | > + Backlight LED channel to be used. > + Each bit mapping to: > + - 0: CH4 > + - 1: CH3 > + - 2: CH2 > + - 3: CH1> + minimum: 1 > + maximum: 15 > + > +required: > + - compatible > + - mediatek,bled-channel-use > + > +additionalProperties: false Best regards, Krzysztof