OpenCloudOS-Kernel/drivers/soundwire
Pierre-Louis Bossart 740a6059c3 soundwire: cadence: re-check Peripheral status with delayed_work
[ Upstream commit f8c35d61ba01afa76846905c67862cdace7f66b0 ]

The SoundWire peripheral enumeration is entirely based on interrupts,
more specifically sticky bits tracking state changes.

This patch adds a defensive programming check on the actual status
reported in PING frames. If for some reason an interrupt was lost or
delayed, the delayed work would detect a peripheral change of status
after the bus starts.

The 100ms defined for the delay is not completely arbitrary, if a
Peripheral didn't join the bus within that delay then probably the
hardware link is broken, and conversely if the detection didn't happen
because of software issues the 100ms is still acceptable in terms of
user experience.

The overhead of the one-shot workqueue is minimal, and the mutual
exclusion ensures that the interrupt and delayed work cannot update
the status concurrently.

Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20240805114921.88007-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-17 15:24:18 +02:00
..
Kconfig soundwire: intel_ace2x: fix SND_SOC_SOF_HDA_MLINK dependency 2023-06-21 16:19:44 +05:30
Makefile soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
amd_manager.c soundwire: amd: fix for wake interrupt handling for clockstop mode 2024-05-02 16:32:47 +02:00
amd_manager.h soundwire: amd: fix for wake interrupt handling for clockstop mode 2024-05-02 16:32:47 +02:00
bus.c soundwire: bus: introduce controller_id 2024-01-31 16:18:47 -08:00
bus.h soundwire: export sdw_compute_slave_ports() function 2023-04-12 15:30:35 +05:30
bus_type.c soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
cadence_master.c soundwire: cadence: re-check Peripheral status with delayed_work 2024-10-17 15:24:18 +02:00
cadence_master.h soundwire: cadence: re-check Peripheral status with delayed_work 2024-10-17 15:24:18 +02:00
debugfs.c soundwire: bus: introduce controller_id 2024-01-31 16:18:47 -08:00
dmi-quirks.c ASoC: Intel: common: DMI remap for rebranded Intel NUC M15 (LAPRC710) laptops 2024-04-13 13:07:34 +02:00
generic_bandwidth_allocation.c soundwire: bandwidth allocation: Remove pointless variable 2023-06-08 17:09:11 +05:30
intel.c soundwire: intel: read AC timing control register before updating it 2023-05-27 16:08:48 +05:30
intel.h soundwire: cadence: re-check Peripheral status with delayed_work 2024-10-17 15:24:18 +02:00
intel_ace2x.c soundwire: intel_ace2x: fix AC timing setting for ACE2.x 2024-01-20 11:51:42 +01:00
intel_ace2x_debugfs.c soundwire: intel_ace2x: add debugfs support 2023-05-27 16:06:45 +05:30
intel_auxdevice.c soundwire: cadence: re-check Peripheral status with delayed_work 2024-10-17 15:24:18 +02:00
intel_auxdevice.h soundwire: intel: split auxdevice to different file 2022-11-23 20:11:49 +05:30
intel_bus_common.c soundwire: cadence: re-check Peripheral status with delayed_work 2024-10-17 15:24:18 +02:00
intel_init.c soundwire: intel_init: use eml_lock parameter 2023-05-27 16:06:45 +05:30
irq.c soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
irq.h soundwire: bus: Make IRQ handling conditionally built 2023-09-21 11:31:33 +02:00
master.c soundwire: bus: introduce controller_id 2024-01-31 16:18:47 -08:00
mipi_disco.c
qcom.c soundwire: bus: introduce controller_id 2024-01-31 16:18:47 -08:00
slave.c soundwire: fix initializing sysfs for same devices on different buses 2024-01-31 16:18:47 -08:00
stream.c soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps" 2024-09-18 19:24:09 +02:00
sysfs_local.h
sysfs_slave.c
sysfs_slave_dpn.c