diff mbox series

spi: cs42l43: Don't limit native CS to the first chip select

Message ID 20240306161004.2205113-1-ckeepax@opensource.cirrus.com
State Accepted
Commit 177cddaa5bdfcbc4c3d4594bb44ed8338765fc29
Headers show
Series spi: cs42l43: Don't limit native CS to the first chip select | expand

Commit Message

Charles Keepax March 6, 2024, 4:10 p.m. UTC
As the chip selects can be configured through ACPI/OF/swnode, and
the set_cs() callback will only be called when a native chip select
is being used, there is no reason for the driver to only support the
native chip select as the first chip select. Remove the check that
introduces this limitation.

Fixes: ef75e767167a ("spi: cs42l43: Add SPI controller support")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
 drivers/spi/spi-cs42l43.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown March 6, 2024, 10:14 p.m. UTC | #1
On Wed, 06 Mar 2024 16:10:04 +0000, Charles Keepax wrote:
> As the chip selects can be configured through ACPI/OF/swnode, and
> the set_cs() callback will only be called when a native chip select
> is being used, there is no reason for the driver to only support the
> native chip select as the first chip select. Remove the check that
> introduces this limitation.
> 
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: cs42l43: Don't limit native CS to the first chip select
      commit: 177cddaa5bdfcbc4c3d4594bb44ed8338765fc29

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/drivers/spi/spi-cs42l43.c b/drivers/spi/spi-cs42l43.c
index d45d9e2e16116..27c995b657f2c 100644
--- a/drivers/spi/spi-cs42l43.c
+++ b/drivers/spi/spi-cs42l43.c
@@ -148,8 +148,7 @@  static void cs42l43_set_cs(struct spi_device *spi, bool is_high)
 {
 	struct cs42l43_spi *priv = spi_controller_get_devdata(spi->controller);
 
-	if (spi_get_chipselect(spi, 0) == 0)
-		regmap_write(priv->regmap, CS42L43_SPI_CONFIG2, !is_high);
+	regmap_write(priv->regmap, CS42L43_SPI_CONFIG2, !is_high);
 }
 
 static int cs42l43_prepare_message(struct spi_controller *ctlr, struct spi_message *msg)