[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <fa20fadb-529c-4796-beaf-ba8a1097d7aa@kernel.org>
Date: Sun, 22 Jun 2025 13:45:22 +0200
From: Hans de Goede <hansg@...nel.org>
To: Michael Riesch <michael.riesch@...labora.com>,
Mehdi Djait <mehdi.djait@...ux.intel.com>,
laurent.pinchart@...asonboard.com, sakari.ailus@...ux.intel.com
Cc: akinobu.mita@...il.com, stanislaw.gruszka@...ux.intel.com, arnd@...db.de,
alain.volmat@...s.st.com, andrzej.hajda@...el.com,
benjamin.mugnier@...s.st.com, dave.stevenson@...pberrypi.com,
hverkuil@...all.nl, jacopo.mondi@...asonboard.com, jonas@...boo.se,
kieran.bingham@...asonboard.com, khalasa@...p.pl,
prabhakar.csengg@...il.com, mani@...nel.org, m.felsch@...gutronix.de,
martink@...teo.de, mattwmajewski@...il.com, matthias.fend@...end.at,
mchehab@...nel.org, naush@...pberrypi.com, nicholas@...hemail.net,
nicolas.dufresne@...labora.com, paul.elder@...asonboard.com,
dan.scally@...asonboard.com, pavel@...nel.org, petrcvekcz@...il.com,
rashanmu@...il.com, ribalda@...omium.org, rmfrfs@...il.com,
zhengsq@...k-chips.com, slongerbeam@...il.com, sylvain.petinot@...s.st.com,
s.nawrocki@...sung.com, tomi.valkeinen@...asonboard.com,
umang.jain@...asonboard.com, zhi.mao@...iatek.com,
linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Subject: Re: [PATCH v1 00/55] media: Add a helper for obtaining the clock
producer
Hi,
On 21-Jun-25 4:28 PM, Michael Riesch wrote:
> Hi Mehdi,
>
> Thanks for your work!
>
> On 6/19/25 19:58, Mehdi Djait wrote:
>> Hello everyone,
>>
>> Here is my v1 for the new helper v4l2_devm_sensor_clk_get()
>>
>> Any testing of the patches is GREATLY APPRECIATED! Especially the two
>> drivers with the special ACPI case:
>> 1) OV8865
>> 2) OV2680
>>
>>
>> Background
>> ----------
>>
>> A reference to the clock producer is not available to the kernel
>> in ACPI-based platforms but the sensor drivers still need them.
>>
>> devm_clk_get() will return an error and the probe function will fail.
>>
>>
>> Solution
>> --------
>>
>> Introduce a generic helper for v4l2 sensor drivers on both DT- and ACPI-based
>> platforms.
>
> Out of curiosity: How is this problem specific to V4L2? Does one need a
> similar helper in other subsystems?
Clocks on ACPI platforms are typically managed by ACPI through either
ACPI power-resources or through the _PS0 an _PS3 methods (power on/off)
on the ACPI fwnode for the device.
Camera sensors are special in that the sensor driver wants to know
the clock frequency to e.g. program its PLLs and that clk-freq is
specified through a device-property on ACPI since the clk is
otherwise typically not managed by Linux.
Most other drivers used on x86 don't really care about the clk-frequency,
they simply assume the clk-freq is what the hw needs / is the default
expected clk freq.
Regards,
Hans
Powered by blists - more mailing lists