mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Abraham Zukor <abe@maticrobots.com>,
	Mark Brown <broonie@kernel.org>,
	Laxman Dewangan <ldewangan@nvidia.com>
Cc: Thierry Reding <thierry.reding@kernel.org>,
	linux-spi@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi: tegra114: initialize native chip selects inactive
Date: Tue, 28 Jul 2026 22:09:43 +0100	[thread overview]
Message-ID: <0513a557-762e-4390-b5f3-84ac26a38de4@nvidia.com> (raw)
In-Reply-To: <20260728200316.1363536-1-abe@maticrobots.com>



On 28/07/2026 21:03, Abraham Zukor wrote:
> On 28/07/2026 10:34, Jon Hunter wrote:
>> Exactly. That's my point. Which is the right one? The answer is
>> probably neither, but whatever is present on the bus.
> 
> I think that defaulting to active-low is correct. The Tegra234 SPI
> controller hardware defaults to active-low (all bits in CS_POL_INACTIVE
> are set) so an active-high device is already asserted before this driver
> initializes. I checked the controller drivers under drivers/spi/; they
> either default to active-low or preserve the hardware default.

I am a bit reluctant to make this change after 10+ years of this driver 
being around.

> A more complex option is to scan the device tree children, check each
> item for whether it uses native chip select (as opposed to GPIO CS) and
> check for spi-cs-high. I found no other spi drivers that do this at
> probe time, and I don't think it's worth the complexity, but I can send
> it as a v2 if needed.

Right. Although this patch is specific to Tegra, I am guessing that 
other devices could also face similar issues and therefore, it would 
seem that having a generic facility to scan the devices would be ideal.

Jon

-- 
nvpublic


  reply	other threads:[~2026-07-28 21:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-25  4:29 Abraham Zukor
2026-07-27 12:07 ` Jon Hunter
2026-07-28  2:53   ` Abraham Zukor
2026-07-28  9:34     ` Jon Hunter
2026-07-28 20:03       ` Abraham Zukor
2026-07-28 21:09         ` Jon Hunter [this message]
2026-07-29 10:14           ` Mark Brown
2026-07-31  3:11           ` Abraham Zukor

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=0513a557-762e-4390-b5f3-84ac26a38de4@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=abe@maticrobots.com \
    --cc=broonie@kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@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

all inboxes | Powered by JetHome®