Linux SPI subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Jonathan Santos <Jonathan.Santos@analog.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	dlechner@baylibre.com, nuno.sa@analog.com,
	michael.hennerich@analog.com, broonie@kernel.org,
	jonath4nns@gmail.com, marcelo.schmitt1@gmail.com,
	andy@kernel.org
Subject: Re: [PATCH 1/6] spi: support simultaneous assertion of multiple CS
Date: Tue, 14 Jul 2026 12:06:53 +0300	[thread overview]
Message-ID: <alX8LfOvZYuWNeXa@ashevche-desk.local> (raw)
In-Reply-To: <4a18b2d08916aebb3f8ac01d3c57679caf0e8caf.1783729282.git.Jonathan.Santos@analog.com>

On Tue, Jul 14, 2026 at 02:55:48AM -0300, Jonathan Santos wrote:
> Some SPI controllers allow multiple CS lines to be toggled at the same
> time. The existing code always used CS index 0 when tracking the last
> active CS in spi_set_cs(),

> and unconditionally set cs_index_mask to BIT(0) when parsing DT,

What about other cases (board info, ACPI and ancillary)?

So, the board info in case we need it, should be modified to take an array of
CSs. The ancillary seems by design a single-CS stuff, not sure if we ever would
need multi-CS. And for ACPI it is a gray area since the CS is 64-bit integer
there and theoretically we may interpret some higher bytes as amount of CS or
so, but this has to be specified.

TL;DR: Please, add a summary like the above to the commit message to explain
why those were not taken into account.

> both forcing the single CS usage.

> Modify spi_set_cs() to iterate last_cs[] using each logical CS index
> instead of always reading index 0. Modify of_spi_parse_dt() to build
> cs_index_mask from all parsed CS entries rather than hardcoding BIT(0),
> so the controller correctly identifies which CS lines belong to a device
> when asserting them simultaneously.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2026-07-14  9:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-14  5:55 [PATCH 0/6] spi: add multi-CS and per-transfer lane mask support Jonathan Santos
2026-07-14  5:55 ` [PATCH 1/6] spi: support simultaneous assertion of multiple CS Jonathan Santos
2026-07-14  9:06   ` Andy Shevchenko [this message]
2026-07-14  9:08   ` Nuno Sá
2026-07-14  5:56 ` [PATCH 2/6] spi: add per-transfer CS mask Jonathan Santos
2026-07-14  9:12   ` Nuno Sá
2026-07-14  9:23   ` Andy Shevchenko
2026-07-14  5:56 ` [PATCH 3/6] spi: spi-engine-ex: Add support for multi-CS devices Jonathan Santos
2026-07-14  9:17   ` Andy Shevchenko
2026-07-14  5:56 ` [PATCH 4/6] spi: Documentation: multiple-data-lanes: describe rx and tx lane mask Jonathan Santos
2026-07-14  5:56 ` [PATCH 5/6] spi: add rx and tx lane mask to spi_transfer struct Jonathan Santos
2026-07-14  9:22   ` Nuno Sá
2026-07-14  9:26   ` Andy Shevchenko
2026-07-14 15:18   ` David Lechner
2026-07-14  5:57 ` [PATCH 6/6] spi: axi-spi-engine: add support for dynamic multi-lane selection Jonathan Santos
2026-07-14 10:29   ` Nuno Sá
2026-07-14  8:57 ` [PATCH 0/6] spi: add multi-CS and per-transfer lane mask support Andy Shevchenko
2026-07-14 14:09   ` David Lechner
2026-07-14 14:26     ` Andy Shevchenko
2026-07-14 14:44       ` David Lechner
2026-07-14 10:29 ` Nuno Sá
2026-07-14 15:02   ` David Lechner

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=alX8LfOvZYuWNeXa@ashevche-desk.local \
    --to=andriy.shevchenko@intel.com \
    --cc=Jonathan.Santos@analog.com \
    --cc=andy@kernel.org \
    --cc=broonie@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jonath4nns@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    /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