From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C133C47E48 for ; Thu, 15 Jul 2021 12:22:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6715C6136E for ; Thu, 15 Jul 2021 12:22:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229620AbhGOMYy (ORCPT ); Thu, 15 Jul 2021 08:24:54 -0400 Received: from out5-smtp.messagingengine.com ([66.111.4.29]:33507 "EHLO out5-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236901AbhGOMYy (ORCPT ); Thu, 15 Jul 2021 08:24:54 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id D907E5C0158; Thu, 15 Jul 2021 08:22:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 15 Jul 2021 08:22:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=PDg43YNU05OfmkuqqhbhAq/PESd 1UoKkb4yl2APa8Jk=; b=TcR2ibaCdt8O3Zp6B+r5oshUQpksUXkdIaD17qK2Jgc 7PeeJPty7FrIWCMJOrUkqMeCv9xXlmPSWrNWDK5a7MnNavcGVKvjUUHYpmqP83jw ldgtoIGZb2Ew49WQzbVtVz/nvWteQPtLYjvgkx3smhDhu6Nm9CeUyubTk0dFfYev Qi6jgrKY0pSWicynhPaPMvRU6pjEy/CGagj61f6opWWwPOm2v6jUJWmeX+IrPeSz WdZDLTqKWHywUjKdM3PUNzw002bJjUXYMRIDYnZJ6d7qKs6d0JcpPenfdFZjj1z1 wYfhCQXCHD+1YqIyxOqcpuHDSj+UwJtSaZytkFPvSQQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=PDg43Y NU05OfmkuqqhbhAq/PESd1UoKkb4yl2APa8Jk=; b=SOIDxMbuhtSNvf+gJNv283 w4zObdevBN/1PWmuKiqUayk6mu+TAhiMWaz6TFipRWZiFajtrOJY5oMYzp65CPjy xK3cFQsFjsxKCBOtqctMuoRn5V6wNNSLfmmxjRFwsIpJAcXP2zdeU//xEUMNx16z khlbL97Hl+qxBAOpMjmr3awyuUbtQTnoEJqd125jrzgTWEAGaw/k9rcuXz1ldw/d +Qgjxguaj+EOAtNHuLT62UkUaLqXmrIwYMcvKYqXlVjXBUwzfRjKMHk8+qadc7y4 ZU/p2979zdRYDjm6UCGsAuWUhL0ecnNKu00oEM/4a852m1nx+6pER9zQTuC1KIWw == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtgdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeelkeeghefhuddtleejgfeljeffheffgfeijefhgfeufefhtdevteegheeiheeg udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 15 Jul 2021 08:21:59 -0400 (EDT) Date: Thu, 15 Jul 2021 14:21:57 +0200 From: Maxime Ripard To: Linus Walleij Cc: Jonathan Cameron , Jonathan Cameron , linux-iio , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring Subject: Re: [PATCH] iio: st-sensors: Update ST Sensor bindings Message-ID: <20210715122157.ws7rg67ebypzup4f@gilmour> References: <20210412122331.1631643-1-linus.walleij@linaro.org> <20210712130444.bois24oukqmxpg27@gilmour> <20210712145639.00004604@Huawei.com> <20210712141613.66hw4glnkqlw3n4d@gilmour> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jvow46iqgknp7rle" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --jvow46iqgknp7rle Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 14, 2021 at 10:26:39AM +0200, Linus Walleij wrote: > On Mon, Jul 12, 2021 at 4:16 PM Maxime Ripard wrote: >=20 > > > maxItems is set, but not minItems. > > > > Yeah, and if one is missing the other is added with the value of the > > other. > > > > What the schema enforces currently is that (for the common part) the > > interrupt list can be between 1 and 2 and then for a specific set of > > compatibles (including the LIS3MDL) it has to be exactly 2. >=20 > maxItems is not an intuitive naming to what it does so it creates > bugs like this :/ I mean, it's complicated. Both minItems and maxItems are required for all the items in the schema spec. In order to reduce the boilerplate, the tooling will add the other if one is missing, which can lead to things like this indeed. But the alternative is not really to just optionally use minItems, it's to have to always specify it, in all the schemas. > Can you fix so it works with your PinePhone DTS and send a patch? > Perhaps also add as an example so it doesn't happen again? Yeah, I can definitely do that, I'm not really sure what makes sense for the driver at this point though. > > Even the common part looks weird though, it says that it can handle up > > to three interrupts but has maxItems: 2? >=20 > Maybe just drop maxItems for now? Dropping minItems and maxItems on interrupts will enforce that there's only one interrupt, which isn't want we want either Maxime --jvow46iqgknp7rle Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYPAoZQAKCRDj7w1vZxhR xReKAQDu6O7p+bIwRjtIRz/tJmSwtS/GbHAUzfLQE8DmSzJhawEAtwDo0CN7ivMh kT1F3h+oLAejsnZi2XbNhPBFrRfI3go= =h2Ne -----END PGP SIGNATURE----- --jvow46iqgknp7rle--