Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

spi: spi-omap2-mcspi.c: revert "Toggle CS after each word"

Commit 5cbc7ca987fb ("spi: spi-omap2-mcspi.c: Toggle CS after each
word") introduced the toggling of CS after each word for the omap2-mcspi
controller.

The implementation is not respectful of the actual spi_message
content, so the CS can be raised after each word even if the
transfer structure asks to keep the CS active for the whole operation.

As it is not used anyway in the current Linux tree, it can be safely
removed.

Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://msgid.link/r/20240327-spi-omap2-mcspi-multi-mode-v3-1-c4ac329dd5a2@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Louis Chauvet and committed by
Mark Brown
67bb37c0 d5449432

-18
-15
drivers/spi/spi-omap2-mcspi.c
··· 1175 1175 t->bits_per_word == spi->bits_per_word) 1176 1176 par_override = 0; 1177 1177 } 1178 - if (cd && cd->cs_per_word) { 1179 - chconf = mcspi->ctx.modulctrl; 1180 - chconf &= ~OMAP2_MCSPI_MODULCTRL_SINGLE; 1181 - mcspi_write_reg(ctlr, OMAP2_MCSPI_MODULCTRL, chconf); 1182 - mcspi->ctx.modulctrl = 1183 - mcspi_read_cs_reg(spi, OMAP2_MCSPI_MODULCTRL); 1184 - } 1185 1178 1186 1179 chconf = mcspi_cached_chconf0(spi); 1187 1180 chconf &= ~OMAP2_MCSPI_CHCONF_TRM_MASK; ··· 1231 1238 if (par_override) { 1232 1239 par_override = 0; 1233 1240 status = omap2_mcspi_setup_transfer(spi, NULL); 1234 - } 1235 - 1236 - if (cd && cd->cs_per_word) { 1237 - chconf = mcspi->ctx.modulctrl; 1238 - chconf |= OMAP2_MCSPI_MODULCTRL_SINGLE; 1239 - mcspi_write_reg(ctlr, OMAP2_MCSPI_MODULCTRL, chconf); 1240 - mcspi->ctx.modulctrl = 1241 - mcspi_read_cs_reg(spi, OMAP2_MCSPI_MODULCTRL); 1242 1241 } 1243 1242 1244 1243 omap2_mcspi_set_enable(spi, 0);
-3
include/linux/platform_data/spi-omap2-mcspi.h
··· 16 16 17 17 struct omap2_mcspi_device_config { 18 18 unsigned turbo_mode:1; 19 - 20 - /* toggle chip select after every word */ 21 - unsigned cs_per_word:1; 22 19 }; 23 20 24 21 #endif