ASoC: da7219: Fix clock handling around codec level probe
authorAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Tue, 11 Aug 2020 16:57:25 +0000 (17:57 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 17 Aug 2020 17:48:45 +0000 (18:48 +0100)
commit78013a1cf2971684775f6956d5666237ac53a1aa
tree438a7c05a66786f24c9b0bed98239bca9129eb8d
parentaa5b18d1c29023b315073661b74c67f91bf2f27c
ASoC: da7219: Fix clock handling around codec level probe

Previously the driver would use devm_* related functions at
the codec level probe() to allocate clock resources for MCLK
and the DAI clocks exposed by the device. This caused issues
when registering clocks on a re-probe (no device level
remove/prove involved) as the devm_* resources were never
freed up so the clocks were still registered from the previous
codec level probe().

This commit updates the clock handling for MCLK usage and DAI
clock provision to fix this discrepancy and allow the codec level
probe/remove functionality to operate as intended.

Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
Link: https://lore.kernel.org/r/b92c461baeed27a6cd92e59e36a55c2547218683.1597164865.git.Adam.Thomson.Opensource@diasemi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/da7219.c
sound/soc/codecs/da7219.h