Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp995938rdb; Wed, 1 Nov 2023 08:32:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGGbkHxWPiYPM7NjueMnStDTl+v9oxeUpJV/D1Yj7yahuF8mbTFsc9+osU+njaypz0I5S5P X-Received: by 2002:a50:c35b:0:b0:543:65ab:2f09 with SMTP id q27-20020a50c35b000000b0054365ab2f09mr4414531edb.34.1698852724409; Wed, 01 Nov 2023 08:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698852724; cv=none; d=google.com; s=arc-20160816; b=K7nZBa/jwyNOzQO0LmCZ5Hfv4yO6vUxPmUWcejiZ1SG8J4y7+2LfpC7zk606AGhhq3 6HBSwHooTKFq3YCasWCj4FL8/l39NgJTFG2cPVgSRErMdsbS5QN9SR32FLTzHCpt5/zq MUlL703BZOooi84g8360noNLX9r33YcxFDPvTa0Sk2fRLQsBkf4qfH0LtTMPJJX5/VGa CzETfPQSE2oci6KIHjpq07GjFtFBunt2TWLxpTXjVWXZ2/bzIRLB4lQ1Rsq11NQDxPlv 9HlB6cEg77suqCT+RptbgsXzqFdTTQ0XfD03KG3MDbJ32nC8iRDazgpsYpqCWQSnBLim 954Q== 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=6hl6xx7YLVYkTA6KcJoWZFiLNCKaLQbVfmH328wNBgk=; fh=2usdmik8hyRAIaaqi0kKqVztHbVgrNzenazAVA48qyM=; b=JAIiWsxDRJHqYrXRZA/lN6OcWEFWKP8Jex9k4YjUa7GeziU1ZAbXUmdR6zjqmMJX9Z 0Ic4vZDPNxgLUMio0Ip8FSRmW9mKh7jWmHkK+PgVQVT4TBndMuLsmppP7Ozb3y9NANci TnQDfXyN/YRmiJfinpCrgoSGORe+0u7FWr1OTCOnLcQURMKDMFfnUJ+dh6L1d96WYYPs gflBd37GXv0kFoWw0pP3/jo1klASi4YILzv5+RoN5XUeDeGJyiKL6szSlTcNP9Tsd5QH IbAMbCb8p28k8baJ5l4QmUvO9fv9Iitw8PsIiPmOLhbXKggrplpr1Uy1lSJQ9P0qO+eP GKMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hCvUC4go; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id r26-20020a50d69a000000b00542dd7c98d8si764008edi.469.2023.11.01.08.32.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Nov 2023 08:32:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hCvUC4go; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 00F2680CCDA7; Wed, 1 Nov 2023 08:32:01 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234278AbjKAPbj (ORCPT + 99 others); Wed, 1 Nov 2023 11:31:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234230AbjKAPbh (ORCPT ); Wed, 1 Nov 2023 11:31:37 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2721EFD; Wed, 1 Nov 2023 08:31:33 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EECFC433C9; Wed, 1 Nov 2023 15:31:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1698852692; bh=vjjyywND5E0nGl8R6otdVK2p1h8xHUttV9JxvhMw878=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hCvUC4gooypOVIelQeuOF2Z9IIDRyuY+Cf8nEkEOluf0G9488v61ELQV747tB4wGo +UqslL1TieSfwYfJDZMPoPohWIbl0Xyd1Hg6gWyX5XYUtD+wMcyo7/ix4UAYjtJeEG CCN1PbZgdC905Gc3IT7NRcP/IvCx81Ww0ix36mwfJtxV8tgyXaXwl8iOJM54WSFqdX DgO7Rv+hl98L86RtN/ZpNtZAgBd0xNKIUZsh9ZBakBK/3HbINvB4H6+iFXq25vKFBt 0VkjtkCSC1O+zJkzMdemMI83Fpf55fiEQErGNi5TOap2TNewCCDZi4coQqrnCp6i8w a01LwcbOCiwtQ== Date: Wed, 1 Nov 2023 15:31:28 +0000 From: Conor Dooley To: Dmitry Rokosov Cc: lee@kernel.org, pavel@ucw.cz, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, andy.shevchenko@gmail.com, kernel@sberdevices.ru, rockosov@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org Subject: Re: [PATCH v3 11/11] dt-bindings: leds: aw200xx: fix led pattern and add reg constraints Message-ID: <20231101-subzero-grimace-52a10da6a445@spud> References: <20231101142445.8753-1-ddrokosov@salutedevices.com> <20231101142445.8753-12-ddrokosov@salutedevices.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="1xbOXPLYaVpKggRe" Content-Disposition: inline In-Reply-To: <20231101142445.8753-12-ddrokosov@salutedevices.com> X-Spam-Status: No, score=-1.6 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Wed, 01 Nov 2023 08:32:01 -0700 (PDT) --1xbOXPLYaVpKggRe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 01, 2023 at 05:24:45PM +0300, Dmitry Rokosov wrote: > AW200XX controllers have the capability to declare more than 0xf LEDs, > therefore, it is necessary to accept LED names using an appropriate > regex pattern. >=20 > The register offsets can be adjusted within the specified range, with > the maximum value corresponding to the highest number of LEDs that can > be connected to the controller. >=20 > Fixes: e338a05e76ca ("dt-bindings: leds: Add binding for AW200xx") > Signed-off-by: Dmitry Rokosov You did correctly guess what I was getting at on the previous version. Apologies for not replying - I got sick and things probably fell a bit through the cracks. Reviewed-by: Conor Dooley Cheers, Conor. > --- > .../bindings/leds/awinic,aw200xx.yaml | 64 +++++++++++++++++-- > 1 file changed, 58 insertions(+), 6 deletions(-) >=20 > diff --git a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml b= /Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml > index 67c1d960db1d..ba4511664fb8 100644 > --- a/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml > +++ b/Documentation/devicetree/bindings/leds/awinic,aw200xx.yaml > @@ -45,17 +45,12 @@ properties: > maxItems: 1 > =20 > patternProperties: > - "^led@[0-9a-f]$": > + "^led@[0-9a-f]+$": > type: object > $ref: common.yaml# > unevaluatedProperties: false > =20 > properties: > - reg: > - description: > - LED number > - maxItems: 1 > - > led-max-microamp: > default: 9780 > description: | > @@ -69,6 +64,63 @@ patternProperties: > where max-current-switch-number is determinated by led configu= ration > and depends on how leds are physically connected to the led dr= iver. > =20 > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: awinic,aw20036 > + then: > + patternProperties: > + "^led@[0-9a-f]+$": > + properties: > + reg: > + items: > + minimum: 0 > + maximum: 36 > + > + - if: > + properties: > + compatible: > + contains: > + const: awinic,aw20054 > + then: > + patternProperties: > + "^led@[0-9a-f]+$": > + properties: > + reg: > + items: > + minimum: 0 > + maximum: 54 > + > + - if: > + properties: > + compatible: > + contains: > + const: awinic,aw20072 > + then: > + patternProperties: > + "^led@[0-9a-f]+$": > + properties: > + reg: > + items: > + minimum: 0 > + maximum: 72 > + > + - if: > + properties: > + compatible: > + contains: > + const: awinic,aw20108 > + then: > + patternProperties: > + "^led@[0-9a-f]+$": > + properties: > + reg: > + items: > + minimum: 0 > + maximum: 108 > + > required: > - compatible > - reg > --=20 > 2.36.0 >=20 --1xbOXPLYaVpKggRe Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZUJvTwAKCRB4tDGHoIJi 0qfBAQC7asF9LbGsYBe+8Gmm6D5cOPSXw2/cpSRRTNuss80nbwEAoP0kiiUoAaTk 3Yv6Js+KjIequ9AYtOpNeVYxTdENRQg= =nWPC -----END PGP SIGNATURE----- --1xbOXPLYaVpKggRe--