Received: by 2002:a05:7412:251c:b0:e2:908c:2ebd with SMTP id w28csp1100178rda; Mon, 23 Oct 2023 02:28:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGyDctWFsbH660zLv0GdFHGFpJWCpg3wpn18xLQjAcMa4w/kawdMWoP2aBQlvrHNdhVZw4L X-Received: by 2002:a17:90a:17c4:b0:27d:3c75:db02 with SMTP id q62-20020a17090a17c400b0027d3c75db02mr8268562pja.32.1698053315160; Mon, 23 Oct 2023 02:28:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698053315; cv=pass; d=google.com; s=arc-20160816; b=AwqRzj3OmmFV43wqOPhPPLI4/TY0s9s0pi5XQY8CnBpjICCDGa9OAqm7uiRb8f+hbS OHoOD/Gv67f6VYpN1yE32q3BXEUo+aGmQANi9W4z5tUVNb0vL3TI0ptxDVshmU1yWbpe JNP3Q8SAng6Ko0guxXmBMBm6oEsfmn4CKnsvYE8ddkYORn4/XH5OJE61MnT6S08C3USK toja/SGorCDEhcFXYBLjvV0XIymBfFEGzNj6HPHmNFUX2rTTvuRpxOUeboadsbaduUY4 qI2LdQA67lxhuQIalyysHh/MZiqFaqOlfEw3GZunPuLYcY/ih0IjHNP2oOcqIgIqXu/R bL/A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=MIIeTQCFPpQtVJcL0dcK8tvcoMmRPwh+pvHrOHOwcQw=; fh=KOl1LGcUzgtEk+4HJx5c3lCkc8WtHoWtuSSXOmDTyMM=; b=Pwhle5ur/cG756xM28NKjFvUGrD8CvpGQEgyOTrAHOuGXPFphNFyuncDyJN/bCppMh 3PHcU819cB8DoOtLxf5jImp7Zz5ZNjsthzr0JTNETp2c82WFN1T1k9B74nfYDnagVDRA 8Hvzops/B9Sq2awZrtNPd8faRlNZ/JYuZ03OgBomfECnnikoEUg7GGkiX8PXocyaVCLY V+42sD4TkXZ5jY4e+nTtVNkd6Y9yOlLnYh4VORhkYC9jY8peypmyaMt5Jk8zbDvokO3l FRAIbu33fmCjXaRXgXdXaPs1at36TaZo+iAexOsZ3+3khuDEwG0NP+fKDwT/vcwh6625 M5eA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@asem.it header.s=selector1 header.b=hYPjWcfB; arc=pass (i=1 spf=pass spfdomain=asem.it dkim=pass dkdomain=asem.it dmarc=pass fromdomain=asem.it); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=asem.it Return-Path: Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id qe3-20020a17090b4f8300b00278f81e54cdsi9365096pjb.19.2023.10.23.02.28.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Oct 2023 02:28:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@asem.it header.s=selector1 header.b=hYPjWcfB; arc=pass (i=1 spf=pass spfdomain=asem.it dkim=pass dkdomain=asem.it dmarc=pass fromdomain=asem.it); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=asem.it Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 76A17809D445; Mon, 23 Oct 2023 02:28:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232716AbjJWJ2M (ORCPT + 99 others); Mon, 23 Oct 2023 05:28:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbjJWJ2K (ORCPT ); Mon, 23 Oct 2023 05:28:10 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2043.outbound.protection.outlook.com [40.107.20.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C588897; Mon, 23 Oct 2023 02:28:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c3dmJt1zBrhQZb4f6b/PELRQIbU0TioEevlCp88sdYfQ4X1ZQBah938rSH1NeewLdgwEgZqWYaZ2Jj9zCw7dNxWLMVmcMB+cQ54K5LX+OakzBcNYZONqJg7QIr3lh3DA5ODohLzQuT8sgoAb3zL9NVtOWilcWOkksT1EzJxT0uiPdDiyhAtQlGVR7hsC6okkSvrAUcyP2RZYXQ8HFSl8HV9zqAs7bi0Y3uugACPePSqtWbZAJFc0DFrVn/idUpwDB6mWJzQHvixHD4gXMAAE5qQ8qjRsWHwSh8pnHwds3BMi5ygN765jTL87r6hu+u1zpmhsX8vXtNY7QefYpM9LUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=MIIeTQCFPpQtVJcL0dcK8tvcoMmRPwh+pvHrOHOwcQw=; b=mbT2+JqaGBy3WqBq/jkCypfd815uFZex8qZJbYcfje3jONul5VFhT7sm9r8dNbUpbyruZz+XRYnJLJ4u4k4AnHxlSLgvjMhrpZfPm2FRioTOamQUDGvunX5Y9lvCEgzaAlz0N7MHNw5//B+pDzjVNYVPiwbMAQrCwOyOxreyMuBU1opwEmN4IzzpEXGM5UaD7YQV7K+kMIT1rB+Krt6Qk3zteD7qGlzzNI2ehDGq1uKFbQRHPr0L6K3JFCnRVCwxNiFuoWKoJ5UB4lPHehGmApD+E/4jPDY3HVafD/wiMxtI0HgaTbj5skbHSpC3IyZU3d46xU4RN5gvsFAKarcsag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=asem.it; dmarc=pass action=none header.from=asem.it; dkim=pass header.d=asem.it; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=asem.it; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MIIeTQCFPpQtVJcL0dcK8tvcoMmRPwh+pvHrOHOwcQw=; b=hYPjWcfBEMCvXfLPSI++rMpnSuPFYtPDFqCDKxbetgKlYp2pNJDudVGtG8AVG7Or4OF7OKHonpcrS7Fg3axTW+Is6jiTPhENr4vZymvnkrlG2d3JrhXrCkGqt1GFiHby99edpelNh1ziifZJK7Sgw+N43ayV6bf/dgIggikBTwQ= Received: from DU2PR01MB8034.eurprd01.prod.exchangelabs.com (2603:10a6:10:273::14) by PA4PR01MB8993.eurprd01.prod.exchangelabs.com (2603:10a6:102:2a5::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33; Mon, 23 Oct 2023 09:28:03 +0000 Received: from DU2PR01MB8034.eurprd01.prod.exchangelabs.com ([fe80::ad2b:a1e7:8828:ba2f]) by DU2PR01MB8034.eurprd01.prod.exchangelabs.com ([fe80::ad2b:a1e7:8828:ba2f%7]) with mapi id 15.20.6907.032; Mon, 23 Oct 2023 09:28:03 +0000 From: Flavio Suligoi To: Conor Dooley CC: Lee Jones , Daniel Thompson , 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" Subject: RE: [PATCH 1/1] dt-bindings: backlight: mp3309c: remove two required properties Thread-Topic: [PATCH 1/1] dt-bindings: backlight: mp3309c: remove two required properties Thread-Index: AQHaA10IhwE5ZkDArkS4RoPMFlMBm7BS1g+AgARFCAA= Date: Mon, 23 Oct 2023 09:28:03 +0000 Message-ID: References: <20231020135434.2598578-1-f.suligoi@asem.it> <20231020135434.2598578-2-f.suligoi@asem.it> <20231020-moonrise-senate-86d0edb2d404@spud> In-Reply-To: <20231020-moonrise-senate-86d0edb2d404@spud> Accept-Language: it-IT, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=asem.it; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DU2PR01MB8034:EE_|PA4PR01MB8993:EE_ x-ms-office365-filtering-correlation-id: eb3e2b97-e52a-4bfa-5409-08dbd3aa5b73 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: DZ8r1WpLSXZIAIAl4E/XHyDixUhJD8TIsbJX118j1P9WBT/9Aod6K/Jvbexe51AQhjyJ2TsF0ahczSDlCROag7v8VnTmdRT0/zj1Hx1m+RkYUGklgHN7KX6zF89WfzydCLzig2bk66DYqSbMAOyoXfGJNlJOPF6yDInSn/nzOvNKNJRrnkUfel4UpSEb1a8XD7OYKTkYbzNCf3Rqn4ag/WA1VWTYfjmxUvSjMqp1sNU6X36GDbyWr7oT0oH6y3MPDjnkdb+gf4k81oTsS2C1cKu638jPAFK6fHvXYP1Tjt6KTv9+gkEkyVCSjIckSl/eEZRnUsiBhaEmJ2EgSABg2iw77b19L220v9lAGwcKSd0XO/D2VGPfmuvepGrk2tVdXghtUIoicschaDUeeJlSdoRtMlmuNKgYstKZ48/N3yXeUVVF0wqENOqReooblMEcObX5D3SeLzJyLbqCI2E2hHrI+2s6JPd7EcObelX6WSHM02iUZJaVoNRcMEnJ+XrP9n4Pq2T4eRlFEixyqZnfeNuZL01TWteY/DdprK7MD9hrm/rfbFg3C1U1h2ObwJXBc0JQRCyx0C8yv26tzuhDwMB96HFVBWStOJGfeU7qsAE= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR01MB8034.eurprd01.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(136003)(346002)(39840400004)(396003)(366004)(230922051799003)(451199024)(1800799009)(186009)(64100799003)(26005)(38070700009)(38100700002)(2906002)(55016003)(41300700001)(86362001)(52536014)(5660300002)(7416002)(8676002)(8936002)(33656002)(4326008)(7696005)(6506007)(71200400001)(478600001)(122000001)(66476007)(6916009)(66946007)(316002)(76116006)(54906003)(64756008)(66446008)(66556008)(83380400001)(966005)(9686003);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?H+vv07Mkm505hq2oxnZ7TOJWr6dZDquYHE5F4lV62nLkIdu8OxnprXExdjEX?= =?us-ascii?Q?H3SjQjWtJV52NirpycnNKqv/xhdpp26bsijNSuPRvRicsi0bfr80UQMvfHx5?= =?us-ascii?Q?l/h2WMgyiaG9z9vks3eXzHvaF9ygbAEGf0SwOrQdmDtU0xCCgWAs1WYzWAaN?= =?us-ascii?Q?q47omqkufj59PoYUNRlEAWDIebPjWxw15GlpLW4nckUS3CrueLyYXwR7A4Em?= =?us-ascii?Q?ybo4bTN5pSA9NpQcwWMuLBteMune1wK8kP+9NMVl/jZ4jyz9Omi7B0U+hmnn?= =?us-ascii?Q?uvUEpHMDO1cKaqyEULuAuWUFVAiAe1lI8qQpzE39ydh4g4P9Sra1h9+VLlkp?= =?us-ascii?Q?7rQX/iNx+10wy4rXJsqileRJrJJpeA6HmXB/N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Ec7SyFuDgz6XydL/bK4MJvgI/obA+qA8xsBX2cpNl6X?= =?us-ascii?Q?n2zhCXhvFuGTWUzlK+G+p94lVOnxgovRJHjCXXphos653qGu2cNwkXtun2Xa?= =?us-ascii?Q?jqbBnPAdn7b8NunPQAwEsyEPK3yOgGw1Ujded3p+r9q7oADM5L4htDjrPppM?= =?us-ascii?Q?OY85OfAouMOhbo59hyXtztkwP0jjVAe/nnJolg8GU6Q/Y7gqGgXQiPHSPEVb?= =?us-ascii?Q?s938FLYN62liAvttghoOf2766BfKqMVm5YDWUcxY1oQmMf3bT7/k+VvMaRp0?= =?us-ascii?Q?TFu2OvLGpbfh6hI2Wmk=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: asem.it X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DU2PR01MB8034.eurprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb3e2b97-e52a-4bfa-5409-08dbd3aa5b73 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Oct 2023 09:28:03.4908 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: d0a766c6-7992-4344-a4a2-a467a7bb1ed2 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +5l3ihTdy+/skH0RcsuEZgNS1LVUDCboabDMJs2aGVy4BgWsD0HQ+7C/otgkGK/diVE4bXm+KCpH6b6Ug1yEbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR01MB8993 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Mon, 23 Oct 2023 02:28:19 -0700 (PDT) Hi Conor, ... > On Fri, Oct 20, 2023 at 03:54:33PM +0200, Flavio Suligoi wrote: > > The two properties: > > > > - max-brightness > > - default brightness > > > > are not really required, so they can be removed from the "required" > > section. >=20 > Why are they not required? You need to provide an explanation. The "max-brightness" is not more used now in the driver (I used it in the f= irst version of the driver). The "default-brightness", if omitted in the DT, is managed by the device dr= iver, using a default value. This depends on the dimming mode used: - for the "analog mode", via I2C commands, this value is fixed by hardware = (=3D31) - while in case of pwm mode the default used is the last value of the=20 brightness-levels array. Also the brightness-levels array is not required; if it is omitted, the dri= ver uses=20 a default array of 0..255 and the "default-brightness" is the last one, whi= ch is "255". > > Other changes: > > > > - improve the backlight working mode description, in the "description" > > section >=20 > > - update the example, removing the "max-brightness" and introducing the > > "brightess-levels" property >=20 > Why is this more useful? I introduced the "brightness-levels" instead of "max-brightness" for homoge= neity, since the "analog mode" dimming has a brightness-levels array fixed by hard= ware (0..31). In this way also the "pwm" mode can use the same concepts of array of level= s. >=20 > Cheers, > Conor. Thanks for your help. Flavio. >=20 > > > > Signed-off-by: Flavio Suligoi > > --- > > .../bindings/leds/backlight/mps,mp3309c.yaml | 10 ++++------ > > 1 file changed, 4 insertions(+), 6 deletions(-) > > > > diff --git > a/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml > b/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml > > index 4191e33626f5..527a37368ed7 100644 > > --- > a/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml > > +++ > b/Documentation/devicetree/bindings/leds/backlight/mps,mp3309c.yaml > > @@ -14,8 +14,8 @@ description: | > > programmable switching frequency to optimize efficiency. > > It supports two different dimming modes: > > > > - - analog mode, via I2C commands (default) > > - - PWM controlled mode. > > + - analog mode, via I2C commands, as default mode (32 dimming levels) > > + - PWM controlled mode (optional) > > > > The datasheet is available at: > > https://www.monolithicpower.com/en/mp3309c.html > > @@ -50,8 +50,6 @@ properties: > > required: > > - compatible > > - reg > > - - max-brightness > > - - default-brightness > > > > unevaluatedProperties: false > > > > @@ -66,8 +64,8 @@ examples: > > compatible =3D "mps,mp3309c"; > > reg =3D <0x17>; > > pwms =3D <&pwm1 0 3333333 0>; /* 300 Hz --> (1/f) * 1*10^9= */ > > - max-brightness =3D <100>; > > - default-brightness =3D <80>; > > + brightness-levels =3D <0 4 8 16 32 64 128 255>; > > + default-brightness =3D <6>; > > mps,overvoltage-protection-microvolt =3D <24000000>; > > }; > > }; > > -- > > 2.34.1 > >