mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
ASoC: cs42l42: Use new SoundWire enumeration helper
Update the driver to use the new core helper that waits for the device to enumerate on SoundWire and be initialised by the SoundWire core. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260512103022.1154645-4-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9dc2b0d599
commit
47e2f687b0
|
|
@ -433,19 +433,16 @@ static const struct reg_sequence cs42l42_soft_reboot_seq[] = {
|
|||
static int cs42l42_sdw_handle_unattach(struct cs42l42_private *cs42l42)
|
||||
{
|
||||
struct sdw_slave *peripheral = cs42l42->sdw_peripheral;
|
||||
int ret;
|
||||
|
||||
if (!peripheral->unattach_request)
|
||||
return 0;
|
||||
|
||||
/* Cannot access registers until master re-attaches. */
|
||||
dev_dbg(&peripheral->dev, "Wait for initialization_complete\n");
|
||||
if (!wait_for_completion_timeout(&peripheral->initialization_complete,
|
||||
msecs_to_jiffies(5000))) {
|
||||
dev_err(&peripheral->dev, "initialization_complete timed out\n");
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
|
||||
peripheral->unattach_request = 0;
|
||||
ret = sdw_slave_wait_for_init(peripheral, 5000);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
/*
|
||||
* After a bus reset there must be a reconfiguration reset to
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user