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
This commit is contained in:
@@ -420,7 +420,7 @@ MODULE_LICENSE("GPL");
|
||||
static void spi_test_print_hex_dump(char *pre, const void *ptr, size_t len)
|
||||
{
|
||||
/* limit the hex_dump */
|
||||
if (len < 1024) {
|
||||
if (len <= 1024) {
|
||||
print_hex_dump(KERN_INFO, pre,
|
||||
DUMP_PREFIX_OFFSET, 16, 1,
|
||||
ptr, len, 0);
|
||||
|
||||
@@ -264,6 +264,9 @@ static int sun4i_spi_transfer_one(struct spi_controller *host,
|
||||
else
|
||||
reg |= SUN4I_CTL_DHB;
|
||||
|
||||
/* Now that the settings are correct, enable the interface */
|
||||
reg |= SUN4I_CTL_ENABLE;
|
||||
|
||||
sun4i_spi_write(sspi, SUN4I_CTL_REG, reg);
|
||||
|
||||
/* Ensure that we have a parent clock fast enough */
|
||||
@@ -404,7 +407,7 @@ static int sun4i_spi_runtime_resume(struct device *dev)
|
||||
}
|
||||
|
||||
sun4i_spi_write(sspi, SUN4I_CTL_REG,
|
||||
SUN4I_CTL_ENABLE | SUN4I_CTL_MASTER | SUN4I_CTL_TP);
|
||||
SUN4I_CTL_MASTER | SUN4I_CTL_TP);
|
||||
|
||||
return 0;
|
||||
|
||||
|
||||
@@ -728,9 +728,9 @@ static int tegra_spi_set_hw_cs_timing(struct spi_device *spi)
|
||||
u32 inactive_cycles;
|
||||
u8 cs_state;
|
||||
|
||||
if ((setup->unit && setup->unit != SPI_DELAY_UNIT_SCK) ||
|
||||
(hold->unit && hold->unit != SPI_DELAY_UNIT_SCK) ||
|
||||
(inactive->unit && inactive->unit != SPI_DELAY_UNIT_SCK)) {
|
||||
if ((setup->value && setup->unit != SPI_DELAY_UNIT_SCK) ||
|
||||
(hold->value && hold->unit != SPI_DELAY_UNIT_SCK) ||
|
||||
(inactive->value && inactive->unit != SPI_DELAY_UNIT_SCK)) {
|
||||
dev_err(&spi->dev,
|
||||
"Invalid delay unit %d, should be SPI_DELAY_UNIT_SCK\n",
|
||||
SPI_DELAY_UNIT_SCK);
|
||||
|
||||
Reference in New Issue
Block a user