Thread (31 messages) 31 messages, 3 authors, 2020-08-05

Re: [PATCH v11 22/28] media: platform: Change the call functions of getting/enable/disable the jpeg's clock

From: Tomasz Figa <tfiga@chromium.org>
Date: 2020-08-05 19:51:21
Also in: linux-devicetree, linux-media, linux-mediatek, lkml

Hi Xia,

On Tue, Aug 04, 2020 at 11:40:56AM +0800, Xia Jiang wrote:
Use the generic clk_bulk_* helpers to enable and disable clocks.

Signed-off-by: Xia Jiang <redacted>
---
v11: specify the names of the clocks in the driver
---
 .../media/platform/mtk-jpeg/mtk_jpeg_core.c   | 28 +++++++++++++------
 .../media/platform/mtk-jpeg/mtk_jpeg_core.h   |  8 +++---
 2 files changed, 23 insertions(+), 13 deletions(-)
Thank you for the patch. It looks good to me.

Reviewed-by: Tomasz Figa <tfiga@chromium.org>

One comment below about a thing that should be fixed in the future,
separately from this series.
quoted hunk ↗ jump to hunk
diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
index 7881e9c93df7..47d570f32e3f 100644
--- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
+++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c
@@ -783,14 +783,15 @@ static void mtk_jpeg_clk_on(struct mtk_jpeg_dev *jpeg)
 	ret = mtk_smi_larb_get(jpeg->larb);
 	if (ret)
 		dev_err(jpeg->dev, "mtk_smi_larb_get larbvdec fail %d\n", ret);
-	clk_prepare_enable(jpeg->clk_jdec_smi);
-	clk_prepare_enable(jpeg->clk_jdec);
+
+	ret = clk_bulk_prepare_enable(jpeg->num_clks, jpeg->clks);
+	if (ret)
+		dev_err(jpeg->dev, "Failed to open jpeg clk: %d\n", ret);
The errors in this function should be propagated to the caller and
handled properly across the whole call stack.

Best regards,
Tomasz

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help