Linux Media Controller development
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Mehdi Djait <mehdi.djait@linux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"Nirujogi, Pratap" <pnirujog@amd.com>,
	Pratap Nirujogi <pratap.nirujogi@amd.com>,
	mchehab@kernel.org, hverkuil@xs4all.nl,
	bryan.odonoghue@linaro.org, krzk@kernel.org,
	dave.stevenson@raspberrypi.com, hdegoede@redhat.com,
	jai.luthra@ideasonboard.com, tomi.valkeinen@ideasonboard.com,
	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,
	Svetoslav.Stoilov@amd.com, Yana.Zheleva@amd.com
Subject: Re: [PATCH v3 RESEND] media: i2c: Add OV05C10 camera sensor driver
Date: Wed, 25 Jun 2025 06:11:37 +0000	[thread overview]
Message-ID: <aFuTGe1MnXNyvP3u@kekkonen.localdomain> (raw)
In-Reply-To: <aslodzamkbjm6n6oherakch2nyltl6mnncl4mzr4o774oolr4t@hpegah7dq72g>

Hi Mehdi,

On Tue, Jun 24, 2025 at 06:34:51PM +0200, Mehdi Djait wrote:
> Hi Sakari,
> 
> On Tue, Jun 24, 2025 at 11:46:27AM +0000, Sakari Ailus wrote:
> 
> [...]
> 
> > 
> > I'm in favour of the latter but both should be workable.
> > 
> > Speaking of return values, devm_clk_get_optional() may also return
> > -EPROBE_DEFER. That needs to be handled.
> > 
> 
> Ack.
> 
> > And further on -EPROBE_DEFER, I think the helper should return
> > -EPROBE_DEFER if the "clock-frequency" property doesn't exist on non-OF
> > nodes. That signals the required software nodes required on Intel Windows
> > definitions/ipu-bridge or AMD systems aren't in place yet so really probing
> > should be deferred. This would allow removing the hacks that return
> > -EPROBE_DEFER in sensor drivers when no graph endpoint is found.
> 
> device_property_read_u32() returns the following:
> 
>  * Return: number of values if @val was %NULL,
>  *         %0 if the property was found (success),
>  *	   %-EINVAL if given arguments are not valid,
>  *	   %-ENODATA if the property does not have a value,
>  *	   %-EPROTO if the property is not an array of numbers,
>  *	   %-EOVERFLOW if the size of the property is not as expected.
>  *	   %-ENXIO if no suitable firmware interface is present.
> 
> 
> Do you mean something like this in the helper:
> 
> if (ret == -ENODATA && !of_node)
> 	return ERR_PTR(-EPROBE_DEFER);

I think -EINVAL is returned if a property doesn't exist on ACPI, same on
software nodes. On software nodes you could also have -ENODATA if the
property has no value. So test both of these?

I'd also test !of_node first.

-- 
Regards,

Sakari Ailus

  parent reply	other threads:[~2025-06-25  6:11 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-09 19:42 [PATCH v3 RESEND] media: i2c: Add OV05C10 camera sensor driver Pratap Nirujogi
2025-06-13  4:55 ` Hao Yao
2025-06-13 11:02   ` Kieran Bingham
2025-06-13 12:05     ` Bryan O'Donoghue
2025-06-16 23:15       ` Nirujogi, Pratap
2025-06-16 23:46     ` Nirujogi, Pratap
2025-06-28 19:23       ` Sakari Ailus
2025-06-13 22:02   ` Sakari Ailus
2025-06-14 22:52     ` Laurent Pinchart
2025-06-16 22:33       ` Nirujogi, Pratap
2025-06-29  7:40         ` Sakari Ailus
2025-06-30 22:31           ` Nirujogi, Pratap
2025-07-02  6:08             ` Yan, Dongcheng
2025-07-02  6:12               ` Sakari Ailus
2025-07-02 16:47                 ` Nirujogi, Pratap
2025-07-03  6:24                   ` Yan, Dongcheng
2025-07-05 11:45                     ` Nirujogi, Pratap
2025-07-06  9:11                   ` Sakari Ailus
2025-07-08 15:31                     ` Nirujogi, Pratap
2025-06-23 11:27       ` Sakari Ailus
2025-06-23 12:06         ` Laurent Pinchart
2025-06-23 21:53           ` Nirujogi, Pratap
2025-06-23 22:11             ` Laurent Pinchart
2025-06-16 23:12     ` Nirujogi, Pratap
2025-06-23 12:09       ` Laurent Pinchart
2025-06-23 13:22         ` Sakari Ailus
2025-06-23 13:42           ` Laurent Pinchart
2025-06-23 21:55             ` Nirujogi, Pratap
2025-06-23 22:06               ` Laurent Pinchart
2025-06-23 23:21                 ` Nirujogi, Pratap
2025-06-25 22:06               ` Nirujogi, Pratap
2025-06-26 11:11                 ` Kieran Bingham
2025-06-26 12:23                   ` Laurent Pinchart
2025-06-26 18:22                     ` Nirujogi, Pratap
2025-06-26 18:56                       ` Laurent Pinchart
2025-06-26 19:21                         ` Nirujogi, Pratap
2025-06-26 18:14                   ` Nirujogi, Pratap
2025-06-17  0:19   ` Nirujogi, Pratap
2025-06-15  0:09 ` Laurent Pinchart
2025-06-16 22:49   ` Nirujogi, Pratap
2025-06-23 21:51     ` Nirujogi, Pratap
2025-06-23 22:05       ` Laurent Pinchart
2025-06-23 23:28         ` Nirujogi, Pratap
2025-06-24  0:19           ` Laurent Pinchart
2025-06-24 18:49             ` Nirujogi, Pratap
2025-06-24 19:00               ` Laurent Pinchart
2025-06-24 19:49                 ` Nirujogi, Pratap
2025-06-24  8:35         ` Mehdi Djait
2025-06-24 10:19           ` Sakari Ailus
2025-06-24 10:20             ` Sakari Ailus
2025-06-24 10:27               ` Laurent Pinchart
2025-06-24 11:27                 ` Mehdi Djait
2025-06-24 11:33                   ` Laurent Pinchart
2025-06-24 11:46                   ` Sakari Ailus
2025-06-24 16:34                     ` Mehdi Djait
2025-06-24 20:24                       ` Nirujogi, Pratap
2025-06-25  6:11                       ` Sakari Ailus [this message]
2025-06-24 18:26                   ` Nirujogi, Pratap
2025-06-24 20:01                     ` Nirujogi, Pratap
  -- strict thread matches above, loose matches on Subject: below --
2025-05-15 22:41 Pratap Nirujogi

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=aFuTGe1MnXNyvP3u@kekkonen.localdomain \
    --to=sakari.ailus@linux.intel.com \
    --cc=Svetoslav.Stoilov@amd.com \
    --cc=Yana.Zheleva@amd.com \
    --cc=benjamin.chan@amd.com \
    --cc=bin.du@amd.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dantony@amd.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=grosikop@amd.com \
    --cc=hdegoede@redhat.com \
    --cc=hverkuil@xs4all.nl \
    --cc=jai.luthra@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=pnirujog@amd.com \
    --cc=pratap.nirujogi@amd.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