soundwire: Add bank switch routine

SoundWire supports two registers banks. So, program the alternate bank
with new configuration and then performs bank switch.

Signed-off-by: Sanyog Kale <sanyog.r.kale@intel.com>
Signed-off-by: Shreyas NC <shreyas.nc@intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
Sanyog Kale
2018-04-26 18:38:28 +05:30
committed by Vinod Koul
parent 79df15b7d3
commit 99b8a5d608
4 changed files with 262 additions and 0 deletions

View File

@@ -78,6 +78,13 @@ int sdw_add_bus_master(struct sdw_bus *bus)
return ret;
}
/*
* Default active bank will be 0 as out of reset the Slaves have
* to start with bank 0 (Table 40 of Spec)
*/
bus->params.curr_bank = SDW_BANK0;
bus->params.next_bank = SDW_BANK1;
return 0;
}
EXPORT_SYMBOL(sdw_add_bus_master);