Files
packages/anda/system/intel-ipu6-kmod/0007-modules-per-kernel.patch
T
Gil 562cf68d3f [IPU6 Part 1] Add: IPU6 Camera Stack (Without ipu6-camera-hal) (#2919)
* Add: IPU6 Camera Stack

* Fix: Use Mock

* Change: Remove ipu6-camera-hal to move to another PR
2025-01-12 18:15:53 +08:00

774 lines
28 KiB
Diff

From 2c4ad1398dddfb307e8a40a714a6d5f70d6d14cb Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Mon, 10 Jun 2024 13:05:53 +0200
Subject: [PATCH 4/4] Makefile: Adjust which modules to build for which
kernel-versions for Fedora
Fedora's kernels have not enabled various IPU6 related drivers as soon
as they were mainlined. Instead they were enabled at later times.
Fix the automatic disabling of certain modules to match when they were
enabled in the Fedora kernels:
Do not build ljca for kernels >= 6.7
Do not build ivsc for kernels >= 6.10
Do not build ov2740 for kernels >= 6.10 (1)
Do not build ov01a10 for kernels >= 6.10
Do not build hi556 for kernels >= 6.10 (2)
Do not build cio2-bridge for kernels >= 6.10 (3)
1) Also switch the Kconfig symbols for mainlined sensor drivers from
CONFIG_VIDEO_FOO to CONFIG_ICAMERA_FOO to avoid these still being
set when they should not because of the CONFIG_VIDEO_FOO symbols
inherited from the base kernel.
2) hi556 was enabled in earlier Fedora patches but the mainline version
missed reset GPIO / clk / regulator support
3) The mainline ipu6-bridge is only used for kernels >= 6.10 because it
lacked ACPI HIDs for many of the still out of tree sensor drivers, see:
https://lore.kernel.org/linux-media/20240610173418.16119-1-hdegoede@redhat.com/
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
Makefile | 20 ++++++++++++--------
drivers/media/i2c/Makefile | 7 ++++---
drivers/media/i2c/hi556.c | 20 ++++++++++----------
drivers/media/i2c/hm2170.c | 20 ++++++++++----------
drivers/media/i2c/hm2172.c | 20 ++++++++++----------
drivers/media/i2c/ov01a10.c | 18 +++++++++---------
drivers/media/i2c/ov01a1s.c | 20 ++++++++++----------
drivers/media/i2c/ov02c10.c | 20 ++++++++++----------
drivers/media/i2c/ov02e10.c | 20 ++++++++++----------
9 files changed, 85 insertions(+), 80 deletions(-)
diff --git a/Makefile b/Makefile
index 4734c4497..5d716eb61 100644
--- a/Makefile
+++ b/Makefile
@@ -20,15 +20,16 @@ version_lt = $(shell \
echo "false"; \
fi)
-KV_IVSC := 6.6.0
-KV_IPU_BRIDGE := 6.6.0
-KV_OV2740 := 6.8.0
+KV_LJCA := 6.7.0
+KV_IVSC := 6.10.0
+KV_IPU_BRIDGE := 6.10.0
+KV_OV2740 := 6.10.0
KERNEL_SRC ?= /lib/modules/$(KERNELRELEASE)/build
MODSRC := $(shell pwd)
-ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_IVSC)),true)
-$(warning build ljca ivsc)
+ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_LJCA)),true)
+$(warning build ljca)
obj-m += ljca.o
ljca-y := drivers/mfd/ljca.o
@@ -40,7 +41,10 @@ gpio-ljca-y := drivers/gpio/gpio-ljca.o
obj-m += i2c-ljca.o
i2c-ljca-y := drivers/i2c/busses/i2c-ljca.o
+endif
+ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_IVSC)),true)
+$(warning build ivsc)
obj-m += mei-vsc.o
mei-vsc-y := drivers/misc/mei/spi-vsc.o
mei-vsc-y += drivers/misc/mei/hw-vsc.o
@@ -77,16 +81,16 @@ obj-y += drivers/media/pci/intel/
export CONFIG_VIDEO_HM11B1 = m
export CONFIG_VIDEO_OV01A1S = m
-export CONFIG_VIDEO_OV01A10 = m
export CONFIG_VIDEO_OV02C10 = m
export CONFIG_VIDEO_OV02E10 = m
export CONFIG_VIDEO_HM2170 = m
export CONFIG_VIDEO_HM2172 = m
-export CONFIG_VIDEO_HI556 = m
export CONFIG_VIDEO_GC5035 = m
ifeq ($(call version_lt,$(KERNEL_VERSION),$(KV_OV2740)),true)
-export CONFIG_VIDEO_OV2740 = m
+export CONFIG_ICAMERA_OV2740 = m
+export CONFIG_ICAMERA_OV01A10 = m
+export CONFIG_ICAMERA_HI556 = m
endif
obj-y += drivers/media/i2c/
diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile
index 1f395448b..f49609620 100644
--- a/drivers/media/i2c/Makefile
+++ b/drivers/media/i2c/Makefile
@@ -4,11 +4,12 @@
obj-$(CONFIG_VIDEO_HM11B1) += hm11b1.o
obj-$(CONFIG_VIDEO_GC5035) += gc5035.o
obj-$(CONFIG_VIDEO_OV01A1S) += ov01a1s.o
-obj-$(CONFIG_VIDEO_OV01A10) += ov01a10.o
obj-$(CONFIG_VIDEO_OV02C10) += ov02c10.o
obj-$(CONFIG_VIDEO_OV02E10) += ov02e10.o
-obj-$(CONFIG_VIDEO_OV2740) += ov2740.o
obj-$(CONFIG_VIDEO_HM2170) += hm2170.o
obj-$(CONFIG_VIDEO_HM2170) += hm2172.o
-obj-$(CONFIG_VIDEO_HI556) += hi556.o
obj-$(CONFIG_POWER_CTRL_LOGIC) += power_ctrl_logic.o
+
+obj-$(CONFIG_ICAMERA_OV2740) += ov2740.o
+obj-$(CONFIG_ICAMERA_OV01A10) += ov01a10.o
+obj-$(CONFIG_ICAMERA_HI556) += hi556.o
diff --git a/drivers/media/i2c/hi556.c b/drivers/media/i2c/hi556.c
index 4fc020b65..2adb5a1fe 100644
--- a/drivers/media/i2c/hi556.c
+++ b/drivers/media/i2c/hi556.c
@@ -12,7 +12,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
@@ -510,7 +510,7 @@ struct hi556 {
/* Clock provider */
struct clk *img_clk;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct vsc_mipi_config conf;
struct vsc_camera_status status;
@@ -527,7 +527,7 @@ struct hi556 {
/* True if the device has been identified */
bool identified;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
bool use_intel_vsc;
#endif
@@ -704,7 +704,7 @@ static int hi556_set_ctrl(struct v4l2_ctrl *ctrl)
ret = hi556_test_pattern(hi556, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -732,7 +732,7 @@ static int hi556_init_controls(struct hi556 *hi556)
int ret;
ctrl_hdlr = &hi556->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -771,7 +771,7 @@ static int hi556_init_controls(struct hi556 *hi556)
h_blank);
if (hi556->hblank)
hi556->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
hi556->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hi556_ctrl_ops,
V4L2_CID_PRIVACY, 0, 1, 1,
@@ -836,7 +836,7 @@ static int hi556_identify_module(struct hi556 *hi556)
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void hi556_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -936,7 +936,7 @@ static int hi556_power_off(struct device *dev)
struct hi556 *hi556 = to_hi556(sd);
int ret = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (hi556->use_intel_vsc) {
ret = vsc_release_camera_sensor(&hi556->status);
@@ -961,7 +961,7 @@ static int hi556_power_on(struct device *dev)
struct hi556 *hi556 = to_hi556(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (hi556->use_intel_vsc) {
hi556->conf.lane_num = HI556_DATA_LANES;
@@ -1217,7 +1217,7 @@ static int hi556_get_pm_resources(struct device *dev)
struct hi556 *hi556 = to_hi556(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
acpi_handle handle = ACPI_HANDLE(dev);
struct acpi_handle_list dep_devices;
diff --git a/drivers/media/i2c/hm2170.c b/drivers/media/i2c/hm2170.c
index 102eec25a..2987e0cbe 100644
--- a/drivers/media/i2c/hm2170.c
+++ b/drivers/media/i2c/hm2170.c
@@ -13,7 +13,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
#endif
@@ -615,7 +615,7 @@ struct hm2170 {
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *hblank;
struct v4l2_ctrl *exposure;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct vsc_mipi_config conf;
struct vsc_camera_status status;
@@ -792,7 +792,7 @@ static int hm2170_set_ctrl(struct v4l2_ctrl *ctrl)
ret = hm2170_test_pattern(hm2170, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -825,7 +825,7 @@ static int hm2170_init_controls(struct hm2170 *hm2170)
int ret = 0;
ctrl_hdlr = &hm2170->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -864,7 +864,7 @@ static int hm2170_init_controls(struct hm2170 *hm2170)
h_blank);
if (hm2170->hblank)
hm2170->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
hm2170->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hm2170_ctrl_ops,
V4L2_CID_PRIVACY, 0, 1, 1,
@@ -904,7 +904,7 @@ static void hm2170_update_pad_format(const struct hm2170_mode *mode,
fmt->field = V4L2_FIELD_NONE;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void hm2170_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -984,7 +984,7 @@ static int hm2170_set_stream(struct v4l2_subdev *sd, int enable)
return ret;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static int hm2170_power_off(struct device *dev)
{
@@ -1323,7 +1323,7 @@ static int hm2170_probe(struct i2c_client *client)
}
v4l2_i2c_subdev_init(&hm2170->sd, client, &hm2170_subdev_ops);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
hm2170->conf.lane_num = HM2170_DATA_LANES;
/* frequency unit 100k */
@@ -1389,7 +1389,7 @@ probe_error_v4l2_ctrl_handler_free:
mutex_destroy(&hm2170->mutex);
probe_error_ret:
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
hm2170_power_off(&client->dev);
#endif
@@ -1399,7 +1399,7 @@ probe_error_ret:
static const struct dev_pm_ops hm2170_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(hm2170_suspend, hm2170_resume)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
SET_RUNTIME_PM_OPS(hm2170_power_off, hm2170_power_on, NULL)
#endif
diff --git a/drivers/media/i2c/hm2172.c b/drivers/media/i2c/hm2172.c
index 3362d3151..8e1d1f883 100644
--- a/drivers/media/i2c/hm2172.c
+++ b/drivers/media/i2c/hm2172.c
@@ -15,7 +15,7 @@
#include <media/v4l2-fwnode.h>
#include <linux/clk.h>
#include <linux/gpio/consumer.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
@@ -927,7 +927,7 @@ struct hm2172 {
struct gpio_desc *reset;
struct gpio_desc *handshake;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct vsc_mipi_config conf;
struct vsc_camera_status status;
@@ -942,7 +942,7 @@ struct hm2172 {
/* Streaming on/off */
bool streaming;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
bool use_intel_vsc;
#endif
@@ -1109,7 +1109,7 @@ static int hm2172_set_ctrl(struct v4l2_ctrl *ctrl)
ret = hm2172_test_pattern(hm2172, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -1142,7 +1142,7 @@ static int hm2172_init_controls(struct hm2172 *hm2172)
int ret = 0;
ctrl_hdlr = &hm2172->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -1183,7 +1183,7 @@ static int hm2172_init_controls(struct hm2172 *hm2172)
if (hm2172->hblank)
hm2172->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
hm2172->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &hm2172_ctrl_ops,
V4L2_CID_PRIVACY, 0, 1, 1,
@@ -1223,7 +1223,7 @@ static void hm2172_update_pad_format(const struct hm2172_mode *mode,
fmt->field = V4L2_FIELD_NONE;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void hm2172_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -1309,7 +1309,7 @@ static int hm2172_power_off(struct device *dev)
struct hm2172 *hm2172 = to_hm2172(sd);
int ret = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (hm2172->use_intel_vsc) {
ret = vsc_release_camera_sensor(&hm2172->status);
@@ -1336,7 +1336,7 @@ static int hm2172_power_on(struct device *dev)
struct hm2172 *hm2172 = to_hm2172(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (hm2172->use_intel_vsc) {
hm2172->conf.lane_num = HM2172_DATA_LANES;
@@ -1392,7 +1392,7 @@ static int hm2172_get_pm_resources(struct device *dev)
struct hm2172 *hm2172 = to_hm2172(sd);
int ret = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
acpi_handle handle = ACPI_HANDLE(dev);
struct acpi_handle_list dep_devices;
diff --git a/drivers/media/i2c/ov01a10.c b/drivers/media/i2c/ov01a10.c
index 78ae01811..31f1e7a3d 100644
--- a/drivers/media/i2c/ov01a10.c
+++ b/drivers/media/i2c/ov01a10.c
@@ -11,7 +11,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
#endif
@@ -296,7 +296,7 @@ struct ov01a10 {
/* To serialize asynchronus callbacks */
struct mutex mutex;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct vsc_mipi_config conf;
struct vsc_camera_status status;
@@ -469,7 +469,7 @@ static int ov01a10_set_ctrl(struct v4l2_ctrl *ctrl)
ret = ov01a10_test_pattern(ov01a10, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -500,7 +500,7 @@ static int ov01a10_init_controls(struct ov01a10 *ov01a10)
int ret = 0;
ctrl_hdlr = &ov01a10->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -539,7 +539,7 @@ static int ov01a10_init_controls(struct ov01a10 *ov01a10)
if (ov01a10->hblank)
ov01a10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov01a10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr,
&ov01a10_ctrl_ops,
@@ -661,7 +661,7 @@ static int ov01a10_set_stream(struct v4l2_subdev *sd, int enable)
return ret;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void ov01a10_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -1016,7 +1016,7 @@ static int ov01a10_probe(struct i2c_client *client)
return -ENOMEM;
v4l2_i2c_subdev_init(&ov01a10->sd, client, &ov01a10_subdev_ops);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov01a10->conf.lane_num = OV01A10_DATA_LANES;
/* frequency unit 100k */
@@ -1082,7 +1082,7 @@ probe_error_v4l2_ctrl_handler_free:
mutex_destroy(&ov01a10->mutex);
probe_error_ret:
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov01a10_power_off(&client->dev);
#endif
@@ -1092,7 +1092,7 @@ probe_error_ret:
static const struct dev_pm_ops ov01a10_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(ov01a10_suspend, ov01a10_resume)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
SET_RUNTIME_PM_OPS(ov01a10_power_off, ov01a10_power_on, NULL)
#endif
diff --git a/drivers/media/i2c/ov01a1s.c b/drivers/media/i2c/ov01a1s.c
index f7cf2218c..85f9c684c 100644
--- a/drivers/media/i2c/ov01a1s.c
+++ b/drivers/media/i2c/ov01a1s.c
@@ -17,7 +17,7 @@
#elif IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
#include "power_ctrl_logic.h"
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
#endif
@@ -303,7 +303,7 @@ struct ov01a1s {
struct v4l2_ctrl *vblank;
struct v4l2_ctrl *hblank;
struct v4l2_ctrl *exposure;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct v4l2_ctrl *privacy_status;
@@ -337,7 +337,7 @@ struct ov01a1s {
#if IS_ENABLED(CONFIG_INTEL_SKL_INT3472) || IS_ENABLED(CONFIG_POWER_CTRL_LOGIC)
OV01A1S_USE_INT3472 = 1,
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
OV01A1S_USE_INTEL_VSC = 2,
#endif
@@ -508,7 +508,7 @@ static int ov01a1s_set_ctrl(struct v4l2_ctrl *ctrl)
ret = ov01a1s_test_pattern(ov01a1s, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -539,7 +539,7 @@ static int ov01a1s_init_controls(struct ov01a1s *ov01a1s)
int ret = 0;
ctrl_hdlr = &ov01a1s->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -577,7 +577,7 @@ static int ov01a1s_init_controls(struct ov01a1s *ov01a1s)
1, h_blank);
if (ov01a1s->hblank)
ov01a1s->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov01a1s->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr,
&ov01a1s_ctrl_ops,
@@ -619,7 +619,7 @@ static void ov01a1s_update_pad_format(const struct ov01a1s_mode *mode,
fmt->field = V4L2_FIELD_NONE;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void ov01a1s_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -729,7 +729,7 @@ static int ov01a1s_power_off(struct device *dev)
if (ov01a1s->power_type == OV01A1S_USE_INT3472)
ret = power_ctrl_logic_set_power(0);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (ov01a1s->power_type == OV01A1S_USE_INTEL_VSC) {
ret = vsc_release_camera_sensor(&ov01a1s->status);
@@ -764,7 +764,7 @@ static int ov01a1s_power_on(struct device *dev)
if (ov01a1s->power_type == OV01A1S_USE_INT3472)
ret = power_ctrl_logic_set_power(1);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (ov01a1s->power_type == OV01A1S_USE_INTEL_VSC) {
ret = vsc_acquire_camera_sensor(&ov01a1s->conf,
@@ -1125,7 +1125,7 @@ static int ov01a1s_parse_power(struct ov01a1s *ov01a1s)
{
int ret = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov01a1s->conf.lane_num = OV01A1S_DATA_LANES;
/* frequency unit 100k */
diff --git a/drivers/media/i2c/ov02c10.c b/drivers/media/i2c/ov02c10.c
index 40865f8e3..4f58d5ac9 100644
--- a/drivers/media/i2c/ov02c10.c
+++ b/drivers/media/i2c/ov02c10.c
@@ -13,7 +13,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
@@ -697,7 +697,7 @@ struct ov02c10 {
struct gpio_desc *reset;
struct gpio_desc *handshake;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct vsc_mipi_config conf;
struct vsc_camera_status status;
@@ -717,7 +717,7 @@ IS_ENABLED(CONFIG_INTEL_VSC)
/* Module name index */
u8 module_name_index;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
bool use_intel_vsc;
@@ -857,7 +857,7 @@ static int ov02c10_set_ctrl(struct v4l2_ctrl *ctrl)
ret = ov02c10_test_pattern(ov02c10, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -888,7 +888,7 @@ static int ov02c10_init_controls(struct ov02c10 *ov02c10)
int ret = 0;
ctrl_hdlr = &ov02c10->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -926,7 +926,7 @@ IS_ENABLED(CONFIG_INTEL_VSC)
1, h_blank);
if (ov02c10->hblank)
ov02c10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov02c10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr,
&ov02c10_ctrl_ops,
@@ -1102,7 +1102,7 @@ static int ov02c10_get_pm_resources(struct device *dev)
struct ov02c10 *ov02c10 = to_ov02c10(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
acpi_handle handle = ACPI_HANDLE(dev);
struct acpi_handle_list deps;
@@ -1162,7 +1162,7 @@ IS_ENABLED(CONFIG_INTEL_VSC)
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void ov02c10_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -1179,7 +1179,7 @@ static int ov02c10_power_off(struct device *dev)
struct ov02c10 *ov02c10 = to_ov02c10(sd);
int ret = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (ov02c10->use_intel_vsc) {
ret = vsc_release_camera_sensor(&ov02c10->status);
@@ -1206,7 +1206,7 @@ static int ov02c10_power_on(struct device *dev)
struct ov02c10 *ov02c10 = to_ov02c10(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (ov02c10->use_intel_vsc) {
ov02c10->conf.lane_num = ov02c10->mipi_lanes;
diff --git a/drivers/media/i2c/ov02e10.c b/drivers/media/i2c/ov02e10.c
index 916def90f..c5c373aa6 100644
--- a/drivers/media/i2c/ov02e10.c
+++ b/drivers/media/i2c/ov02e10.c
@@ -13,7 +13,7 @@
#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
#include <linux/vsc.h>
@@ -289,7 +289,7 @@ struct ov02e10 {
struct gpio_desc *reset;
struct gpio_desc *handshake;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
struct vsc_mipi_config conf;
struct vsc_camera_status status;
@@ -304,7 +304,7 @@ struct ov02e10 {
/* Streaming on/off */
bool streaming;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
bool use_intel_vsc;
#endif
@@ -486,7 +486,7 @@ static int ov02e10_set_ctrl(struct v4l2_ctrl *ctrl)
ret = ov02e10_test_pattern(ov02e10, ctrl->val);
break;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
case V4L2_CID_PRIVACY:
dev_dbg(&client->dev, "set privacy to %d", ctrl->val);
@@ -520,7 +520,7 @@ static int ov02e10_init_controls(struct ov02e10 *ov02e10)
int ret;
ctrl_hdlr = &ov02e10->ctrl_handler;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ret = v4l2_ctrl_handler_init(ctrl_hdlr, 9);
#else
@@ -561,7 +561,7 @@ static int ov02e10_init_controls(struct ov02e10 *ov02e10)
if (ov02e10->hblank)
ov02e10->hblank->flags |= V4L2_CTRL_FLAG_READ_ONLY;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
ov02e10->privacy_status = v4l2_ctrl_new_std(ctrl_hdlr, &ov02e10_ctrl_ops,
V4L2_CID_PRIVACY, 0, 1, 1,
@@ -602,7 +602,7 @@ static void ov02e10_update_pad_format(const struct ov02e10_mode *mode,
fmt->field = V4L2_FIELD_NONE;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
static void ov02e10_vsc_privacy_callback(void *handle,
enum vsc_privacy_status status)
@@ -696,7 +696,7 @@ static int ov02e10_get_pm_resources(struct device *dev)
struct ov02e10 *ov02e10 = to_ov02e10(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
acpi_handle handle = ACPI_HANDLE(dev);
struct acpi_handle_list dep_devices;
@@ -763,7 +763,7 @@ static int ov02e10_power_off(struct device *dev)
struct ov02e10 *ov02e10 = to_ov02e10(sd);
int ret = 0;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (ov02e10->use_intel_vsc) {
ret = vsc_release_camera_sensor(&ov02e10->status);
@@ -790,7 +790,7 @@ static int ov02e10_power_on(struct device *dev)
struct ov02e10 *ov02e10 = to_ov02e10(sd);
int ret;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) && \
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 10, 0) && \
IS_ENABLED(CONFIG_INTEL_VSC)
if (ov02e10->use_intel_vsc) {
ov02e10->conf.lane_num = OV02E10_DATA_LANES;
--
2.45.1