From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Elgin Perumbilly <elgin.perumbilly@siliconsignals.io>
Cc: linux-media@vger.kernel.org, tarang.raval@siliconsignals.io,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Hans Verkuil <hverkuil@kernel.org>,
Hans de Goede <johannes.goede@oss.qualcomm.com>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
Mehdi Djait <mehdi.djait@linux.intel.com>,
Xiaolei Wang <xiaolei.wang@windriver.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sylvain Petinot <sylvain.petinot@foss.st.com>,
Benjamin Mugnier <benjamin.mugnier@foss.st.com>,
Svyatoslav Ryhel <clamor95@gmail.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/3] media: i2c: imx412: Convert to CCI register access helpers
Date: Tue, 14 Jul 2026 11:28:25 +0300 [thread overview]
Message-ID: <alXzKeKnDPk99Y5m@kekkonen.localdomain> (raw)
In-Reply-To: <20260316090059.121605-2-elgin.perumbilly@siliconsignals.io>
Hi Elgin,
On Mon, Mar 16, 2026 at 02:30:54PM +0530, Elgin Perumbilly wrote:
> @@ -543,29 +445,25 @@ static int imx412_update_controls(struct imx412 *imx412,
> static int imx412_update_exp_gain(struct imx412 *imx412, u32 exposure, u32 gain)
> {
> u32 lpfr;
> - int ret;
> + int ret = 0;
> + int ret_hold;
>
> lpfr = imx412->vblank + imx412->cur_mode->height;
>
> dev_dbg(imx412->dev, "Set exp %u, analog gain %u, lpfr %u\n",
> exposure, gain, lpfr);
>
> - ret = imx412_write_reg(imx412, IMX412_REG_HOLD, 1, 1);
> - if (ret)
> - return ret;
> + cci_write(imx412->cci, IMX412_REG_HOLD, 1, &ret);
>
> - ret = imx412_write_reg(imx412, IMX412_REG_LPFR, 2, lpfr);
> - if (ret)
> - goto error_release_group_hold;
> + cci_write(imx412->cci, IMX412_REG_LPFR, lpfr, &ret);
>
> - ret = imx412_write_reg(imx412, IMX412_REG_EXPOSURE_CIT, 2, exposure);
> - if (ret)
> - goto error_release_group_hold;
> + cci_write(imx412->cci, IMX412_REG_EXPOSURE_CIT, exposure, &ret);
>
> - ret = imx412_write_reg(imx412, IMX412_REG_AGAIN, 2, gain);
> + cci_write(imx412->cci, IMX412_REG_AGAIN, gain, &ret);
>
> -error_release_group_hold:
> - imx412_write_reg(imx412, IMX412_REG_HOLD, 1, 0);
> + ret_hold = cci_write(imx412->cci, IMX412_REG_HOLD, 0, NULL);
return cci_write(...);
I'll fix it while applying.
> + if (ret_hold)
> + return ret_hold;
>
> return ret;
> }
--
Regards,
Sakari Ailus
next prev parent reply other threads:[~2026-07-14 8:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 9:00 [PATCH v2 0/3] media: i2c: imx412: Modernize driver with CCI and streams API Elgin Perumbilly
2026-03-16 9:00 ` [PATCH v2 1/3] media: i2c: imx412: Convert to CCI register access helpers Elgin Perumbilly
2026-07-14 8:28 ` Sakari Ailus [this message]
2026-07-14 10:23 ` Elgin Perumbilly
2026-07-15 8:14 ` Sakari Ailus
2026-03-16 9:00 ` [PATCH v2 2/3] media: i2c: imx412: Switch to using the sub-device state lock Elgin Perumbilly
2026-03-16 9:00 ` [PATCH v2 3/3] media: i2c: imx412: switch to {enable,disable}_streams Elgin Perumbilly
2026-05-28 9:50 ` [PATCH v2 0/3] media: i2c: imx412: Modernize driver with CCI and streams API Elgin Perumbilly
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=alXzKeKnDPk99Y5m@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=clamor95@gmail.com \
--cc=elgin.perumbilly@siliconsignals.io \
--cc=hverkuil@kernel.org \
--cc=johannes.goede@oss.qualcomm.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=mehdi.djait@linux.intel.com \
--cc=sylvain.petinot@foss.st.com \
--cc=tarang.raval@siliconsignals.io \
--cc=vladimir.zapolskiy@linaro.org \
--cc=xiaolei.wang@windriver.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