Re: [PATCH V2] dma: tegra: enable/disable dma clock

From: Laxman Dewangan
Date: Tue Jul 24 2012 - 01:10:35 EST


On Tuesday 24 July 2012 10:38 AM, Vinod Koul wrote:
On Fri, 2012-07-20 at 13:31 +0530, Laxman Dewangan wrote:
Enable the DMA clock when allocating channel and
disable clock when freeing channels.

Signed-off-by: Laxman Dewangan<ldewangan@xxxxxxxxxx>
---
+ clk_disable_unprepare(tdma->dma_clk);
What if another channel is active, disabling clock can cause bad
behavior. You should check here if all channels are idle and then
disable, or is this handled by clock API?

Yes, clock driver keeps the reference count and so client driver need not to take care.

Thanks,
Laxman


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/