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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63C54CA0EFD for ; Fri, 30 Aug 2024 18:25:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QDv/Rz8VJniucHFDKYvAQmfWzu1joIQoSJHsFtGtUMo=; b=gvYw+ohTTHiJMOoxyIB7yNmalq ytdopUmenGxSw/UOneygvU95vs5YTpszGchC1GqFeekFhXcviA0KfInp6WG5eWnmhd9FKZUgmHNBg j/jCpvjjwX2qW4lz1CxnxfuevW87lNOMs3sPUI5o03TyqggChtTutVJfMjefh33UpgjLutA1bSl/c lCX5HsQPtJGj20G0uGZAk7HQGVKn14WpRBGjuxL1klAGdkiEY4O+r0bVtxvto+6fnA5ouh1mJkrFv FIeqWVVtEpPZvfRXbzadVKskOcmbywxXEAv+17hwuKG3lPPY9D4QOp9vQWruHYWKCnhFIXQaTd3SV KtjKoqmA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk6JB-00000007KIH-3aSa; Fri, 30 Aug 2024 18:25:18 +0000 Received: from nyc.source.kernel.org ([147.75.193.91]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sk6IJ-00000007KCY-00sE for linux-arm-kernel@lists.infradead.org; Fri, 30 Aug 2024 18:24:24 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 2B5F0A4367D; Fri, 30 Aug 2024 18:24:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6F91C4CEC2; Fri, 30 Aug 2024 18:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1725042261; bh=u32ftu/mfLpMRTkCyzbPhIrEDF/8+LpV8WcZVnbI2Qw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jpr92px7tsAWyPY/TMMQmZHvM3AxhvQGcnAKnX2cGjDUrF4MqgeQXQeYOiStSQ9Yg aUWtdtrszMNuprAn50W/Tzbm0bXUdaXacOhJWPhBrKemwQTh0jgfsvDFFpNuecRPRV tM7XFpPOCRimeH6xfTlG2zCweOoDMR3VxVPhSD9U/KAnDvsJHbdKi+0MeMJ7NHlDyx WMacXW3rO+x99vBBSoOvYD5l1o4NkrIEH3tGYfN9QQNwyR73XPHeiQsj1tGEuehb51 TSA3Gum/Z0ZZ9bQbfbX8OhxGbzjYRTz9Hn4cs8Ef8UlZYpQAsO4YOIV7WlA2kT0J4Q AaovFlrdRd4+Q== Date: Fri, 30 Aug 2024 19:24:17 +0100 From: Conor Dooley To: Rob Herring Cc: Fabio Estevam , broonie@kernel.org, linux-spi@vger.kernel.org, otavio.salvador@ossystems.com.br, heiko@sntech.de, krzk+dt@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 2/2] dt-bindings: trivial-devices: Add a reference to spi-peripheral-props.yaml Message-ID: <20240830-swiftness-clover-24dca1262c32@spud> References: <20240829201315.3412759-1-festevam@gmail.com> <20240829201315.3412759-2-festevam@gmail.com> <20240830-anchor-glucose-f8dcc1b0fd16@spud> <20240830-rockfish-shun-da3e42b69f1d@spud> <20240830180509.GA565970-robh@kernel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TwRbPJ4+RhCeAFJu" Content-Disposition: inline In-Reply-To: <20240830180509.GA565970-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240830_112423_199771_011C7EC7 X-CRM114-Status: GOOD ( 37.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --TwRbPJ4+RhCeAFJu Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Aug 30, 2024 at 01:05:09PM -0500, Rob Herring wrote: > On Fri, Aug 30, 2024 at 04:17:02PM +0100, Conor Dooley wrote: > > On Fri, Aug 30, 2024 at 12:05:20PM -0300, Fabio Estevam wrote: > > > Hi Conor, > > >=20 > > > On Fri, Aug 30, 2024 at 11:14=E2=80=AFAM Conor Dooley wrote: > > >=20 > > > > Since those don't come from spi-peripheral-props, not really the co= rrect > > > > justification (although why they don't, I'm not sure). If you still= saw > > > > dtbs_check complaints after the first patch, I maybe the controller > > > > schema is missing a reference to spi-controller.yaml? > > >=20 > > > I changed the first patch as suggested: > > >=20 > > > --- a/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > > > +++ b/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml > > > @@ -29,6 +29,10 @@ properties: > > > description: > > > Chip select used by the device. > > >=20 > > > + spi-cpha: true > > > + > > > + spi-cpol: true > > > + > > > spi-cs-high: > > > $ref: /schemas/types.yaml#/definitions/flag > > > description: > > >=20 > > > spi-rockchip.yaml does reference spi-controller.yaml, but I still get > > > dtbs_check complaints after the first patch. > > >=20 > > > $ make CHECK_DTBS=3Dy rockchip/rv1108-elgin-r1.dtb -j12 > > > UPD include/config/kernel.release > > > SCHEMA Documentation/devicetree/bindings/processed-schema.json > > > DTC [C] arch/arm/boot/dts/rockchip/rv1108-elgin-r1.dtb > > > /home/fabio/linux-next/arch/arm/boot/dts/rockchip/rv1108-elgin-r1.dtb: > > > display@0: 'spi-cpha', 'spi-cpol' do not match any of the regexes: > > > 'pinctrl-[0-9]+' > > > from schema $id: http://devicetree.org/schemas/trivial-devices.yaml# > > >=20 > > > I would appreciate some suggestions on how to fix this warning. > >=20 > > Ah, I think I suggested something garbage, because I misread the diff, > > as my quoted mail evidences. I was really trying to suggest putting > > spi-cpha: true > > spi-cpol: true > > in trivial-devices.yaml, but I didn't notice that the patch was to > > spi-peripheral-props rather than trivial-devices. These properties are > > defined (for reasons I don't quite understand) in spi-controller.yaml > > and applied to children of the controller node by that binding and I > > wanted to avoid the redefinition. >=20 > I steered Fabio wrong... >=20 > I think we originally had these in spi-peripheral-props, but then=20 > decided they are properties of the device, not the controller. I don't follow, how would them being properties of the "device", make them unsuitable for spi-peripheral-props? Is the differentiation supposed to be that the things in spi-peripheral-props are actually there to do per-"device" tweaks for special controller features and the things applied by spi-controller to child nodes of SPI buses are the ones that describe requirements of the device? Even if that is a rather WTF responsibility distribution between files (partly that's down to naming), the usage does make sense. spi-peripheral-props can be unconditionally included by all SPI devices, since the controller determines what properties are relevant, and spa-cpha etc only get permitted when explicitly set as "true". > These=20 > properties should really only be needed if the device supports different= =20 > modes. If what a device supports is fixed, then that can be implicit. Right. That's very inconsistently done though, even if it makes sense. I'd wager there are very few devices that actually support both configurations but conversely very few drivers for active-high-only devices that don't rely on the spi-cs-active-high (or w/e it is) property to function correctly. I should send a patch for pcf2123 to make it required, because that is the one I know for sure requires active high off the top of my head. >=20 > There's one other case I see with "dh,dhcom-board". So I guess add=20 > spi-cpha and spi-cpol directly to trivial-devices.yaml. >=20 > Rob --TwRbPJ4+RhCeAFJu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRh246EGq/8RLhDjO14tDGHoIJi0gUCZtIOUQAKCRB4tDGHoIJi 0qWrAP41MxkRul04+1FJ1Xma4pGBB2xF0ngqVQ1rWd8BTTPAuAEAg2G1V3azTwyv gyshdN/zngROy4ZEiGcxqtnOv5tI8Ak= =emxH -----END PGP SIGNATURE----- --TwRbPJ4+RhCeAFJu--