]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: codec: tlv320aic32x4: do software reset before clock registration
authorMatthias Schiffer <matthias.schiffer@ew.tq-group.com>
Wed, 2 Sep 2020 13:30:43 +0000 (15:30 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2020 16:40:08 +0000 (17:40 +0100)
commit9997d4c61ff5f109717fe59884f5d7d06e7db12e
treeb65919b444737bd3f083dbbaa94d7a322cc3e073
parent202027f5bc7f5a521c5745ada7719a465059bb2e
ASoC: codec: tlv320aic32x4: do software reset before clock registration

To avoid the actual PLL settings to differ from the state expected by
the clock driver, the codec should only be fully reset before the clocks
are registered. But we also need to ensure that the software reset
happens at all before clock registration, as not all boards have a reset
GPIO.

Move the software reset from aic32x4_component_probe() to
aic32x4_probe() and reorder the reset and registration sequence:

1. Reset via GPIO (if available)
2. Reset via software
3. Register component
4. Register clocks

Note that aic32x4_component_probe() is only called after aic32x4_probe()
has finished, so the reset in aic32x4_component_probe() was happening too
late.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200902133043.19504-2-matthias.schiffer@ew.tq-group.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320aic32x4.c