Re: [PATCH v3 RESEND] media: i2c: Add OV05C10 camera sensor driver

From: Sakari Ailus
Date: Tue Jun 24 2025 - 06:19:52 EST


Hi Mehdi,

On Tue, Jun 24, 2025 at 10:35:18AM +0200, Mehdi Djait wrote:
> Hi Laurent, Hi Pratap,
>
> Thank you for the patch
>
> On Tue, Jun 24, 2025 at 01:05:03AM +0300, Laurent Pinchart wrote:
> > (CC'ing Mehdi)
> >
> > On Mon, Jun 23, 2025 at 05:51:48PM -0400, Nirujogi, Pratap wrote:
> > > On 6/16/2025 6:49 PM, Nirujogi, Pratap wrote:
> > > >>> +static int ov05c10_probe(struct i2c_client *client)
> > > >>> +{
> > > >>> +     struct ov05c10 *ov05c10;
> > > >>> +     u32 clkfreq;
> > > >>> +     int ret;
> > > >>> +
> > > >>> +     ov05c10 = devm_kzalloc(&client->dev, sizeof(*ov05c10),
> > > >>> GFP_KERNEL);
> > > >>> +     if (!ov05c10)
> > > >>> +             return -ENOMEM;
> > > >>> +
> > > >>> +     struct fwnode_handle *fwnode = dev_fwnode(&client->dev);
> > > >>> +
> > > >>> +     ret = fwnode_property_read_u32(fwnode, "clock-frequency",
> > > >>> &clkfreq);
> > > >>> +     if (ret)
> > > >>> +             return  dev_err_probe(&client->dev, -EINVAL,
> > > >>> +                                   "fail to get clock freq\n");
> > > >>
> > > >> Let's try to land
> > > >> https://lore.kernel.org/linux-media/20250521104115.176950-1-
> > > >> mehdi.djait@xxxxxxxxxxxxxxx/
> > > >> and replace the code above with devm_v4l2_sensor_clk_get().
> > > >>
> > > > Ok, we will verify on our side.
> > >
> > > We tried using devm_v4l2_sensor_clk_get() and found its required to add
> > > support for software_node to make it work with this driver.
> >
> > Why is that ?
> >
> > > Please refer
> > > the changes below and let us know if these should be submitted as a
> > > separate patch.
>
> The helper is still not merged, so no patch is required.
>
> I will see if a change is needed from the helper side or the OV05C10 side.

I wonder if there's a better way to figure out if you're running on a DT or
ACPI based system than getting the device's parents and checking which one
you find first, DT or ACPI. I think that should work for now at least.

--
Regards,

Sakari Ailus