spi: omap3_spi: Fix speed and mode selection
authorVignesh Raghavendra <vigneshr@ti.com>
Sun, 29 Nov 2020 07:23:05 +0000 (12:53 +0530)
committerLokesh Vutla <lokeshvutla@ti.com>
Tue, 12 Jan 2021 04:51:41 +0000 (10:21 +0530)
commitf3f83ad4caf4f4fb2394d70585a20ce56b552c5e
treea65f08243fd14a0132289e2fed9926ce1bbecc88
parent705082d4b1a2040c9f1ff2a7d5c4f2fccafde4bc
spi: omap3_spi: Fix speed and mode selection

McSPI IP provides per CS specific speed and mode selection. Therefore it
is possible to apply these settings only after CS is known. But
set_speed and set_mode can be called without bus being claimed, this
would lead driver to set up wrong CS (or previously used CS).

Fix this by apply set_speed and set_mode only if bus is already claimed.

Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
Tested-by: Miquel Raynal <miquel.raynal@bootlin.com>
drivers/spi/omap3_spi.c