From 6d2c66695bf30355bacceb2b0635d3ddaf26cce4 Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Mon, 1 Jun 2020 02:21:02 +0800 Subject: soundwire: intel: transition to 3 steps initialization Rather than a plain-vanilla init/exit, this patch provides 3 steps in the initialization needed for driver selection, machine driver selection and deal with power rail dependencies. - ACPI scan: this step is done at a very early stage to detect the presence of a SoundWire Controller and enabled links at the BIOS level. This step may be called from the legacy HDaudio driver, which will abort its probe to let the Sound Open Firmware (SOF) handle the hardware. - probe: this step allocates all the required memory and will add a sdw_bus, which in turn will result in identifying all possible Slaves listed below the Controller ACPI companion device. All the information is reported to the parent PCI driver which will select the relevant machine driver. - startup: this last step starts the bus reset, which results in Slave devices reporting as ATTACHED and being enumerated. This step is only done during the card creation stage, after the DSP is powered to account for internal power rail dependencies. These 3 steps are already supported in the Sound Open firmware drivers and upstream. Signed-off-by: Pierre-Louis Bossart Signed-off-by: Bard Liao Link: https://lore.kernel.org/r/20200531182102.27840-7-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul --- drivers/soundwire/intel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/soundwire/intel.h') diff --git a/drivers/soundwire/intel.h b/drivers/soundwire/intel.h index 4bd045ae91be..694117370ac3 100644 --- a/drivers/soundwire/intel.h +++ b/drivers/soundwire/intel.h @@ -38,4 +38,6 @@ struct sdw_intel { #define SDW_INTEL_QUIRK_MASK_BUS_DISABLE BIT(1) +int intel_master_startup(struct platform_device *pdev); + #endif /* __SDW_INTEL_LOCAL_H */ -- cgit v1.2.3