Skip to content

Commit a52db65

Browse files
cricard13broonie
authored andcommitted
spi: pxa2xx: Fix cs_change management
Fix cs_change management so that it is in line with other spi drivers. In the spi core api helpers such as spi_bus_lock/unlock and spi_sync_locked or cs_change field in spi_transfer help to manage chip select from the device driver. The driver was setting the chip select to idle if the message queue was empty despite cs_change or other status field set by spi_bus_lock/unlock or spi_sync_locked. Signed-off-by: Christophe Ricard <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 8c3ad48 commit a52db65

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/spi/spi-pxa2xx.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,8 @@ static void giveback(struct driver_data *drv_data)
570570
/* see if the next and current messages point
571571
* to the same chip
572572
*/
573-
if (next_msg && next_msg->spi != msg->spi)
574-
next_msg = NULL;
575-
if (!next_msg || msg->state == ERROR_STATE)
573+
if ((next_msg && next_msg->spi != msg->spi) ||
574+
msg->state == ERROR_STATE)
576575
cs_deassert(drv_data);
577576
}
578577

0 commit comments

Comments
 (0)