ASoC: adau1701: allow configuration of PLL mode pins
authorDaniel Mack <zonque@gmail.com>
Mon, 24 Jun 2013 14:31:30 +0000 (16:31 +0200)
committerMark Brown <broonie@linaro.org>
Tue, 25 Jun 2013 09:32:08 +0000 (10:32 +0100)
commit2352d4bf43b105ec2da5f43211db4a4c9bf34d4e
tree71c6740303824f89611a11a918dd9ce16144213a
parentde9fc724daaf5ceaf0af6ef23b2b3b1d933273e3
ASoC: adau1701: allow configuration of PLL mode pins

The ADAU1701 has 2 hardware pins to configure the PLL mode in accordance
to the MCLK-to-LRCLK ratio. These pins have to be stable before the chip
is released from reset, and a full reset cycle, including a new firmware
download is needed whenever they change.

This patch adds GPIO properties to the DT bindings of the Codec, and
implements makes the set_sysclk memorize the configured sysclk.

Because the run-time parameters are unknown at probe time, the first
firmware download is postponed to the first hw_params call, when the
driver can determine the mclk/lrclk divider. Subsequent downloads
are only issued when the divider configuration changes.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Documentation/devicetree/bindings/sound/adi,adau1701.txt
sound/soc/codecs/adau1701.c