[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFuTGe1MnXNyvP3u@kekkonen.localdomain>
Date: Wed, 25 Jun 2025 06:11:37 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Mehdi Djait <mehdi.djait@...ux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart@...asonboard.com>,
"Nirujogi, Pratap" <pnirujog@....com>,
Pratap Nirujogi <pratap.nirujogi@....com>, mchehab@...nel.org,
hverkuil@...all.nl, bryan.odonoghue@...aro.org, krzk@...nel.org,
dave.stevenson@...pberrypi.com, hdegoede@...hat.com,
jai.luthra@...asonboard.com, tomi.valkeinen@...asonboard.com,
linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
benjamin.chan@....com, bin.du@....com, grosikop@....com,
king.li@....com, dantony@....com, vengutta@....com,
Svetoslav.Stoilov@....com, Yana.Zheleva@....com
Subject: Re: [PATCH v3 RESEND] media: i2c: Add OV05C10 camera sensor driver
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
Powered by blists - more mailing lists