Pierre-Louis Bossart d6ce285641
ASoC: max98363: enable pm_runtime in probe, keep status as 'suspended'
This patch suggests enabling pm_runtime during the probe, but marking the
device as 'active' only after it is enumerated. That will force a
dependency between the card and the codec, pm_runtime_get_sync() will
have to wait for the codec device to resume and hence implicitly wait
for the enumeration/initialization to be completed. In the nominal
case where the codec device is already active the get_sync() would
only perform a ref-count increase.

The changes are directly inspired by RT711 and RT711-sdca changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230802153629.53576-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07 14:32:32 +01:00
..
2021-04-20 17:25:51 +01:00
2023-05-25 10:54:21 +01:00
2023-05-25 10:54:21 +01:00
2023-01-31 12:10:50 +00:00
2023-07-23 23:33:05 +01:00
2021-03-31 18:00:38 +01:00
2023-07-30 23:38:02 +01:00
2023-01-31 11:04:55 +00:00
2022-06-06 12:33:10 +01:00
2018-04-26 12:44:15 +01:00
2023-07-30 23:38:02 +01:00
2020-05-07 13:18:04 +01:00
2022-10-13 13:01:32 +01:00
2023-06-16 14:55:20 +01:00
2021-12-06 10:04:05 +01:00
2022-07-08 11:52:42 +01:00
2021-12-06 10:04:05 +01:00
2018-06-01 12:05:30 +01:00
2022-08-15 01:20:01 +01:00
2020-07-20 15:34:29 +01:00
2020-10-02 21:05:29 +01:00
2023-07-30 23:38:02 +01:00