media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 13 Dec 2023 15:00:04 +0000 (17:00 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 13 Dec 2023 15:52:35 +0000 (16:52 +0100)
commit287fe160834acdf9c44e5b73676180c6dbdedf76
tree46b10e2d8c2aecd1c7d6240e4c82baceeeb6d823
parent08e5c36410ca5cb14237e47e6dfe3fde02e0f275
media: v4l2-subdev: Turn .[gs]_frame_interval into pad operations

The subdev .[gs]_frame_interval are video operations, but they operate
on pads (and even on streams). Not only is this confusing, it causes
practical issues for drivers as the operations don't receive a subdev
state pointer, requiring manual state handling.

To improve the situation, turn the operations into pad operations, and
extend them to receive a state pointer like other pad operations.

While at it, rename the operations to .[gs]et_frame_interval at the same
time to match the naming scheme of other pad operations. This isn't
strictly necessary, but given that all drivers using those operations
need to be modified, handling the rename separately would generate more
churn for very little gain (if at all).

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> # for imx-media
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com> # for tegra-video
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
42 files changed:
drivers/media/i2c/adv7180.c
drivers/media/i2c/alvium-csi2.c
drivers/media/i2c/et8ek8/et8ek8_driver.c
drivers/media/i2c/imx214.c
drivers/media/i2c/imx274.c
drivers/media/i2c/max9286.c
drivers/media/i2c/mt9m111.c
drivers/media/i2c/mt9m114.c
drivers/media/i2c/mt9v011.c
drivers/media/i2c/mt9v111.c
drivers/media/i2c/ov2680.c
drivers/media/i2c/ov5640.c
drivers/media/i2c/ov5648.c
drivers/media/i2c/ov5693.c
drivers/media/i2c/ov6650.c
drivers/media/i2c/ov7251.c
drivers/media/i2c/ov7670.c
drivers/media/i2c/ov772x.c
drivers/media/i2c/ov7740.c
drivers/media/i2c/ov8865.c
drivers/media/i2c/ov9650.c
drivers/media/i2c/s5c73m3/s5c73m3-core.c
drivers/media/i2c/s5k5baf.c
drivers/media/i2c/thp7312.c
drivers/media/i2c/tvp514x.c
drivers/media/usb/em28xx/em28xx-video.c
drivers/media/v4l2-core/v4l2-common.c
drivers/media/v4l2-core/v4l2-subdev.c
drivers/staging/media/atomisp/i2c/atomisp-gc0310.c
drivers/staging/media/atomisp/i2c/atomisp-gc2235.c
drivers/staging/media/atomisp/i2c/atomisp-mt9m114.c
drivers/staging/media/atomisp/i2c/atomisp-ov2722.c
drivers/staging/media/atomisp/pci/atomisp_cmd.c
drivers/staging/media/atomisp/pci/atomisp_ioctl.c
drivers/staging/media/imx/imx-ic-prp.c
drivers/staging/media/imx/imx-ic-prpencvf.c
drivers/staging/media/imx/imx-media-capture.c
drivers/staging/media/imx/imx-media-csi.c
drivers/staging/media/imx/imx-media-vdic.c
drivers/staging/media/tegra-video/csi.c
include/media/v4l2-common.h
include/media/v4l2-subdev.h