Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1824136iog; Thu, 16 Jun 2022 14:52:23 -0700 (PDT) X-Google-Smtp-Source: AGRyM1soG9sxuS3vr3vhiCXcH7NfeyeIxvom0qjvF6YI321N/3TTCn3T8j67NvIGjWkxpiFUsSlN X-Received: by 2002:a17:903:110c:b0:168:9cab:bfb with SMTP id n12-20020a170903110c00b001689cab0bfbmr6585688plh.101.1655416343597; Thu, 16 Jun 2022 14:52:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655416343; cv=none; d=google.com; s=arc-20160816; b=ZUNanQF9oO3YunEG6dPsNuINutBzhDhLSGDhLzWD4KqB1Go7SIP8SOO0v6PxQm3JE1 MFXlxQ8hmRCW/IxyaGuz40y5CbhV8CkkIcveE7YYFyZVkx/ZKceH8HWrjhgYMHY5ADqJ WgR4voJMfEuO22pBAzazZvGcDrEuFqfbMOr4dfCr0aurFry1Ilvx7W6tWe+0ZRvoGKk7 yH0m580V5sJ9t+Ek+oMY3BOEOUI80+Hc2c2xQo86ffMlvBoAvrcND1vHugDkeli4ffYj N7mg1jgvomWv/ItO0L4WQ+RrRUOu/H3ZqLAvwDw0kMyWr/9q3ppdFBrk1IlIfUdlR8GG 5RiQ== 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=Kq/MImyJWDNQF4uVHL2hoQzE+MOoY9vKXhkH8pM9iWw=; b=CGiyKSMRZ15vEk6SlFWkF0R2+42blnC/5oSgFsto6f1N/NVaJW1hVL6L/z07foPPa9 HC4nHX6w4SA4pESbSlm6KdkVnhX0yCfi6dWEM5Qoi1gAmUbJgHlzKt+DNhmo2J7aCSzu exAP3qJ6mppuw0uHJM9vpW0JLSfPznIW9UaLTP6y6FObErB6iS7+50PYuCLYYCUMQDre q14xN4FJ1k4o2Q9z9UkB+Ieyz9QQL9wvbPAT815ZtroGI81sGdhR9qfscgLBrnuZ6cKa k8Vq0P37uBPRQQjIGb2L7r3kf0PAttRKwLgGXwP6sNCUtqhpVuW0NehZR2C8qIGH7B96 fI0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oDMV4rTs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a37-20020a631a65000000b004051796ea8asi3900113pgm.473.2022.06.16.14.52.12; Thu, 16 Jun 2022 14:52:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oDMV4rTs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1379087AbiFPVNq (ORCPT + 99 others); Thu, 16 Jun 2022 17:13:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379191AbiFPVNl (ORCPT ); Thu, 16 Jun 2022 17:13:41 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6636760AB6 for ; Thu, 16 Jun 2022 14:13:39 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id d5so2224393plo.12 for ; Thu, 16 Jun 2022 14:13:39 -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=Kq/MImyJWDNQF4uVHL2hoQzE+MOoY9vKXhkH8pM9iWw=; b=oDMV4rTsW6tuuydGHoAl95ll57TYHtuIcLgxX6P7/F+8fIbQhjShTYv2VvzpwP7I2f ODHrtoYjkED2az8ySqcIMrm+pOu+7wc36Gixgd4SqjTTp2xGjJwjUIq7Ph9degSmWdKX yj+zZbeGwC2SAvyU6KbLZ+Xaj2RwEPcHQKXAY2iJoap6UrcUJyAmwqtTzidiQL+PewJN TXCl3YI8GHPSj+2facEjkfri+q2kbnFjLZgmiFiaUiSyp9HGqAx9gzJuFbGW9OmISdjg cuyrA3nq+PB2AEHmSSIN5WKjGpYumFtoXZ9U4IEaUlHrLbpqtigpthN2+jEEbLDZnr8E qDWw== 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=Kq/MImyJWDNQF4uVHL2hoQzE+MOoY9vKXhkH8pM9iWw=; b=kCRIqseDBlKDnQyO2B64OGLB34bAwWlgaFzJGLtXdxa2BBDVcRosL/EqE1RFq/sv93 SEThuIafqprKDQFQ1dkX3hhp7G36gT5zYMwkoOPKMKsnsmOJBohumQ5dWjm4lNi0up7K i9PQ/q84CtLvmM70M9ChkPsTDXh8bFnXWdjaki055ev0PxqhXSP8GN3XSCnd+965gmqP HHT06FUpiIwQhhliadH//wMW+ThXwAKJkffPWS89vIl+uwzkZ3oVKRqVu3psnzhVAiUL l5s2glgi5qp34rtUNQN4FwEPKD2fhV5cvd7Io7CVUfEW7z+RmoGiRNEGBy4Zs4OsCUeN wSIw== X-Gm-Message-State: AJIora+ye+9I39h6pYSxQqUb84bBVL1SUDmXWfb6I09bxnBsO7ln+6Hm p+U1mqkD0CZDmLfXg5DWbKUV5A== X-Received: by 2002:a17:902:dccb:b0:168:f9f4:5773 with SMTP id t11-20020a170902dccb00b00168f9f45773mr6364361pll.124.1655414018850; Thu, 16 Jun 2022 14:13:38 -0700 (PDT) Received: from [172.22.33.138] ([192.77.111.2]) by smtp.gmail.com with ESMTPSA id o18-20020a629a12000000b0051bf246ca2bsm2187451pfe.100.2022.06.16.14.13.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Jun 2022 14:13:38 -0700 (PDT) Message-ID: <9c38f708-1376-aa89-2c56-c08d320bcf2b@linaro.org> Date: Thu, 16 Jun 2022 14:13:37 -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 05/15] dt-bindings: backlight: Add Mediatek MT6370 backlight Content-Language: en-US To: ChiaEn Wu , jic23@kernel.org, lars@metafoo.de, matthias.bgg@gmail.com, lee.jones@linaro.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: 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, ChiYuan Huang References: <20220613111146.25221-1-peterwu.pub@gmail.com> <20220613111146.25221-6-peterwu.pub@gmail.com> From: Krzysztof Kozlowski In-Reply-To: <20220613111146.25221-6-peterwu.pub@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,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 13/06/2022 04:11, ChiaEn Wu wrote: > From: ChiYuan Huang > > Add mt6370 backlight binding documentation. > > Signed-off-by: ChiYuan Huang > --- > .../backlight/mediatek,mt6370-backlight.yaml | 107 ++++++++++++++++++ > 1 file changed, 107 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..25a05e607e83 > --- /dev/null > +++ b/Documentation/devicetree/bindings/leds/backlight/mediatek,mt6370-backlight.yaml > @@ -0,0 +1,107 @@ > +# 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: | > + This module is part of the MT6370 MFD device. > + The MT6370 Backlight WLED driver supports up to a 29V output voltage for > + 4 channels of 8 series WLEDs. Each channel supports up to 30mA of current > + capability with 2048 current steps (11 bits) in exponential or linear > + mapping curves. > + > +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-input-bit: > + $ref: /schemas/types.yaml#/definitions/uint8 > + enum: [0, 1, 2, 3] > + description: | > + The selection of the upper and lower bounds threshold of backlight > + PWM resolution. If we choose selection 3 (6 bits), the variation of PWM > + resolution needs over than 64 steps (2^6). > + value mapping: > + - 0: 1 > + - 1: 2 > + - 2: 4 > + - 3: 6 Nope, I said last time: "In any case you cannot have values mapping" Please use proper real world value, not some register bits. The property name also needs fixing. > + > + mediatek,bled-ovp-shutdown: > + description: | > + Enable the backlight shutdown when OVP level triggered > + type: boolean > + > + mediatek,bled-ovp-microvolt: > + enum: [0, 1, 2, 3] > + description: | > + Backlight OVP level selection. > + value mapping: > + - 0: 17000000 > + - 1: 21000000 > + - 2: 25000000 > + - 3: 29000000 No. Please test your bindings. microvolt cannot be 1 mV. It's 21000000, not 1. No value mappings. > + > + mediatek,bled-ocp-shutdown: > + description: | > + Enable the backlight shutdown when OCP level triggerred. > + type: boolean > + > + mediatek,bled-ocp-microamp: > + enum: [0, 1, 2, 3] > + description: | > + Backlight OC level selection. > + value mapping: > + - 0: 900000 > + - 1: 1200000 > + - 2: 1500000 > + - 3: 1800000 Nope. > + > + 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