From: Lars-Peter Clausen <lars@metafoo.de>
To: Daniel Mack <zonque@gmail.com>
Cc: alsa-devel@alsa-project.org, broonie@kernel.org
Subject: Re: [PATCH 2/4] ASoC: codecs: adau1701: allow configuration of PLL mode pins
Date: Sun, 09 Jun 2013 19:12:32 +0200 [thread overview]
Message-ID: <51B4B780.9040201@metafoo.de> (raw)
In-Reply-To: <1370605987-19290-3-git-send-email-zonque@gmail.com>
On 06/07/2013 01:53 PM, Daniel Mack wrote:
> 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.
I think it makes more sense to let the user provide the mclk frequency and then
let the driver in the hwparams callback choose the right divider based on the
select playback rate.
>
> This patch adds GPIO properties to the DT bindings of the Codec, and
> implements a callback for the set_clkdiv callback of the DAI.
>
> To avoid excessive reset cycles and firmware downloads, the default
> clock divider can be specified in DT as well.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>
> ---
> .../devicetree/bindings/sound/adi,adau1701.txt | 13 ++++
> sound/soc/codecs/adau1701.c | 74 ++++++++++++++++++++++
> sound/soc/codecs/adau1701.h | 4 ++
> 3 files changed, 91 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/adi,adau1701.txt b/Documentation/devicetree/bindings/sound/adi,adau1701.txt
> index 3afeda7..c9c6e98 100644
> --- a/Documentation/devicetree/bindings/sound/adi,adau1701.txt
> +++ b/Documentation/devicetree/bindings/sound/adi,adau1701.txt
> @@ -11,6 +11,19 @@ Optional properties:
> - reset-gpio: A GPIO spec to define which pin is connected to the
> chip's !RESET pin. If specified, the driver will
> assert a hardware reset at probe time.
> + - adi,pll-clkdiv: The PLL clock divider, specifing the ratio between
> + MCLK and fsclk. The value is used to determine the
> + correct state of the two mode pins below.
> + Note that this value can be overridden at runtime
> + by passing the ADAU1701_CLKDIV_MCLK_LRCLK divider
> + with ASoC calls. However, the chips needs a full
> + reset cycle and a new firmware download each time
> + the configuration changes.
> + - adi,pll-mode0-gpio,
> + adi,pll-mode1-gpio: GPIO specs to describe the GPIOs the ADAU's PLL config
> + pins are connected to. The state of the pins are set
> + according to the configured clock divider on ASoC side
> + before the firmware is loaded.
I'd make this one property with two gpios, e.g.:
adi,pll-mode-gpios = <&gpio 12 0 &gpio 34 0>;
- Lars
next prev parent reply other threads:[~2013-06-09 17:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 11:53 [PATCH 0/4] ASoC: codecs: some more improvements for adau1701 Daniel Mack
2013-06-07 11:53 ` [PATCH 1/4] ASoC: codecs: adau1701: factor out firmware reset Daniel Mack
2013-06-10 13:08 ` Lars-Peter Clausen
2013-06-10 13:09 ` Mark Brown
2013-06-07 11:53 ` [PATCH 2/4] ASoC: codecs: adau1701: allow configuration of PLL mode pins Daniel Mack
2013-06-09 17:12 ` Lars-Peter Clausen [this message]
2013-06-07 11:53 ` [PATCH 3/4] ASoC: codecs: adau1701: switch to direct regmap API usage Daniel Mack
2013-06-09 17:39 ` Lars-Peter Clausen
2013-06-07 11:53 ` [PATCH 4/4] ASoC: codecs: adau1701: add support for pin muxing Daniel Mack
2013-06-09 17:43 ` Lars-Peter Clausen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51B4B780.9040201@metafoo.de \
--to=lars@metafoo.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=zonque@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.