Kamal Dasu 2cbd27267f
spi: bcm-qspi: check for valid cs before applying chip select
Apply only valid chip select value. This change fixes case where chip
select is set to initial value of '-1' during probe and  PM supend and
subsequent resume can try to use the value with undefined behaviour.
Also in case where gpio based chip select, the check in
bcm_qspi_chip_select() shall prevent undefined behaviour on resume.

Fixes: fa236a7ef240 ("spi: bcm-qspi: Add Broadcom MSPI driver")
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20220127185359.27322-1-kdasu.kdev@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2022-01-28 13:05:20 +00:00
..
2021-11-15 13:27:17 +00:00
2022-01-04 14:59:40 +00:00
2022-01-07 13:36:37 +00:00
2021-07-20 13:34:05 +01:00
2021-12-23 13:38:38 +00:00
2021-12-23 13:38:39 +00:00
2021-09-01 15:25:28 -07:00
2021-09-13 02:00:26 +01:00
2021-08-12 12:19:19 +01:00
2020-10-24 10:33:08 -07:00
2021-08-26 12:09:38 +01:00
2021-11-01 19:09:04 -07:00