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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 24703C433F5 for ; Wed, 1 Jun 2022 07:36:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=wrf/QrmHQYHiA+m8emRDQyAgVn/f01ZhtjmsnJ8xNCA=; b=xG8ZVT7PoYrMzj NwmBrkkeaBNwFGZsiux5YDHqaPIL/GAPIst5eCJ5LVTFErYfZ6mrBCbye4b3ljSj6awE1jOvEJGLm A5f/gxOtJeDqGBsU+iebExgzEqsYY+PQg9M6QEWp5gZx6IpKYvcqkjMYv4zIguZQGurSq0JncIFNR +xrxB5PAT/Md2Ysf72bm4CUXyxRGDbONxxmzjeR75yAS9hEX47AY3jjXfLPsc4irguFej3KEt2Ina qc5oSy8ZLnLB7/BzgZ5aunAHog8H7Q2u4KDKAfL+QpnVMb47ZJmzIlzZNMQcSnsZpbqSRAXvFKtuF rvigb+DBIysAIazAzOHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwIsh-00ENlR-BJ; Wed, 01 Jun 2022 07:35:03 +0000 Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwIsc-00ENjE-Cu for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2022 07:35:00 +0000 Received: by mail-ed1-x52d.google.com with SMTP id w27so965955edl.7 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=oFLHlew7lG4MPjb9D05CFdv4kjgrr+Snbbt9Tzqd4chFh+J85ssvR57d5LmGafmPK8 0ENhksmmFYSR5u/eXheRPEN1AK5pnvMrzAQEy2MbIX8uBGxvY1epOunNTQo2BozaUIJy nIXHDIabpwdi+rMrJb6ZfZ//efWIj27MADWfJKObOcNq6mLCsDz8vXnzFDD1k2kjDnc3 C+pBvHiS58/tMNZiSEJXodJkjx03ose/QilhJ/d0GLCSmaEIl0mBaxYuD5W6KfSd4Xko amRKlxn39RreATJGIPwG8SrADActCcWAFVrV4QZGH1nofGuF3HfwTs+klHyj06pfJLWE lwHg== X-Gm-Message-State: AOAM531twuwOo9IpSNO8QY1Hr8ca1VA9YaNwhW5Dts4AYfqC7DlKLqrs B5qoKDjgRncbkbsz2XZTaVI7HQ== X-Google-Smtp-Source: ABdhPJz96yqdhicWuQ/1oz1BY3Wwhy9jxY/RrbCB45rlVIhHe75cCdPoQVOlyJGi8PCpDIpC7VcczQ== 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_003458_536407_D1515264 X-CRM114-Status: GOOD ( 21.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel