Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1858502rdb; Tue, 3 Oct 2023 03:21:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEIZFMwTIwt3gr6wacpj0sPTG2QLvYjMHn8pYYlLk8f0Jg3GZgwVr1akrdoJ62bkypfAyHw X-Received: by 2002:a17:90a:df8f:b0:267:fc61:5a37 with SMTP id p15-20020a17090adf8f00b00267fc615a37mr11741323pjv.39.1696328513039; Tue, 03 Oct 2023 03:21:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696328513; cv=none; d=google.com; s=arc-20160816; b=G97Z7l0ANIn6posCEzbiM0WEdgFlhwPL19gfP4mh2GRz5nESjFT69+GjfmVObzXxBi k9NI585VhSvPaiGYQldWzTxrtnWdC0vMrEcNJlbVf6/YZ4prXZ44YCzPlpWCZ2aoI6cX UjJJ0Ga8RPO8HNlV9P5dS/1BaUb1pDNXkVoRobeuiscsF4v2cdCEepflbJWjBSxQ3q77 Fwzo0O9j/EQ3wL66uBzuhLwjroRfr0VohW9U4O0VwP8CryKp797USRbQGmVWXQksqRjb Hv51jz6Cs9Xdcoon9ybZF6x7DyaP7cwS44bJXR1W0YGWkD2WDrg3FwHex8cGObVk6BmT 3Udw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3jFoBRsAsX+9pzgvJlYVzP8D3RlTxpihzcYJJnubu1s=; fh=dI77rrcEY9c+ijBlptZNLv5U+ha6TL5FPN/XOI4+EVM=; b=ox3yv9+O7ZvX7XSG1sKF1s1sYr6VhaGI4ZjEUWvEXNR0rN29NErIlFyhPrb504zT0E /+TuZSH89G/P/+hnsAHUR0lf4E3201sO1Td8PxzlrMqjl/OLGXadqtNRxiiuuS7zqWaP HqH9MqZ0Aaz1x65JP3Q4R/k6kiPos+j8fcdijDdlt9BT0nIUE/d2O+xLr/8gOLFVT9JO 4maFtmF1zgAvQ/WCwMXX6AvhQpvePMDjGzWzXhh5YW1XsHKjBSOnVKCjX1t2xZSBszWj pxEnkebGUX7LQSHL96r4q3QRQxwZakYG9FONmBR00W4Tb7DdGgjBx0LKvPWy73pFvaLQ e+Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pnC5wW+m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id ha18-20020a17090af3d200b00278f2f6b412si9447334pjb.164.2023.10.03.03.21.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 03:21:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pnC5wW+m; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 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 out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id CA41E8249282; Tue, 3 Oct 2023 03:21:51 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbjJCKVs (ORCPT + 99 others); Tue, 3 Oct 2023 06:21:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231131AbjJCKVr (ORCPT ); Tue, 3 Oct 2023 06:21:47 -0400 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 773ACCC for ; Tue, 3 Oct 2023 03:21:42 -0700 (PDT) Received: by mail-ej1-x632.google.com with SMTP id a640c23a62f3a-9a9cd066db5so131177566b.0 for ; Tue, 03 Oct 2023 03:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696328500; x=1696933300; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=3jFoBRsAsX+9pzgvJlYVzP8D3RlTxpihzcYJJnubu1s=; b=pnC5wW+mvNOuLidS0IZ9BvGujwUiy4v9SEIjnMb8JfsHeDmD65tUg1t2GtDAnXZqBg +RKQsA9kLRA9MLRN5OaECQJNFVFE80zX5Wd+MM5F8O7auJ8pFD61ImNIik4f2qu3N7h3 F8hHTce9kNM5ENXlf6hhOUXrLcsS2RxdRiihUsC5/U9PRSrX+vN4l32OzZOGmwCsJagk U/c7/KgilALgzyio2WkyFrI7SbO/YgQuKZFmnPsKGsqsJhzR1+h40E3JojHqRmTYyPep +OUhH7ZI4zqO7VlSCxLeDVuhE/kFz3HV384fccdEwc3LQsygUO9h8KFYJQHXDEWrbDbM bX9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696328500; x=1696933300; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=3jFoBRsAsX+9pzgvJlYVzP8D3RlTxpihzcYJJnubu1s=; b=B426vuawuEsl9z5AB4OmPjZ6lus5nuiUZTn+HIHJ14XoFW0VApNvUYKUXm7Mh+QgVm NspMbsnLI25QYiu8NPprIelCX4n10woD2aqoFgjBHuCs/svB51MiEzi1O+Uuh8Sfpi8m qJ+qOKAg7sZyVQ9EfDgSiFR7T+Tc/B0dSnMQmN5Xgx4VtpZ8nBH+kWZAowj5TxZdiqy+ aKhXnTPJ/TwkcOTdB5C53EN3ZbaNIEdbg908D9B8SSsR3fYHrVPxMIAUHc5W3aBQbbhR slh0sSeBX8StlHjKkPa/vkRldgsvJgZMutAED9Sf6uYWEoCU294z7VbaAzAdAuvhlbG0 8/Ww== X-Gm-Message-State: AOJu0YzSfkkispMbC2DU7d4aqcOx7NUmTSi0qDesJymfy8yg0R5mpYbV ikFyv8QaMZuhaatNe8ET8O5R1w== X-Received: by 2002:a17:906:292a:b0:9a5:c9a8:1816 with SMTP id v10-20020a170906292a00b009a5c9a81816mr3541714ejd.58.1696328500554; Tue, 03 Oct 2023 03:21:40 -0700 (PDT) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id bv2-20020a170906b1c200b0098e78ff1a87sm802599ejb.120.2023.10.03.03.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 03:21:40 -0700 (PDT) Date: Tue, 3 Oct 2023 11:21:38 +0100 From: Daniel Thompson To: Flavio Suligoi Cc: Lee Jones , Jingoo Han , Helge Deller , Pavel Machek , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "dri-devel@lists.freedesktop.org" , "linux-leds@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-fbdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Rob Herring Subject: Re: [PATCH v3 1/2] dt-bindings: backlight: Add MPS MP3309C Message-ID: <20231003102138.GB69443@aspen.lan> References: <20230925122609.78849-1-f.suligoi@asem.it> <20230926130113.GB4356@aspen.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 03:21:52 -0700 (PDT) On Tue, Oct 03, 2023 at 09:43:15AM +0000, Flavio Suligoi wrote: > Hi Daniel, > > ... > > > > +required: > > > + - compatible > > > + - reg > > > + - max-brightness > > > > Why is this mandatory? > > > > There's no point in setting max-brightness when running in I2C mode (max- > > brightness should default to 31 in that case). > > > > > > > + - default-brightness > > > > Again. I'm not clear why this needs to be mandatory. > > > > > > Ok, you are right, I'll remove max-brightness and default-brightness > from required properties list. I think to change these properties, > for the pwm dimming, into a clearer: > > - brightness-levels (uint32) > - default-brightness-levels (uint32). > > For example: > > brightness-levels: > description: > Number of brightness levels. The actual brightness > level (PWM duty cycle) will be interpolated from 0 to this value. > 0 means a 0% duty cycle (darkest/off), while the brightness-levels represents > a 100% duty cycle (brightest). > $ref: /schemas/types.yaml#/definitions/uint32 > > default-brightness-level: > description: > The default brightness level (from 0 to brightness-levels) > $ref: /schemas/types.yaml#/definitions/uint32 > > Example: > brightness-levels = <10>; > default-brightness-level = <6>; > > What do you think about this solution? If you want to introduce a brightness-levels property then I would expect it to be defined with the same meaning as pwm-backlight (it's not relevant to the bindings but ideally it would be implemented by refactoring and reusing the code from pwm_bl.c). Same with default-brightness-level although I'm not sure why one wouldn't just use default-brightness for new bindings (doesn't default-brightness-level simply do exactly the same thing as default-brightness). Daniel.