1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-13 10:05:39 +00:00
Mehdi Djait 7ecb662b71 media: v4l2-common: Add a helper for obtaining the clock producer
Introduce a helper for v4l2 sensor drivers on both DT- and ACPI-based
platforms to retrieve a reference to the clock producer from firmware.

This helper behaves the same as devm_clk_get() except where there is
no clock producer like in ACPI-based platforms.

For ACPI-based platforms the function will read the "clock-frequency"
ACPI _DSD property and register a fixed frequency clock with the frequency
indicated in the property.

This function also handles the special ACPI-based system case where:
. The clock-frequency _DSD property is present.
. A reference to the clock producer is present, where the clock is provided
  by a camera sensor PMIC driver (e.g. int3472/tps68470.c)
In this case try to set the clock-frequency value to the provided clock.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Signed-off-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-08-13 15:10:18 +02:00
..
2025-07-30 19:26:49 -07:00
2025-08-02 12:07:09 -07:00
2025-08-09 18:10:01 +03:00
2025-08-08 07:03:25 +03:00
2025-08-06 20:20:25 +02:00
2025-08-01 10:29:36 -07:00
2025-08-09 18:12:23 +03:00