linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Pratap Nirujogi <pratap.nirujogi@amd.com>,
	mchehab@kernel.org, sakari.ailus@linux.intel.com,
	laurent.pinchart@ideasonboard.com,
	kieran.bingham@ideasonboard.com, hao.yao@intel.com,
	mehdi.djait@linux.intel.com, dongcheng.yan@linux.intel.com,
	hverkuil@xs4all.nl, krzk@kernel.org,
	dave.stevenson@raspberrypi.com, hdegoede@redhat.com,
	jai.luthra@ideasonboard.com, tomi.valkeinen@ideasonboard.com
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
	benjamin.chan@amd.com, bin.du@amd.com, grosikop@amd.com,
	king.li@amd.com, dantony@amd.com, vengutta@amd.com,
	Phil.Jawich@amd.com
Subject: Re: [PATCH v4] media: i2c: Add OV05C10 camera sensor driver
Date: Tue, 15 Jul 2025 12:54:30 +0100	[thread overview]
Message-ID: <60cf7590-4fd8-419b-a782-8bc89fb5395a@kernel.org> (raw)
In-Reply-To: <20250714205805.1329403-1-pratap.nirujogi@amd.com>

On 14/07/2025 21:51, Pratap Nirujogi wrote:

> +	ret = ov05c10_init_controls(ov05c10);
> +	if (ret) {
> +		dev_err(ov05c10->dev, "fail to init ov05c10 ctl %d\n", ret);
> +		goto err_pm;
> +	}

I would expect to see an "identify_module()" function here, something 
similar to ov02c10.

ret = ov02c10_power_on(&client->dev);
if (ret) {
         dev_err_probe(&client->dev, ret, "failed to power on\n");
         return ret;
}

ret = ov02c10_identify_module(ov02c10);
if (ret) {
        dev_err(&client->dev, "failed to find sensor: %d", ret);
         goto probe_error_power_off;
}

ret = ov02c10_init_controls(ov02c10);
if (ret) {
        dev_err(&client->dev, "failed to init controls: %d", ret);
         goto probe_error_v4l2_ctrl_handler_free;
}

Standard practice is to try to talk to the sensor in probe() and bug out 
if you can't.

With your current logic, the first time you'd realise no sensor was 
present or is in reset etc is the first time you try to stream I think..

Definitely a good idea to probe for your sensor in probe failing the 
probe if you can't find the hardware.

---
bod

  reply	other threads:[~2025-07-15 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 20:51 [PATCH v4] media: i2c: Add OV05C10 camera sensor driver Pratap Nirujogi
2025-07-15 11:54 ` Bryan O'Donoghue [this message]
2025-07-15 18:13   ` Laurent Pinchart
2025-07-16 18:00     ` Nirujogi, Pratap
2025-07-15 14:19 ` kernel test robot
2025-07-15 16:45 ` kernel test robot

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=60cf7590-4fd8-419b-a782-8bc89fb5395a@kernel.org \
    --to=bod@kernel.org \
    --cc=Phil.Jawich@amd.com \
    --cc=benjamin.chan@amd.com \
    --cc=bin.du@amd.com \
    --cc=dantony@amd.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dongcheng.yan@linux.intel.com \
    --cc=grosikop@amd.com \
    --cc=hao.yao@intel.com \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jai.luthra@ideasonboard.com \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=king.li@amd.com \
    --cc=krzk@kernel.org \
    --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=pratap.nirujogi@amd.com \
    --cc=sakari.ailus@linux.intel.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=vengutta@amd.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).