From: Pramod Gurav <pramod.gurav@linaro.org>
To: Manish Badarkhe <badarkhe.manish@gmail.com>
Cc: vinod.koul@intel.com, Andy Gross <andy.gross@linaro.org>,
Ulf Hansson <ulf.hansson@linaro.org>,
rjw@rjwysocki.net, linux-arm-msm@vger.kernel.org,
linux-pm@vger.kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dmaengine@vger.kernel.org,
Stanimir Varbanov <stanimir.varbanov@linaro.org>,
okaya@codeaurora.org
Subject: Re: [PATCH v2 1/2] dmaengine: qcom-bam-dma: Add pm_runtime support
Date: Tue, 3 May 2016 17:00:17 +0530 [thread overview]
Message-ID: <CANYu_0uUE7Vtmx8ifLPNC9RpfSPPy-VqUNZAF+UzXCA68WnQcA@mail.gmail.com> (raw)
In-Reply-To: <CAKDJKT6q7bg7UTDex_S_+nG-3q16H0Fe0UE_hp2VvFm60ZYQgQ@mail.gmail.com>
Hi Manish,
Thanks for review.
On 3 May 2016 at 15:21, Manish Badarkhe <badarkhe.manish@gmail.com> wrote:
> Hi Pramod
>
>> @@ -715,10 +724,13 @@ static int bam_resume(struct dma_chan *chan)
>> struct bam_device *bdev = bchan->bdev;
>> unsigned long flag;
>>
>> + pm_runtime_get_sync(bdev->dev);
>> spin_lock_irqsave(&bchan->vc.lock, flag);
>> writel_relaxed(0, bam_addr(bdev, bchan->id, BAM_P_HALT));
>> bchan->paused = 0;
>> spin_unlock_irqrestore(&bchan->vc.lock, flag);
>> + pm_runtime_mark_last_busy(bdev->dev);
>> + pm_runtime_put_autosuspend(bdev->dev);
>>
>> return 0;
>> }
>
> Why this function simply return 'success' without any error capture?
>
I should check return of pm_runtime_get_sync.
>> @@ -1252,16 +1278,76 @@ static int bam_dma_remove(struct platform_device *pdev)
>>
>> tasklet_kill(&bdev->task);
>>
>> + pm_runtime_get_sync(&pdev->dev);
>> clk_disable_unprepare(bdev->bamclk);
>> + pm_runtime_disable(&pdev->dev);
>> + pm_runtime_put_noidle(&pdev->dev);
>> + pm_runtime_set_suspended(&pdev->dev);
>> +
>> + return 0;
>> +}
>
> Why this function simply return 'success' without any error capture?
Need to handle it better.
>
>> +static int bam_dma_runtime_suspend(struct device *dev)
>> +{
>> + struct bam_device *bdev = dev_get_drvdata(dev);
>> +
>> + clk_disable(bdev->bamclk);
>> +
>> + return 0;
>> +}
>
> Why this function simply return 'success' without any error capture?
If probe has succeeded means bdev->bamclk is not NULL and error hence
clk_disable wont return anything.
>
>
>> +#ifdef CONFIG_PM_SLEEP
>> +static int bam_dma_suspend(struct device *dev)
>> +{
>> + struct bam_device *bdev = dev_get_drvdata(dev);
>> +
>> + pm_runtime_force_suspend(dev);
>> +
>> + clk_unprepare(bdev->bamclk);
>>
>> return 0;
>> }
>
> Why this function simply return 'success' without any error capture?
Same logic applies here as well, as pm_runtime_force_suspend and
clk_unprepare may not return error in our case once probe is through.
>
> Regards
> Manish Badarkhe
next prev parent reply other threads:[~2016-05-03 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-03 9:37 Pramod Gurav
2016-05-03 9:37 ` [PATCH v2 2/2] MAINTAINERS: Update the files to include the Qualcomm DMA folder Pramod Gurav
2016-05-03 9:51 ` [PATCH v2 1/2] dmaengine: qcom-bam-dma: Add pm_runtime support Manish Badarkhe
2016-05-03 11:30 ` Pramod Gurav [this message]
2016-05-04 3:32 ` Manish Badarkhe
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=CANYu_0uUE7Vtmx8ifLPNC9RpfSPPy-VqUNZAF+UzXCA68WnQcA@mail.gmail.com \
--to=pramod.gurav@linaro.org \
--cc=andy.gross@linaro.org \
--cc=badarkhe.manish@gmail.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=okaya@codeaurora.org \
--cc=rjw@rjwysocki.net \
--cc=stanimir.varbanov@linaro.org \
--cc=ulf.hansson@linaro.org \
--cc=vinod.koul@intel.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®