mbox series

[0/2] dmaengine: pl330: A few system suspend/resume changes

Message ID 20191205143746.24873-1-ulf.hansson@linaro.org
Headers show
Series dmaengine: pl330: A few system suspend/resume changes | expand

Message

Ulf Hansson Dec. 5, 2019, 2:37 p.m. UTC
I accidentally stumbled over a couple of things for the system suspend/resume
support in the pl330 driver, that I thought deserved to be improved. So here
there are, only compile tested, so far.

Kind regards
Ulf Hansson


Ulf Hansson (2):
  dmaengine: pl330: Drop boilerplate code for suspend/resume
  dmaengine: pl330: Convert to the *_late and *_early system sleep
    callbacks

 drivers/dma/pl330.c | 16 +++++-----------
 1 file changed, 5 insertions(+), 11 deletions(-)

-- 
2.17.1

Comments

Marek Szyprowski Dec. 6, 2019, 11:46 a.m. UTC | #1
Hi,

On 05.12.2019 15:37, Ulf Hansson wrote:
> It has turned out that it's in general a good idea for dmaengines to allow

> DMA requests during the entire dpm_suspend() phase. Therefore, convert the

> pl330 driver into using SET_LATE_SYSTEM_SLEEP_PM_OPS.

>

> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>


Works fine on various Samsung Exynos boards I have for tests.

Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>


> ---

>   drivers/dma/pl330.c | 4 +++-

>   1 file changed, 3 insertions(+), 1 deletion(-)

>

> diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c

> index 8e01da157518..88b884cbb7c1 100644

> --- a/drivers/dma/pl330.c

> +++ b/drivers/dma/pl330.c

> @@ -2981,7 +2981,9 @@ static int __maybe_unused pl330_resume(struct device *dev)

>   	return ret;

>   }

>   

> -static SIMPLE_DEV_PM_OPS(pl330_pm, pl330_suspend, pl330_resume);

> +static const struct dev_pm_ops pl330_pm = {

> +	SET_LATE_SYSTEM_SLEEP_PM_OPS(pl330_suspend, pl330_resume)

> +};

>   

>   static int

>   pl330_probe(struct amba_device *adev, const struct amba_id *id)


Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland
Vinod Koul Dec. 10, 2019, 6:09 a.m. UTC | #2
On 05-12-19, 15:37, Ulf Hansson wrote:
> I accidentally stumbled over a couple of things for the system suspend/resume

> support in the pl330 driver, that I thought deserved to be improved. So here

> there are, only compile tested, so far.


Applied both, thanks

-- 
~Vinod