Skip to content
Commit dbecb436 authored by Steve Wilkins's avatar Steve Wilkins Committed by harish h
Browse files

spi: microchip-core: only disable SPI controller when register value change requires it

commit 8b703a8b8dc45052997e2387fc3f77c495a47b8a from
https://github.com/linux4microchip/linux.git linux-6.6-mchp+fpga

Setting up many of the registers for a new SPI transfer involves
unconditionally disabling the SPI controller, writing the register
value and re-enabling the controller. This is being done for registers
even when the value is unchanged and is also done for registers that
don't require the controller to be disabled for the change to take
effect. Make an effort to detect changes to the register values, and
only disables the controller if the new register value is different
and disabling the controller is required. This stops the controller
being repeated disabled and the bus going tristate before every
transfer.

Fixes: 9ac8d176

 ("spi: add support for microchip fpga spi controllers")
Signed-off-by: default avatarSteve Wilkins <steve.wilkins@raymarine.com>
Co-developed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarharish h <harish.h@windriver.com>
parent 24f018f4
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment