Re: [PATCH dt-schema] schemas: i2c: add optional GPIO binding for SMBALERT# line

Wolfram Sang <[email protected]>
Newsgroups org.kernel.vger.devicetree-spec,org.kernel.vger.linux-i2c,org.kernel.vger.linux-renesas-soc
Message-ID <Zt_3WtlRP_5wt4PN@shikoro>
Hi Rob,

thanks for your review!

> I believe "gpios" is what was originally supported, but now it is
> preferred if GPIOs are used as interrupts then we use interrupts in
> DT.

I had this originally in my RFC[1]. I got convinced by Geert's arguments
because the DT snippet in the board DTS looked kinda ugly. The board
needs to override the DTSI of the SoC to replace "interrupts" with
"interrupts-extended":

===

 &i2c3	{
 	pinctrl-0 = <&i2c3_pins>;
 	pinctrl-names = "i2c-pwr";
+
+	/delete-property/ interrupts;
+	interrupts-extended = <&gic GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>, <&gpio1 26 IRQ_TYPE_EDGE_FALLING>;
+	interrupt-names = "main", "smbus_alert";
+
+	smbus;
 };

===

It works, though.

All the best,

   Wolfram

[1] http://patchwork.ozlabs.org/project/linux-i2c/patch/[email protected]/
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAmbf91YACgkQFA3kzBSg
KbYMIBAAhfr2PCCicOUH5J2Alx4C3Slvz8g8jWcV+Wc2oUkpNFQ9dBb4XaGryGDB
yaKyncFlXp52Nuap8WuClCg6PkxGDQ2m7QDEHPt3adt23WHENaflorE8NCTyIgWN
NZyjeZcBKFGJSVHVF8GQ6OiKF5nN3r83osKZBi5zk/XorZlSFE1qz8VonyvZ5IAP
kImLBW0GnPzS8rRNLGmyjMO5rEicOszqBeObPqB6xwXYqw55hccIdmuM6epWZCS3
/oc9WiuMGd9JXDJfZaJ4CaRFfP0UjiGyFR+AKIcR+CBh6C8y9Njv+CyU921zUICs
UT6RaEalhpvaiJ0ibvXsps3c273t0VJW1cvhThiTwuDtZydlxJbL0et4zzOzyGSm
syh44+071JflBUBVQDZW645DfnKIxlpAcDfzhgpHSbx0eOq9ODe7wZkKYnR/ag4X
u5iN7nwQu45FpxOIWPIPytrp45ReYpuweXzVUQ286AQmB+Cjiy/k+MExzoZMX/RR
Zz9NYJ0huLzAUGEm4OVz7KHBZxTlt6t5vZ+EYTMPQnng9Vl5/9vmdVQP1DjUVOca
eXtaUNeao8pV54bpW0sVWwnr/yRabI5MxnCmzMaHOyBq2HKUH1vBGBdLhbK5TjsT
l3OnJgXjhpVyQUWGK4Urs6kpSvTqHo2gAml6zGizPN9lMclU1iM=
=JUVA
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.