linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Menschel <menschel.p@posteo.de>
To: devicetree <devicetree@vger.kernel.org>, linux-spi@vger.kernel.org
Subject: Best practice for spidev in devicetree
Date: Sun, 10 Dec 2023 11:08:14 +0000	[thread overview]
Message-ID: <a3ae4bf8-a509-301b-d6ee-c015f12fe06e@posteo.de> (raw)


[-- 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 --]

                 reply	other threads:[~2023-12-10 11:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3ae4bf8-a509-301b-d6ee-c015f12fe06e@posteo.de \
    --to=menschel.p@posteo.de \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).