From: Richard Leitner <richard.leitner@linux.dev>
To: Claudiu.Beznea@microchip.com, robh+dt@kernel.org
Cc: broonie@kernel.org, lgirdwood@gmail.com,
krzysztof.kozlowski+dt@linaro.org, ladis@linux-mips.org,
tiwai@suse.com, benjamin.bara@skidata.com,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, richard.leitner@skidata.com,
bbara93@gmail.com
Subject: Re: [PATCH 3/3] ASoC: maxim,max9867: add "mclk" support
Date: Thu, 2 Mar 2023 15:46:40 +0100 [thread overview]
Message-ID: <ZAC20AcKy/O+9DkV@g0hl1n.net> (raw)
In-Reply-To: <61e4485b-9211-fa38-5061-f5861292ddd1@microchip.com>
Hi Claudiu,
On Thu, Mar 02, 2023 at 12:45:50PM +0000, Claudiu.Beznea@microchip.com wrote:
> On 02.03.2023 14:20, Mark Brown wrote:
> >> + max9867->mclk = devm_clk_get(&i2c->dev, "mclk");
> >> + if (IS_ERR(max9867->mclk))
> >> + return PTR_ERR(max9867->mclk);
> >> + ret = clk_prepare_enable(max9867->mclk);
> >> + if (ret < 0)
> >> + dev_err(&i2c->dev, "Failed to enable MCLK: %d\n", ret);
> >> +
> > Nothing ever disables the clock - we need a disable in the remove path
> > at least.
>
> I don't have the full context of this patch but this diff seems a good
> candidate for devm_clk_get_enabled().
Thanks for that pointer, but currently we are thinking of prepare_enable
the clock in SND_SOC_BIAS_ON and disable_unprepare it in SND_SOC_BIAS_OFF
(similar to wm8731.c).
Therefore probe() will only do a devm_clk_get().
Claudiu, Rob: Will this be an acceptable solution?
regards;rl
next prev parent reply other threads:[~2023-03-02 14:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-02 11:55 [PATCH 0/3] Add "mclk" support for maxim,max9867 richard.leitner
2023-03-02 11:55 ` [PATCH 1/3] ASoC: dt-bindings: maxim,max9867: convert txt bindings to yaml richard.leitner
2023-03-02 13:05 ` Rob Herring
2023-03-02 14:34 ` Richard Leitner
2023-03-02 13:31 ` Krzysztof Kozlowski
2023-03-02 13:48 ` Richard Leitner
2023-03-02 11:55 ` [PATCH 2/3] ASoC: dt-bindings: maxim,max9867: add "mclk" property richard.leitner
2023-03-02 13:31 ` Krzysztof Kozlowski
2023-03-02 14:56 ` Richard Leitner
2023-03-02 11:55 ` [PATCH 3/3] ASoC: maxim,max9867: add "mclk" support richard.leitner
2023-03-02 12:20 ` Mark Brown
2023-03-02 12:45 ` Richard Leitner
2023-03-02 12:45 ` Claudiu.Beznea
2023-03-02 14:46 ` Richard Leitner [this message]
2023-03-03 10:00 ` Claudiu.Beznea
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=ZAC20AcKy/O+9DkV@g0hl1n.net \
--to=richard.leitner@linux.dev \
--cc=Claudiu.Beznea@microchip.com \
--cc=alsa-devel@alsa-project.org \
--cc=bbara93@gmail.com \
--cc=benjamin.bara@skidata.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=ladis@linux-mips.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richard.leitner@skidata.com \
--cc=robh+dt@kernel.org \
--cc=tiwai@suse.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).