From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: vinod.koul@intel.com, andy.gross@linaro.org,
dmaengine@vger.kernel.org, robh+dt@kernel.org,
mark.rutland@arm.com, david.brown@linaro.org,
dan.j.williams@intel.com, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-soc@vger.kernel.org, yanhe@quicinc.com,
ramkri@qti.qualcomm.com, sdharia@quicinc.com
Subject: Re: [PATCH v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional
Date: Wed, 14 Feb 2018 18:19:54 +0000 [thread overview]
Message-ID: <69c7a7e4-1a1f-e0e6-d5e9-c39ff666df64@linaro.org> (raw)
In-Reply-To: <20180214154144.GB93895@bjorns-mbp-2.lan>
Thanks for the Review,
On 14/02/18 15:41, Bjorn Andersson wrote:
>>
>> bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
>> - if (IS_ERR(bdev->bamclk))
>> - return PTR_ERR(bdev->bamclk);
>> -
>> - ret = clk_prepare_enable(bdev->bamclk);
>> - if (ret) {
>> - dev_err(bdev->dev, "failed to prepare/enable clock\n");
>> - return ret;
>> + if (IS_ERR(bdev->bamclk)) {
> In the case of !bdev->controlled_remotely I think this should still be
> an error.
>
Yep makes sense,
You mean something like this?
------------------------->cut<------------------------
bdev->bamclk = devm_clk_get(bdev->dev, "bam_clk");
if (IS_ERR(bdev->bamclk)) {
if (!bdev->controlled_remotely);
return PTR_ERR(bdev->bamclk);
bdev->bamclk = NULL;
}
ret = clk_prepare_enable(bdev->bamclk);
if (ret) {
dev_err(bdev->dev, "failed to prepare/enable clock\n");
return ret;
}
------------------------->cut<------------------------
>> + bdev->bamclk = NULL;
>> + } else {
>> + ret = clk_prepare_enable(bdev->bamclk);
>> + if (ret) {
>> + dev_err(bdev->dev, "failed to prepare/enable clock\n");
>> + return ret;
>> + }
> The rest of the driver will keep operating the bamclk (which is okay),
> so for symmetry purposes I think you should just keep the
> clk_prepare_enable() block unmodified.
>
Yep, with above change, this block should be unchanged.
--srini
> Regards,
> Bjorn
next prev parent reply other threads:[~2018-02-14 18:20 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 14:44 [PATCH v2 0/5] dmaengine: qcom: bam_dma: fixes for remotely controlled bam srinivas.kandagatla
2018-02-14 14:44 ` [PATCH v2 1/5] dmaengine: qcom: bam_dma: make bam clk optional srinivas.kandagatla
2018-02-14 15:41 ` Bjorn Andersson
2018-02-14 18:19 ` Srinivas Kandagatla [this message]
2018-02-14 18:47 ` Bjorn Andersson
2018-02-14 14:44 ` [PATCH v2 2/5] dt-bindings: dmaengine: bam_dma: add remote controlled bindings srinivas.kandagatla
2018-02-14 14:44 ` [PATCH v2 3/5] dmaengine: qcom: bam_dma: get num-channels and num-ees from dt srinivas.kandagatla
2018-02-14 14:44 ` [PATCH v2 4/5] dmaengine: qcom: bam_dma: do not write to global regs in remote mode srinivas.kandagatla
2018-02-14 14:44 ` [PATCH v2 5/5] dmaengine: qcom: bam_dma: disable runtime pm on remote controlled srinivas.kandagatla
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=69c7a7e4-1a1f-e0e6-d5e9-c39ff666df64@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=andy.gross@linaro.org \
--cc=bjorn.andersson@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=david.brown@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=ramkri@qti.qualcomm.com \
--cc=robh+dt@kernel.org \
--cc=sdharia@quicinc.com \
--cc=vinod.koul@intel.com \
--cc=yanhe@quicinc.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
all inboxes | Powered by JetHome®