soundwire: cadence: add clock_stop/restart routines
authorRander Wang <rander.wang@intel.com>
Tue, 17 Mar 2020 16:33:17 +0000 (11:33 -0500)
committerVinod Koul <vkoul@kernel.org>
Thu, 19 Mar 2020 07:13:03 +0000 (12:43 +0530)
commit1032504f22acb92671cfbd06c0dc419b9f0c7976
tree20d4929b4a000add1ca0d949a083f60eedce637c
parent9bc87cce9426964aa0cc406419bd6f70e8393ed0
soundwire: cadence: add clock_stop/restart routines

Add support for clock stop and restart, with two configuration
parameters:

1) when entering the ClockStop mode, Slave-initiated wakes can be
prevented.

2) When exiting the ClockStop mode, the caller can request a Bus Reset
(either if all Slaves were configured in ClockStopMode1 or the Master
IP lost context and enumeration is required)

The code handles the case where no Slaves are present by configuring
the IP to treat COMMAND_IGNORED as success.

The exit_reset part can be dealt with in the caller, along with the
required syncArm/syncGo sequence in multi-link mode.

Signed-off-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200317163329.25501-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c
drivers/soundwire/cadence_master.h