mirror-linux/include/media
Laurent Pinchart dd235b07b6 media: v4l2-common: Add legacy camera sensor clock helper
The recently introduced devm_v4l2_sensor_clk_get() helper aims at
simplifying sensor drivers by centralizing clock handling code, as well
as reducing cargo-cult and deprecated behaviour.

A set of drivers implement external clock handling in a non-standard
way. This can't be changed as there is a high risk of breaking existing
platforms, but keeping the code as-is creates a risk of new drivers
copying deprecated behaviour.

To fix this, introduce a new devm_v4l2_sensor_clk_get_legacy() helper
and use it in those driver. Compared to devm_v4l2_sensor_clk_get(), the
new helper takes the "clock-frequency" property into account and sets
the external clock rate on OF platforms, and adds the ability to specify
a fixed default or fallback clock rate in case the "clock-frequency"
property is not present.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
2025-09-09 15:59:19 +02:00
..
cadence media: cadence: cdns-csi2rx: Support multiple pixels per clock cycle 2025-08-25 15:40:42 +02:00
davinci media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection 2023-07-28 10:44:25 +02:00
drv-intf media: include: update Hans Verkuil's email address 2025-09-09 15:58:56 +02:00
i2c media: i2c: mt9v032: Drop support for platform data 2025-09-09 15:59:17 +02:00
tpg
cec-notifier.h
cec-pin.h
cec.h media: cec: include linux/debugfs.h and linux/seq_file.h where needed 2025-01-07 12:21:38 +01:00
demux.h
dmxdev.h
dvb-usb-ids.h
dvb_ca_en50221.h
dvb_demux.h
dvb_frontend.h Revert "media: dvb-core: Fix use-after-free on race condition at dvb_frontend" 2023-06-14 23:16:29 +01:00
dvb_net.h media: dvb-core: Fix use-after-free due on race condition at dvb_net 2023-05-14 06:30:45 +01:00
dvb_ringbuffer.h
dvb_vb2.h
dvbdev.h media: dvbdev.h: do some kernel-doc cleanups 2023-05-14 16:05:27 +01:00
frame_vector.h
imx.h
ipu-bridge.h media: ipu-bridge: add mod_devicetable.h header inclusion 2024-06-04 08:31:22 +02:00
ipu6-pci-table.h media: ipu6: Add PCI device table header 2024-04-29 14:56:37 +02:00
jpeg.h media: Add common header file with JPEG marker definitions 2023-05-25 16:21:21 +02:00
media-dev-allocator.h
media-device.h media: mc: Add nop implementations of media_device_{init,cleanup} 2024-04-10 15:15:30 +02:00
media-devnode.h
media-entity.h media: mc: Rename pad as origin in __media_pipeline_start() 2024-11-07 09:05:58 +01:00
media-request.h media: update Hans Verkuil's email address 2025-09-09 15:58:44 +02:00
mipi-csi2.h media: Add MIPI CSI-2 generic long packet type definition 2023-10-07 10:55:48 +02:00
rc-core.h media: rc: reduce useless padding in struct rc_dev etc 2025-03-04 15:56:11 +01:00
rc-map.h media: rc: add keymap for Siemens Gigaset RC20 remote 2025-02-13 12:12:31 +01:00
rcar-fcp.h media: rcar-fcp: Add rcar_fcp_soft_reset() 2025-06-18 09:20:45 +02:00
tuner-types.h media: tuners: Constify struct tunertype, tuner_range and tuner_params 2025-02-21 10:33:15 +01:00
tuner.h media: tuner-simple: Add support for Tena TNF931D-DFDR1 2024-06-29 12:20:05 +02:00
tveeprom.h
v4l2-async.h media: v4l: async: Set owner for async sub-devices 2024-04-26 11:31:19 +01:00
v4l2-cci.h media: v4l2-cci: Add support for little-endian encoded registers 2023-12-13 13:21:19 +01:00
v4l2-common.h media: v4l2-common: Add legacy camera sensor clock helper 2025-09-09 15:59:19 +02:00
v4l2-ctrls.h media: include: update Hans Verkuil's email address 2025-09-09 15:58:56 +02:00
v4l2-dev.h media: Drop V4L2_FL_USES_V4L2_FH checks 2025-08-13 08:33:46 +02:00
v4l2-device.h media: include: update Hans Verkuil's email address 2025-09-09 15:58:56 +02:00
v4l2-dv-timings.h media: v4l2-core: v4l2-dv-timings: support DRM IFs 2025-09-07 10:29:19 +02:00
v4l2-event.h media: v4l2-event: Annotate struct v4l2_subscribed_event with __counted_by 2023-10-07 10:55:45 +02:00
v4l2-fh.h media: Drop V4L2_FL_USES_V4L2_FH checks 2025-08-13 08:33:46 +02:00
v4l2-flash-led-class.h
v4l2-fwnode.h media: v4l: fwnode: Remove unneeded forward declaration 2023-07-28 10:34:26 +02:00
v4l2-h264.h
v4l2-image-sizes.h
v4l2-ioctl.h media: v4l2-ioctl: Stop passing fh pointer to ioctl handlers 2025-08-13 08:33:56 +02:00
v4l2-jpeg.h media: v4l2-jpeg: Remove unused v4l2_jpeg_parse_* wrappers 2025-06-17 10:35:17 +02:00
v4l2-mc.h media: v4l2-mc: Mark v4l2_pipeline_link_notify() as deprecated 2024-08-23 17:49:09 +03:00
v4l2-mediabus.h media: v4l: Support obtaining link frequency via get_mbus_config 2025-02-15 15:22:53 +01:00
v4l2-mem2mem.h media: v4l2-core: Rename second ioctl handlers argument to 'void *priv' 2025-08-13 08:33:59 +02:00
v4l2-rect.h
v4l2-subdev.h media: include: update Hans Verkuil's email address 2025-09-09 15:58:56 +02:00
v4l2-vp9.h
videobuf2-core.h media: videobuf2-core: attach once if multiple planes share the same dbuf 2024-08-14 10:05:32 +02:00
videobuf2-dma-contig.h
videobuf2-dma-sg.h
videobuf2-dvb.h
videobuf2-memops.h
videobuf2-v4l2.h media: v4l2: Add REMOVE_BUFS ioctl 2024-03-25 12:00:44 +01:00
videobuf2-vmalloc.h
vsp1.h media: vsp1: Add VSPX support 2025-06-18 09:20:47 +02:00