Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp45205iof; Sun, 5 Jun 2022 20:36:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxiQGJcO5bCwK/L3PWUh0wm7CyRyaKNraGmFaXp6NOWFS7UrM6EK61r3IDZQqWjHzJnPgg X-Received: by 2002:a05:6a00:1588:b0:518:8ce2:7753 with SMTP id u8-20020a056a00158800b005188ce27753mr22502659pfk.51.1654486600726; Sun, 05 Jun 2022 20:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654486600; cv=none; d=google.com; s=arc-20160816; b=u/uVH3p2+88B+Re5tlPCkVmvQb5uV1cZ3oYo5pbuldUu9JEh5NZwxGXVIahtZgec92 bBOC/Gc3E1t+P1ZlAC0idmY9+AdNzWV5siaqLAZHcSXePq10KJ0q2IEpfo5kotk33mFz 9knZ53wq4xrrVuNC/81LsCawL00RKijQX+I9SoqXN/IvXq6eNtZR2S4z6dqMBpVAz0Oj PCupjY3X57h7++ZHVaiCAyR+whgfap/2RlH4hpXWFYT/bq7HK4vs9K4rd1WBTJfTf5k1 7V/EnuO1qna53YlzJdrxC6FT+2FpIcQq1QxHl5SKaSlsOvA0N9C9Ikkr3gVx3A49HnME ayKQ== 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=DhEMuP67p9l6gHaYEp6fnXGttVPME12T6ktP3AWQge0=; b=NgP8zdS7jhugci0TJcdw4UaG+wMfBmIo6t2y710wKbWDoRBoD7Z5WPw8wq1K2XwP/z vTcN9C7+Qk1JkNZPg9DJ5H1hfGXEBswkBbzhKnCO5JpGidNRfSz+CNMDS4QCX4TeFa4f B1aLA6qXmc3Rq5Y1qKrrbDsa00+j1Cb6uLz8Jho1EtGUCvN7BWDXGkus5SIZqvVO26vh 8V4F7lDyMrz2nd1+arKKHhJ4krRhKHjq81o277RMVZlNi/VzJ1MqbeZ9ayOJPj2Lw0ud S4G6OcAK3PE+dd9/Q3g2mqGuztaeQlFuYCgweoQRkvo17+bwjRCLnrNXMcW+hkCL2kY3 wIEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QNXO7F2F; 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 l21-20020a056a0016d500b004fa7e2947fdsi21453008pfc.147.2022.06.05.20.36.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Jun 2022 20:36:40 -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=QNXO7F2F; 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 314BE3B548; Sun, 5 Jun 2022 20:34:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351196AbiFEQL0 (ORCPT + 99 others); Sun, 5 Jun 2022 12:11:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234405AbiFEQLZ (ORCPT ); Sun, 5 Jun 2022 12:11:25 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B3A41DA40 for ; Sun, 5 Jun 2022 09:11:24 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id z7so15848540edm.13 for ; Sun, 05 Jun 2022 09:11:23 -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=DhEMuP67p9l6gHaYEp6fnXGttVPME12T6ktP3AWQge0=; b=QNXO7F2FkAsGFQCNld2QcAUPn6alhVgigX1dmDbd3ZX+iuVaRjFFYKE3PoXy+jEf02 JCwnrg27lTHCMbi9hzQ6/3N6eMHqvmCIi81ChzbJj10KWxjmla2XHf5bN+4wlxf7H9/q GCARFpWO8PaL7R256uVWtKXy0LSuU68cEdjmNigxHstq77ClMLVZstnQcdo7ci53pib3 Ke0GneWLIa4M511qgIiRFOz64sHvhTlw47c0nURg3tnCRwpcKfyF+K+GNTeGNR3VodqT FoeBXabKxL2WtDlBgzGLnTd+Z9RRD0N9wWzUn0EhsEr5yoxPV7GtmxuoisKHVsN+dU8J eGbw== 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=DhEMuP67p9l6gHaYEp6fnXGttVPME12T6ktP3AWQge0=; b=ITr5x0x5LYgyn39iOova4t44LZFCQzCotfQpw5/22V+pLstsfXTY7Swm+yfSZ/qBem grGxlWiTNXPWI+jIV8ffe2a1BUs6QhkhPXxgX4bKQexoWhfcB5V2DEL4LfVDkc4h6tBf zXNlTPp6TAyogYwMGzA0f17ifDQAMrSG4wJLuteisvzphnKZ8tHMIgQs3JeWKxqxZwes FWJXcupZL+NI6K79dfdRIbxKsdxkqbmGFloNotDm0QLUaIUVrvS+0Xpre1Q34O9MrPDB rIxHPmCd49IblOIYd3+1Ijgdwk1OJToqhfKN2xYEFXqSs92Nnfgd93dEmGFlRnX5RsG2 u8EQ== X-Gm-Message-State: AOAM5327XscdvUeMV9xsCI48EWTUAI/NO8rduy6mYKte50Tpar4lrL6z gKr8eIm1AksBLFab+cMkKK+SHA== X-Received: by 2002:a05:6402:380f:b0:42b:27aa:d4cb with SMTP id es15-20020a056402380f00b0042b27aad4cbmr22449447edb.211.1654445482544; Sun, 05 Jun 2022 09:11:22 -0700 (PDT) Received: from [192.168.0.181] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id a22-20020aa7d916000000b0042dd4f9c464sm6934675edr.84.2022.06.05.09.11.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Jun 2022 09:11:22 -0700 (PDT) Message-ID: <12096a2c-98c3-9e77-785f-808cc3e1a0e4@linaro.org> Date: Sun, 5 Jun 2022 18:11:20 +0200 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 1/2] dt-bindings: backlight: rt4831: Add the new property for ocp level selection Content-Language: en-US To: ChiYuan Huang Cc: Rob Herring , Krzysztof Kozlowski , Lee Jones , Daniel Thompson , Jingoo Han , Pavel Machek , Helge Deller , cy_huang , lucas_tsai@richtek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , dri-devel , "open list:FRAMEBUFFER LAYER" , Linux LED Subsystem , lkml References: <1653534995-30794-1-git-send-email-u0084500@gmail.com> <1653534995-30794-2-git-send-email-u0084500@gmail.com> <1c7ab94c-a736-c629-bd8c-8a974803e2b9@linaro.org> <076d53d3-6062-686f-8e45-14c5f936bbf6@linaro.org> <20220602135604.GA2194286-robh@kernel.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 02/06/2022 17:31, ChiYuan Huang wrote: > Krzysztof Kozlowski 於 2022年6月2日 週四 下午9:58寫道: >> >> On 02/06/2022 15:56, Rob Herring wrote: >>> On Thu, May 26, 2022 at 12:32:12PM +0200, Krzysztof Kozlowski wrote: >>>> On 26/05/2022 10:13, ChiYuan Huang wrote: >>>>> Krzysztof Kozlowski 於 2022年5月26日 週四 下午4:06寫道: >>>>>> >>>>>> On 26/05/2022 05:16, cy_huang wrote: >>>>>>> From: ChiYuan Huang >>>>>>> >>>>>>> Add the new property for ocp level selection. >>>>>>> >>>>>>> Signed-off-by: ChiYuan Huang >>>>>>> --- >>>>>>> .../bindings/leds/backlight/richtek,rt4831-backlight.yaml | 8 ++++++++ >>>>>>> include/dt-bindings/leds/rt4831-backlight.h | 5 +++++ >>>>>>> 2 files changed, 13 insertions(+) >>>>>>> >>>>>>> diff --git a/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml b/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml >>>>>>> index e0ac686..c1c59de 100644 >>>>>>> --- a/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml >>>>>>> +++ b/Documentation/devicetree/bindings/leds/backlight/richtek,rt4831-backlight.yaml >>>>>>> @@ -47,6 +47,14 @@ properties: >>>>>>> minimum: 0 >>>>>>> maximum: 3 >>>>>>> >>>>>>> + richtek,bled-ocp-sel: >>>>>> >>>>>> Skip "sel" as it is a shortcut of selection. Name instead: >>>>>> "richtek,backlight-ocp" >>>>>> >>>>> OK, if so, do I need to rename all properties from 'bled' to 'backlight' ? >>>>> If only this property is naming as 'backlight'. it may conflict with >>>>> the others like as "richtek,bled-ovp-sel". >>>> >>>> Ah, no, no need. >>>> >>>>>> >>>>>>> + description: | >>>>>>> + Backlight OCP level selection, currently support 0.9A/1.2A/1.5A/1.8A >>>>>> >>>>>> Could you explain here what is OCP (unfold the acronym)? >>>>> Yes. And the full name is 'over current protection'. >>>> >>>> Thanks and this leads to second thing - you encode register value >>>> instead of logical value. This must be a logical value in mA, so >>>> "richtek,bled-ocp-microamp". >>> >>> We already have common properties for setting current of LEDs. We should >>> use that here I think. >> >> It might not be exactly the same. We have "led-max-microamp" which is >> the maximum allowed current. I guess over-current protection level is >> slightly higher (e.g. led-max-microamp + 1). IOW, led-max-microamp is >> something which still can be set and used by system/hardware. OCP should >> not. >> > Yap, you're right. So I am right or Rob? > From the modern backlight IC design, it uses the boost converter architecture. > This OCP level is to limit the inductor current when the internal MOS > switch turn on. > Details can refer to the below wiki link > https://en.wikipedia.org/wiki/Boost_converter > > And based on it, OVP is used to limit the inductor output voltage. > Each channel maximum current is based on the IC affordable limit. > It is more like as what you said 'led-max-microamp'. > > So boost voltage level may depend on the LED VF. > The different series of LED may cause different boost voltage. > > RT4831's OVP/OCP is not just the protection, more like as the limit. This suggests Rob is right, so let's use led-max-microamp property? Best regards, Krzysztof