Linux-GPIO Archive mirror
 help / color / mirror / Atom feed
From: Marco Sirabella <marco@sirabella.org>
To: linux-kernel@vger.kernel.org
Cc: Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-gpio@vger.kernel.org, Jonathan Corbet <corbet@lwn.net>,
	Marco Sirabella <marco@sirabella.org>
Subject: [PATCH] Documentation: spi: Update gpio+bitbang instruction
Date: Sun, 14 Apr 2024 02:53:05 -0400	[thread overview]
Message-ID: <20240414065305.9796-1-marco@sirabella.org> (raw)

The way to do this was changed in
9b00bc7b901f (spi-gpio: Rewrite to use GPIO descriptors)
and there's no real docs outlining this,
update defunct #include "spi-gpio.c" instructions

Signed-off-by: Marco Sirabella <marco@sirabella.org>
---
 drivers/spi/spi-gpio.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index 909cce109bba..8c5f88f01db2 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -44,22 +44,13 @@ struct spi_gpio {
  * per transferred bit can make performance a problem, this code
  * is set up so that you can use it in either of two ways:
  *
- *   - The slow generic way:  set up platform_data to hold the GPIO
+ *   - The generic way:  set up platform_data to hold the GPIO
  *     numbers used for MISO/MOSI/SCK, and issue procedure calls for
  *     each of them.  This driver can handle several such busses.
  *
- *   - The quicker inlined way:  only helps with platform GPIO code
- *     that inlines operations for constant GPIOs.  This can give
- *     you tight (fast!) inner loops, but each such bus needs a
- *     new driver.  You'll define a new C file, with Makefile and
- *     Kconfig support; the C code can be a total of six lines:
- *
- *		#define DRIVER_NAME	"myboard_spi2"
- *		#define	SPI_MISO_GPIO	119
- *		#define	SPI_MOSI_GPIO	120
- *		#define	SPI_SCK_GPIO	121
- *		#define	SPI_N_CHIPSEL	4
- *		#include "spi-gpio.c"
+ *   - The inlined way:  manually set up and register a gpiod_lookup_table with
+ *     the appropriately labelled gpio pins "sck", "mosi", "miso" & an array
+ *     named "cs" before calling devm_spi_register_controller (XXX).
  */
 
 #ifndef DRIVER_NAME
-- 
2.43.2


             reply	other threads:[~2024-04-14  6:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-14  6:53 Marco Sirabella [this message]
2024-04-16 14:48 ` [PATCH] Documentation: spi: Update gpio+bitbang instruction Jonas Gorski

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=20240414065305.9796-1-marco@sirabella.org \
    --to=marco@sirabella.org \
    --cc=broonie@kernel.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@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 read-only IMAP folder(s) and NNTP newsgroup(s).