Re: [PATCH] spi: tegra114: initialize native chip selects inactive
Jon Hunter <[email protected]> Tue, 28 Jul 2026 22:09:43 +0100
| Newsgroups | org.kernel.vger.linux-tegra,org.kernel.vger.linux-kernel,org.kernel.vger.linux-spi |
|---|---|
| Message-ID | <[email protected]> |
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