linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Best practice for spidev in devicetree
@ 2023-12-10 11:08 Patrick Menschel
  0 siblings, 0 replies; only message in thread
From: Patrick Menschel @ 2023-12-10 11:08 UTC (permalink / raw)
  To: devicetree, linux-spi


[-- Attachment #1.1: Type: text/plain, Size: 959 bytes --]

Hello,

I need guidance towards best practice in defining a spidev device in a 
devicetree.

I came up with

https://github.com/beagleboard/BeagleBoard-DeviceTrees/pull/67/commits/ef496f62e7df60513ffa6cb01b5bb383718dcd05

+&spi1 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi1_pins>;
+
+       channel@0 {
+               /* external S1.0 connector JST-SH 6pin */
+               compatible = "spidev";
+               reg = <0>;
+       };
+
+       channel@1 {
+               /* external S1.1 connector JST-SH 6pin */
+               compatible = "spidev";
+               reg = <1>;
+       };
+};
.
Means I leave the original spi1 driver alone and set the channels to 
"spidev", yet

https://www.kernel.org/doc/html/latest/spi/spidev.html

says, it's discouraged while keeping silent about what is to be done in 
a device tree.

Thank you.

Best Regards,
Patrick Menschel


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-10 11:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-10 11:08 Best practice for spidev in devicetree Patrick Menschel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).