Skip to content

Commit bd8bb9f

Browse files
committed
Merge tag 'spi-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Pull spi fixes from Mark Brown: "A few small driver specific fixes, the most substantial one being the Tegra one which fixes spurious errors with default delays for chip select hold times" * tag 'spi-fix-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: spi-sun4i: fix early activation spi: tegra114: Use value to check for invalid delays spi: loopback-test: Do not split 1024-byte hexdumps
2 parents 8303d1a + fb98bd0 commit bd8bb9f

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

drivers/spi/spi-loopback-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ MODULE_LICENSE("GPL");
420420
static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t len)
421421
{
422422
/* limit the hex_dump */
423-
if (len < 1024) {
423+
if (len <= 1024) {
424424
print_hex_dump(KERN_INFO, pre,
425425
DUMP_PREFIX_OFFSET, 16, 1,
426426
ptr, len, 0);

drivers/spi/spi-sun4i.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,9 @@ static int sun4i_spi_transfer_one(struct spi_controller *host,
264264
else
265265
reg |= SUN4I_CTL_DHB;
266266

267+
/* Now that the settings are correct, enable the interface */
268+
reg |= SUN4I_CTL_ENABLE;
269+
267270
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
268271

269272
/* Ensure that we have a parent clock fast enough */
@@ -404,7 +407,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
404407
}
405408

406409
sun4i_spi_write(sspi, SUN4I_CTL_REG,
407-
SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
410+
SUN4I_CTL_MASTER | SUN4I_CTL_TP);
408411

409412
return 0;
410413

drivers/spi/spi-tegra114.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,9 +728,9 @@ static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
728728
u32 inactive_cycles;
729729
u8 cs_state;
730730

731-
if ((setup->unit && setup->unit != SPI_DELAY_UNIT_SCK) ||
732-
(hold->unit && hold->unit != SPI_DELAY_UNIT_SCK) ||
733-
(inactive->unit && inactive->unit != SPI_DELAY_UNIT_SCK)) {
731+
if ((setup->value && setup->unit != SPI_DELAY_UNIT_SCK) ||
732+
(hold->value && hold->unit != SPI_DELAY_UNIT_SCK) ||
733+
(inactive->value && inactive->unit != SPI_DELAY_UNIT_SCK)) {
734734
dev_err(&spi->dev,
735735
"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
736736
SPI_DELAY_UNIT_SCK);

0 commit comments

Comments
 (0)