Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3401143imm; Thu, 17 May 2018 08:12:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoqnUo4j6+1H7AuGzJOSaR1Nn22//6OgatAm6VfbNhTjIpP0NnqASZFEhrO9Vu7iWih/qt/ X-Received: by 2002:a62:a89:: with SMTP id 9-v6mr5462353pfk.112.1526569934447; Thu, 17 May 2018 08:12:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526569934; cv=none; d=google.com; s=arc-20160816; b=xgjzaZiqAcQs32QH/fq2Q0oh1bgyjULK5vYTL1gGJUXiHvXUmkSKdjUATQ4ZWqJsxn N4gP8JatSbS+/rlzEJM52BK4JUX5vMrkNZA+B5I0JF3BkD5wgfXvj32uWwbKvJDoqDR1 9bvhVlTlcFVU2ihX7jk30KCgjawgbZO0yc6sIDH4t3l+CUq3tFUQE3JSPmiHCxiP0Omb SJkQYrEd4g5SOp2FgWEtu/KRACaLx02ezhroBRCSjr3EFhwZER/u1QvWtsYSmRW7htNo AdcVfsZQXTYjDLgnocqeaP2SVcn8jHZb8Jiz9hNhhx5DDFYdAAhg3IKUS6auFVknc4x9 90IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=c1wvEER02SQsaM7U+dQHzhKPpvEB7uHYRlcXo5MK8go=; b=UkMa2IhApkTLi9k3v7V/f1MK0IOx6IaXKo7quAk+u4C+c3WyTMyMWTtZHZIP9nXOiy F6BD1zMAh5d8kNAL9Wv7qXO3eGXreLj8wAcRB6wTI34iEYgMAyh0ePyUeaY+T7MKqUYO +2rOzyuQS8k2tgRgRdySg6qm5KZEf6RY8sbY81BXN4MZZr0V0GbLrN1PcrgMyb+dAvyF YQjxXNgwEIG3qQAHALK69khgGAxkxuqhuNbtdsCrRVX+V39RGDaa7mOu5IPoM9h5wZsT YxXy9YAiCfr6HsYPWt9Un1d7EzlmDDjz8bXNCaHX6MukZPseGKaidYIrraC6QR8yQDwV fwfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jtXfo4mT; dkim=pass header.i=@codeaurora.org header.s=default header.b=S9jClOJy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si5015386plt.149.2018.05.17.08.11.45; Thu, 17 May 2018 08:12:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=jtXfo4mT; dkim=pass header.i=@codeaurora.org header.s=default header.b=S9jClOJy; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752427AbeEQPKR (ORCPT + 99 others); Thu, 17 May 2018 11:10:17 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:52190 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751798AbeEQPKO (ORCPT ); Thu, 17 May 2018 11:10:14 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2CD2060558; Thu, 17 May 2018 15:10:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526569814; bh=kq+UtMdbPkdW5sOFyGkwqw43nIK2VLv3vD00ThhMco0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jtXfo4mTEBKlaIHkQBFtZeL8uHS6RRnaS3ZHhZv3Q7E3AJQM2mJAahRTafbXOPgNR LCzuudXqQNkmykl1gKxKqseb/VNyuKl2OojDUPniTINA8g/yqQkqCflDVab2JKssqx adz+HgbzjOTRDgUy7C3Sq0s4Ug+1QqqDBN7MariA= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id A7FCA60558; Thu, 17 May 2018 15:10:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1526569812; bh=kq+UtMdbPkdW5sOFyGkwqw43nIK2VLv3vD00ThhMco0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=S9jClOJyUMKCwMj6uv8e2L/nIJo0HldPxx7WwlLn0VStJlQBw8K4SicEeQR5wr3tx Us4KCA8IkC3UesfHSRFMpnGL7uzotZBEAiPnpSrAB8UgsdAabfWr87CrZRz3I0WSiL pZvPSsbk52PqXG41KqXlu9aZ2ktbl0pr7RLSIxm4= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 17 May 2018 20:40:12 +0530 From: kgunda@codeaurora.org To: Rob Herring Cc: Bjorn Andersson , Lee Jones , Daniel Thompson , Jingoo Han , Jacek Anaszewski , Pavel Machek , Mark Rutland , Bartlomiej Zolnierkiewicz , Linux LED Subsystem , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel , linux-fbdev@vger.kernel.org, linux-arm-msm , linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V1 2/5] backlight: qcom-wled: Add support for WLED4 peripheral In-Reply-To: References: <1525341432-15818-1-git-send-email-kgunda@codeaurora.org> <1525341432-15818-3-git-send-email-kgunda@codeaurora.org> <20180507162004.GB2259@tuxbook-pro> <82fa847760309cb3382bf0a8da50162c@codeaurora.org> Message-ID: <7143faaec2d0b7b0fd7e0f3b512839d8@codeaurora.org> X-Sender: kgunda@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-05-17 18:01, Rob Herring wrote: > On Thu, May 17, 2018 at 4:47 AM, wrote: >> On 2018-05-08 15:55, kgunda@codeaurora.org wrote: >>> >>> On 2018-05-07 21:50, Bjorn Andersson wrote: >>>> >>>> On Thu 03 May 02:57 PDT 2018, Kiran Gunda wrote: >>>> >>>>> WLED4 peripheral is present on some PMICs like pmi8998 >>>>> and pm660l. It has a different register map and also >>>>> configurations are different. Add support for it. >>>>> >>>> >>>> Several things are going on in this patch, it needs to be split to >>>> not hide the functional changes from the structural/renames. >>>> >>> Ok. I will split it in the next series. >>>>> >>>>> Signed-off-by: Kiran Gunda >>>>> --- >>>>> .../bindings/leds/backlight/qcom-wled.txt | 172 ++++- >>>>> drivers/video/backlight/qcom-wled.c | 749 >>>>> +++++++++++++++------ >>>>> 2 files changed, 696 insertions(+), 225 deletions(-) >>>>> >>>>> diff --git >>>>> a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.txt >>>>> b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.txt >>>>> index fb39e32..0ceffa1 100644 >>>>> --- >>>>> a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.txt >>>>> +++ >>>>> b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.txt >>>>> @@ -1,30 +1,129 @@ >>>>> Binding for Qualcomm Technologies, Inc. WLED driver >>>>> >>>>> -Required properties: >>>>> -- compatible: should be "qcom,pm8941-wled" >>>>> -- reg: slave address >>>>> - >>>>> -Optional properties: >>>>> -- default-brightness: brightness value on boot, value from: 0-4095 >>>>> - default: 2048 >>>>> -- label: The name of the backlight device >>>>> -- qcom,cs-out: bool; enable current sink output >>>>> -- qcom,cabc: bool; enable content adaptive backlight control >>>>> -- qcom,ext-gen: bool; use externally generated modulator signal to >>>>> dim >>>>> -- qcom,current-limit: mA; per-string current limit; value from 0 >>>>> to 25 >>>>> - default: 20mA >>>>> -- qcom,current-boost-limit: mA; boost current limit; one of: >>>>> - 105, 385, 525, 805, 980, 1260, 1400, 1680 >>>>> - default: 805mA >>>>> -- qcom,switching-freq: kHz; switching frequency; one of: >>>>> - 600, 640, 685, 738, 800, 872, 960, 1066, 1200, 1371, >>>>> - 1600, 1920, 2400, 3200, 4800, 9600, >>>>> - default: 1600kHz >>>>> -- qcom,ovp: V; Over-voltage protection limit; one of: >>>>> - 27, 29, 32, 35 >>>>> - default: 29V >>>>> -- qcom,num-strings: #; number of led strings attached; value from >>>>> 1 to >>>>> 3 >>>>> - default: 2 >>>>> +WLED (White Light Emitting Diode) driver is used for controlling >>>>> display >>>>> +backlight that is part of PMIC on Qualcomm Technologies, Inc. >>>>> reference >>>>> +platforms. The PMIC is connected to the host processor via SPMI >>>>> bus. >>>>> + >>>>> +- compatible >>>>> + Usage: required >>>>> + Value type: >>>>> + Definition: should be "qcom,pm8941-wled" or >>>>> "qcom,pmi8998-wled". >>>>> + or "qcom,pm660l-wled". >>>> >>>> >>>> Better written as >>>> >>>> should be one of: >>>> X >>>> Y >>>> Z >>>> >>> Will do it in the next series. >>>>> >>>>> + >>>>> +- reg >>>>> + Usage: required >>>>> + Value type: >>>>> + Definition: Base address of the WLED modules. >>>>> + >>>>> +- interrupts >>>>> + Usage: optional >>>>> + Value type: >>>>> + Definition: Interrupts associated with WLED. Interrupts >>>>> can be >>>>> + specified as per the encoding listed under >>>>> + Documentation/devicetree/bindings/spmi/ >>>>> + qcom,spmi-pmic-arb.txt. >>>> >>>> >>>> Better to describe that this should be the "short" and "ovp" >>>> interrupts >>>> in this property than in the interrupt-names. >>>> >>> Ok. I will do it in the next series. >>>>> >>>>> + >>>>> +- interrupt-names >>>>> + Usage: optional >>>>> + Value type: >>>>> + Definition: Interrupt names associated with the >>>>> interrupts. >>>>> + Must be "short" and "ovp". The short circuit >>>>> detection >>>>> + is not supported for PM8941. >>>>> + >>>>> +- label >>>>> + Usage: required >>>>> + Value type: >>>>> + Definition: The name of the backlight device >>>>> + >>>>> +- default-brightness >>>>> + Usage: optional >>>>> + Value type: >>>>> + Definition: brightness value on boot, value from: 0-4095 >>>>> + Default: 2048 >>>>> + >>>>> +- qcom,current-limit >>>>> + Usage: optional >>>>> + Value type: >>>>> + Definition: uA; per-string current limit >>>> >>>> >>>> You can't change unit on an existing property, that breaks any >>>> existing >>>> dts using the qcom,pm8941-wled compatible. >>>> >>> >>>>> + value: >>>>> + For pm8941: from 0 to 25000 with 5000 ua step >>>>> + Default 20000 uA >>>>> + For pmi8998: from 0 to 30000 with 5000 ua >>>>> step >>>>> + Default 25000 uA. >>>> >>>> >>>> These values could be described just as well in mA, so keep the >>>> original >>>> unit - in particular since the boot-limit is in mA... >>>> >>> Ok. Will keep the original as is in the next series. >> >> Here, I may have to go with the approach as in "qcom,ovp". Because for >> pm8941 >> the current step is 1 mA (I have wrongly mentioned as 5000uA here) and >> for >> PMI8998 >> the current step is 2.5 mA. Hence, I will add another variable >> "qcom,current-limit-ua" >> just like "qcom,ovp-mv". > > Use unit suffixes defined in bindings/property-units.txt. > > Rob > -- > To unsubscribe from this list: send the line "unsubscribe > linux-arm-msm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Thanks for pointing it ! hope I can use "qcom,current-limit-microamp" and "qcom,ovp-millivolt". I am asking this because i found only "-microvolt". "-millivolt" is not present in the bindings you pointed.