From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Alexandru Ardelean <aardelean@baylibre.com>
Cc: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
manivannan.sadhasivam@linaro.org, sakari.ailus@linux.intel.com,
mchehab@kernel.org, kieran.bingham@ideasonboard.com,
naush@raspberrypi.com
Subject: Re: [PATCH v2] drivers: media: imx296: Add standby delay during probe
Date: Sat, 16 Nov 2024 18:47:05 +0200 [thread overview]
Message-ID: <20241116164705.GC12409@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20241115180717.10820-1-aardelean@baylibre.com>
Hi Alexandru, Naush,
Thank you for the patch.
On Fri, Nov 15, 2024 at 08:07:17PM +0200, Alexandru Ardelean wrote:
> From: Naushir Patuck <naush@raspberrypi.com>
>
> Add a 2-5ms delay when coming out of standby and before reading the
> sensor info register durning probe, as instructed by the datasheet. This
> standby delay is already present when the sensor starts streaming.
>
> During a cold-boot, reading the IMX296_SENSOR_INFO register would often
> return a value of 0x0000, if this delay is not present before.
>
> Fixes: cb33db2b6ccfe ("media: i2c: IMX296 camera sensor driver")
> Tested-by: Alexandru Ardelean <aardelean@baylibre.com>
> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>
> Changelog v1 -> v2:
> * https://lore.kernel.org/linux-media/20241115142021.574402-1-aardelean@baylibre.com/
> * Technically, this is not a true V2, but rather a new patch
> - But in V1, the attempt was to fix an issue found with the upstream
> IMX296 driver, which was pointed out by Kieran that it was already
> fixed (more elegantly) in the RPi tree.
> - The standby delay helps during a cold-boot so that the driver can read
> the IMX296_SENSOR_INFO register. If the delay isn't present the value
> read is 0xx0000.
> - Original patch can be found:
> https://github.com/raspberrypi/linux/commit/7713ce38e6a26425ace3a57b3d03ba0125c16f89
> - From the original patch of Naushir Patuck,
> - Added comment
> -------
> During a cold-boot, reading the IMX296_SENSOR_INFO register would often
> return a value of 0x0000, if this delay is not present before.
> -------
> - Added 'Tested-by: Alexandru Ardelean <aardelean@baylibre.com>
> - Added 'Fixes: cb33db2b6ccfe ("media: i2c: IMX296 camera sensor driver")'
>
> drivers/media/i2c/imx296.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/media/i2c/imx296.c b/drivers/media/i2c/imx296.c
> index f942f66fa664..395bfe4fb23d 100644
> --- a/drivers/media/i2c/imx296.c
> +++ b/drivers/media/i2c/imx296.c
> @@ -940,6 +940,8 @@ static int imx296_identify_model(struct imx296 *sensor)
> return ret;
> }
>
> + usleep_range(2000, 5000);
> +
> ret = imx296_read(sensor, IMX296_SENSOR_INFO);
> if (ret < 0) {
> dev_err(sensor->dev, "failed to read sensor information (%d)\n",
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2024-11-16 16:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 14:20 [PATCH] media: i2c: imx296: Implement simple retry for model identification Alexandru Ardelean
2024-11-15 14:57 ` Kieran Bingham
2024-11-15 17:11 ` Alexandru Ardelean
2024-11-15 18:07 ` [PATCH v2] drivers: media: imx296: Add standby delay during probe Alexandru Ardelean
2024-11-16 16:47 ` Laurent Pinchart [this message]
2024-11-18 10:08 ` Kieran Bingham
2024-12-10 13:35 ` Sakari Ailus
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=20241116164705.GC12409@pendragon.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=aardelean@baylibre.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=mchehab@kernel.org \
--cc=naush@raspberrypi.com \
--cc=sakari.ailus@linux.intel.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
all inboxes | Powered by JetHome®