devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tfiga@chromium.org>
To: Xia Jiang <xia.jiang@mediatek.com>
Cc: Hans Verkuil <hverkuil-cisco@xs4all.nl>,
	Mauro Carvalho Chehab <mchehab+samsung@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Matthias Brugger <matthias.bgg@gmail.com>,
	Rick Chang <rick.chang@mediatek.com>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	srv_heupstream@mediatek.com, senozhatsky@chromium.org,
	mojahsu@chromium.org, drinkcat@chromium.org,
	maoguang.meng@mediatek.com
Subject: Re: [PATCH v11 22/28] media: platform: Change the call functions of getting/enable/disable the jpeg's clock
Date: Wed, 5 Aug 2020 13:55:44 +0000	[thread overview]
Message-ID: <20200805135544.GA1014704@chromium.org> (raw)
In-Reply-To: <20200804034102.22983-23-xia.jiang@mediatek.com>

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 <xia.jiang@mediatek.com>
> ---
> 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.

> 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

  reply	other threads:[~2020-08-05 19:51 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04  3:40 [PATCH v11 00/28] Add support for mt2701 JPEG ENC support Xia Jiang
2020-08-04  3:40 ` [PATCH v11 01/28] media: platform: Improve subscribe event flow for bug fixing Xia Jiang
2020-08-04  3:40 ` [PATCH v11 02/28] media: platform: Improve queue set up " Xia Jiang
2020-08-04  3:40 ` [PATCH v11 03/28] media: platform: Improve getting and requesting irq " Xia Jiang
2020-08-04  3:40 ` [PATCH v11 04/28] media: platform: Change the fixed device node number to unfixed value Xia Jiang
2020-08-04  3:40 ` [PATCH v11 05/28] media: platform: Improve power on and power off flow Xia Jiang
2020-08-04  3:40 ` [PATCH v11 06/28] media: platform: Delete the resetting hardware flow in the system PM ops Xia Jiang
2020-08-04  3:40 ` [PATCH v11 07/28] media: platform: Improve the implementation of " Xia Jiang
2020-08-04  3:40 ` [PATCH v11 08/28] media: platform: Add mechanism to handle jpeg hardware's locking up Xia Jiang
2020-08-04  3:40 ` [PATCH v11 09/28] media: platform: Cancel the last frame handling flow Xia Jiang
2020-08-04  3:40 ` [PATCH v11 10/28] media: platform: Delete zeroing the reserved fields Xia Jiang
2020-08-04  3:40 ` [PATCH v11 11/28] media: platform: Stylistic changes for improving code quality Xia Jiang
2020-08-04  3:40 ` [PATCH v11 12/28] media: platform: Use generic rounding helpers Xia Jiang
2020-08-04  3:40 ` [PATCH v11 13/28] media: platform: Change MTK_JPEG_COMP_MAX macro definition location Xia Jiang
2020-08-04  3:40 ` [PATCH v11 14/28] media: platform: Delete redundant code and add annotation for an enum Xia Jiang
2020-08-04  3:40 ` [PATCH v11 15/28] media: platform: Delete vidioc_s_selection ioctl of jpeg dec Xia Jiang
2020-08-04  3:40 ` [PATCH v11 16/28] media: platform: Change the maximum width and height supported by JPEG dec Xia Jiang
2020-08-04  3:40 ` [PATCH v11 17/28] media: platform: Refactor mtk_jpeg_try_fmt_mplane() Xia Jiang
2020-08-04  3:40 ` [PATCH v11 18/28] media: platform: Refactor mtk_jpeg_find_format() Xia Jiang
2020-08-04  3:40 ` [PATCH v11 19/28] media: platform: Redefinition of mtk_jpeg_q_data structure Xia Jiang
2020-08-04  3:40 ` [PATCH v11 20/28] media: platform: Change the colorspace of jpeg to the fixed value Xia Jiang
2020-08-04  3:40 ` [PATCH v11 21/28] media: platform: Refactor mtk_jpeg_set_default_params() Xia Jiang
2020-08-04  3:40 ` [PATCH v11 22/28] media: platform: Change the call functions of getting/enable/disable the jpeg's clock Xia Jiang
2020-08-05 13:55   ` Tomasz Figa [this message]
2020-08-04  3:40 ` [PATCH v11 23/28] media: dt-bindings: Add jpeg enc device tree node document Xia Jiang
2020-08-04  3:40 ` [PATCH v11 24/28] arm: dts: mt2701: Add jpeg enc device tree node Xia Jiang
2020-08-04  3:40 ` [PATCH v11 25/28] media: platform: Rename jpeg dec file name Xia Jiang
2020-08-04  3:41 ` [PATCH v11 26/28] media: platform: Rename existing functions/defines/variables Xia Jiang
2020-08-04  3:41 ` [PATCH v11 27/28] media: platform: Using the variant structure to contain the varability between dec and enc Xia Jiang
2020-08-04  3:41 ` [PATCH v11 28/28] media: platform: Add jpeg enc feature Xia Jiang
2020-08-05  8:45 ` [PATCH v11 00/28] Add support for mt2701 JPEG ENC support Hans Verkuil

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=20200805135544.GA1014704@chromium.org \
    --to=tfiga@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=drinkcat@chromium.org \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=m.szyprowski@samsung.com \
    --cc=maoguang.meng@mediatek.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab+samsung@kernel.org \
    --cc=mojahsu@chromium.org \
    --cc=rick.chang@mediatek.com \
    --cc=robh+dt@kernel.org \
    --cc=senozhatsky@chromium.org \
    --cc=srv_heupstream@mediatek.com \
    --cc=xia.jiang@mediatek.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;
as well as URLs for NNTP newsgroup(s).