Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1879920imm; Mon, 3 Sep 2018 11:52:39 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaN+2XPgBMwGnGUmPct6i3NZg0XdLEUD2uQRyL2XvJ12WPHOiqYglBGLkwpaNZe1hEBQJ+d X-Received: by 2002:a17:902:c7:: with SMTP id a65-v6mr16453145pla.264.1536000759204; Mon, 03 Sep 2018 11:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536000759; cv=none; d=google.com; s=arc-20160816; b=uCzWDIRTk/aGEK/N0C9hutY996rEP5WnlbUkc5qUvW/dPNxg4TPlAnft+LNiUNF3Fa /QHgEheMHYcu558psDsp+MSUh2l3DSgXV0Vo01EKpYh5mCbodSJb4uM5yZf6XKkhJNHp 3gZErsHhVJJA7q3m1pOEdcejhBb89QKYRW/tOtDPOuRBkqf8CMGGptbZnxR2rNbi20Bn 8xfC65AnZJyhgUj870FsMAmKx5Eax7WiObm87Ui/ahPBBByYsIBnkjav6YUPtXmTc9Gd azJDjB/jdtdG0GWtogWk/vLSU6jE280TGHbUvqYpk/1QltZjnzc19tr15i/kJkxSalp9 Kacg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=RXFkhu1ME6EeskS955PMCdXwVr5HkohQXwFd76xhU3g=; b=IGqr6Ici4l70kyLHMgDrVZN7ZOqX98XlTE5dAuLy0y6ox9ANEada5r2CJxeF2Xkmai mZTXW9QGcWxeKNJKozVsi8STcGEixRppzV2cRR0pqps2zf+uYm5yChldvpDDkky09FVl 0+VyFOLSwsg4Dig5VV3FtxBdwbvXkbOWW+YCQ+Gam/TvDwZDohTMG1GuXSjybzJBnAWU MN/2M4/Aw+xVkQC+UGXpmn62esT6gTNcQzqcxAsVMxcsrRiqJgG7BZ5bbymzqS3xGeKR +PmtOkVy36hUMHPWYA4dV4dsxZdx92vdjpcSU9bcuh2cujfS3ADn8oPjdiWsz8v5/me6 YeDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H6J1vKzp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a8-v6si14675969pgm.201.2018.09.03.11.52.23; Mon, 03 Sep 2018 11:52:39 -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=@linaro.org header.s=google header.b=H6J1vKzp; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728024AbeICXMp (ORCPT + 99 others); Mon, 3 Sep 2018 19:12:45 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:35592 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727741AbeICXMp (ORCPT ); Mon, 3 Sep 2018 19:12:45 -0400 Received: by mail-pf1-f194.google.com with SMTP id p12-v6so525168pfh.2 for ; Mon, 03 Sep 2018 11:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=RXFkhu1ME6EeskS955PMCdXwVr5HkohQXwFd76xhU3g=; b=H6J1vKzpQnhLQUdkGqh6461NH1ae+YmyodgLJ+C02vIA82m/9MGYIXNchciPtzn8ux A+zme8DzkdDOUtKFSwTJ79wJmjfUEmVH8oaw2XEz/FQeXB7nE8I4KAuXn41JFPEmlu70 jBKy2kpFZcNwKMiSYh6xPRh7/BN7CT7skNUh0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=RXFkhu1ME6EeskS955PMCdXwVr5HkohQXwFd76xhU3g=; b=keHfDaO/b5OdOrk+0zaiDps0AV86ZlFT7hNvrmfaTWoTe5IIw0mbU3TpVCPkSNZGfR j0rDmiTutGR9AjuDgeF8vXQ7nM0V7cBpv4/t1QJgkVbT080JBCPgAKaLZNDyDfh4s9Jn k3/9Hzt6e4hS3yoggCCq5Oq8Iboa7mVvJFzUfv5B6Dy9Vf5WFT0B1QGwdkRki74JZIV9 kvHaTZHzMwH0s49XEkoC0EXWkFq7bgx4v5TjlNIL2VpGKScuIu0502LYqbPlqF4hE/vk SWakX4OpjR7KtKxp3Fdq4RQOljwCDJH7xy+xb6Vay2as5/3MQq0yUoNiBMwjcnAgmJwX myfA== X-Gm-Message-State: APzg51CsfjWQZBzRYZk4CbDewu2BPWx+oMyb3JgMlxrOeA61M39WoasV naxx3W+8FfIRP9i5Lj72eiRvHw== X-Received: by 2002:a63:ec43:: with SMTP id r3-v6mr12850626pgj.295.1536000676833; Mon, 03 Sep 2018 11:51:16 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id g25-v6sm36995248pfd.23.2018.09.03.11.51.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 03 Sep 2018 11:51:16 -0700 (PDT) Date: Mon, 3 Sep 2018 11:55:10 -0700 From: Bjorn Andersson To: kgunda@codeaurora.org Cc: jingoohan1@gmail.com, lee.jones@linaro.org, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, daniel.thompson@linaro.org, jacek.anaszewski@gmail.com, pavel@ucw.cz, robh+dt@kernel.org, mark.rutland@arm.com, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-msm-owner@vger.kernel.org Subject: Re: [PATCH V4 3/8] backlight: qcom-wled: Add new properties for PMI8998 Message-ID: <20180903185510.GB3153@tuxbook-pro> References: <1531131741-19971-1-git-send-email-kgunda@codeaurora.org> <1531131741-19971-4-git-send-email-kgunda@codeaurora.org> <20180807052355.GA23866@tuxbook-pro> <897ab82c450bff71658c1fa32e7e6021@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <897ab82c450bff71658c1fa32e7e6021@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 15 Aug 22:23 PDT 2018, kgunda@codeaurora.org wrote: > On 2018-08-07 10:53, Bjorn Andersson wrote: > > On Mon 09 Jul 03:22 PDT 2018, Kiran Gunda wrote: > > > diff --git > > > a/Documentation/devicetree/bindings/leds/backlight/qcom-wled.txt > > > b/Documentation/devicetree/bindings/leds/backlight/qcom-wled.txt > > [..] > > > - qcom,num-strings > > > Usage: optional > > > Value type: > > > Definition: #; number of led strings attached; > > > - value from 1 to 3. default: 2 > > > - This property is supported only for PM8941. > > > + value: For PM8941 from 1 to 3. > > > + For PMI8998 from 1 to 4. > > [..] > > > +- qcom,enabled-strings > > > + Usage: optional > > > + Value tyoe: > > > + Definition: Array of the WLED strings numbered from 0 to 3. Each > > > + string of leds are operated individually. Specify the > > > + list of strings used by the device. Any combination of > > > + led strings can be used. > > [..] > > > > > > Example: > > > > > > @@ -99,4 +146,5 @@ pm8941-wled@d800 { > > > qcom,switching-freq = <1600>; > > > qcom,ovp = <29>; > > > qcom,num-strings = <2>; > > > + qcom,enabled-strings = <0x00 0x01>; > > > > Nit. I would assume that specifying qcom,num-strings = <2> implies that > > the first 2 strings are used, so one would not also specify > > qcom,enabled-strings. > > > Thanks Bjorn for reviewing the series ! > > "qcom,enabled-strings" need be specified along with the "qcom,num-strings". > Because the enabled-strings can be <0, 2> or <0, 3 > also. The driver picks > the string > configuration from the enabled-strings array and enable only those > current-sinks. > The original binding described qcom,num-strings to mean "the first N strings", requiring qcom,enabled-strings now would break backwards compatibility with this binding. In the case that qcom,enabled-strings is specified we can easily derive num-strings from the listed entires. So I would suggest that you look for enabled-strings and if not found fall back to checking for num-strings. Regards, Bjorn