Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:ateixeira:xps13
intel-ipu6
0011-UBUNTU-SAUCE-i2c-compile-omitted-sensor-dr...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0011-UBUNTU-SAUCE-i2c-compile-omitted-sensor-drivers.patch of Package intel-ipu6
From: You-Sheng Yang <vicamo.yang@canonical.com> Date: Tue, 17 Oct 2023 16:07:55 +0800 Subject: UBUNTU: SAUCE: i2c: compile omitted sensor drivers Signed-off-by: You-Sheng Yang <vicamo.yang@canonical.com> --- Makefile | 3 +++ dkms.conf | 27 ++++++++++++++++----- drivers/media/i2c/Makefile | 6 ++++- drivers/media/i2c/ov13858_intel.c | 49 +++++++++++++++++++++++++++++++++------ 4 files changed, 71 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 6578727..77298b4 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,9 @@ export CONFIG_VIDEO_OV01A1S = m export CONFIG_VIDEO_OV01A10 = m export CONFIG_VIDEO_OV02C10 = m export CONFIG_VIDEO_OV02E10 = m +export CONFIG_VIDEO_OV08A10 = m +export CONFIG_VIDEO_OV13858 = m +export CONFIG_VIDEO_OV8856 = m export CONFIG_VIDEO_HM2170 = m export CONFIG_VIDEO_HM2172 = m export CONFIG_VIDEO_HI556 = m diff --git a/dkms.conf b/dkms.conf index 13d886c..30b7b6b 100644 --- a/dkms.conf +++ b/dkms.conf @@ -76,13 +76,28 @@ BUILT_MODULE_NAME[10]="hi556" BUILT_MODULE_LOCATION[10]="drivers/media/i2c" DEST_MODULE_LOCATION[10]="/updates" +BUILT_MODULE_NAME[11]="ov08a10" +BUILT_MODULE_LOCATION[11]="drivers/media/i2c" +DEST_MODULE_LOCATION[11]="/updates" + +BUILT_MODULE_NAME[12]="ov13858" +BUILT_MODULE_LOCATION[12]="drivers/media/i2c" +DEST_MODULE_LOCATION[12]="/updates" + +BUILT_MODULE_NAME[13]="ov8856" +BUILT_MODULE_LOCATION[13]="drivers/media/i2c" +DEST_MODULE_LOCATION[13]="/updates" if version_lt ${KERNEL_VERSION} 6.8.0; then - BUILT_MODULE_NAME[11]="ov2740" - BUILT_MODULE_LOCATION[11]="drivers/media/i2c" - DEST_MODULE_LOCATION[11]="/updates" + BUILT_MODULE_NAME[14]="ov2740" + BUILT_MODULE_LOCATION[14]="drivers/media/i2c" + DEST_MODULE_LOCATION[14]="/updates" + + BUILT_MODULE_NAME[15]="gc5035" + BUILT_MODULE_LOCATION[15]="drivers/media/i2c" + DEST_MODULE_LOCATION[15]="/updates" else - BUILT_MODULE_NAME[11]="ov05c10" - BUILT_MODULE_LOCATION[11]="drivers/media/i2c" - DEST_MODULE_LOCATION[11]="/updates" + BUILT_MODULE_NAME[14]="ov05c10" + BUILT_MODULE_LOCATION[14]="drivers/media/i2c" + DEST_MODULE_LOCATION[14]="/updates" fi diff --git a/drivers/media/i2c/Makefile b/drivers/media/i2c/Makefile index b4fa255..1be7831 100644 --- a/drivers/media/i2c/Makefile +++ b/drivers/media/i2c/Makefile @@ -8,8 +8,12 @@ obj-$(CONFIG_VIDEO_OV01A10) += ov01a10.o obj-$(CONFIG_VIDEO_OV02C10) += ov02c10.o obj-$(CONFIG_VIDEO_OV02E10) += ov02e10.o obj-$(CONFIG_VIDEO_OV05C10) += ov05c10.o +obj-$(CONFIG_VIDEO_OV08A10) += ov08a10.o +obj-$(CONFIG_VIDEO_OV13858) += ov13858.o +ov13858-objs += ov13858_intel.o obj-$(CONFIG_VIDEO_OV2740) += ov2740.o +obj-$(CONFIG_VIDEO_OV8856) += ov8856.o obj-$(CONFIG_VIDEO_HM2170) += hm2170.o -obj-$(CONFIG_VIDEO_HM2170) += hm2172.o +obj-$(CONFIG_VIDEO_HM2172) += hm2172.o obj-$(CONFIG_VIDEO_HI556) += hi556.o obj-$(CONFIG_POWER_CTRL_LOGIC) += power_ctrl_logic.o diff --git a/drivers/media/i2c/ov13858_intel.c b/drivers/media/i2c/ov13858_intel.c index 4e57428..8b8a3ba 100644 --- a/drivers/media/i2c/ov13858_intel.c +++ b/drivers/media/i2c/ov13858_intel.c @@ -1382,11 +1382,15 @@ static int ov13858_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh) struct ov13858 *ov13858 = to_ov13858(sd); #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) struct v4l2_mbus_framefmt *try_fmt = v4l2_subdev_get_try_format(sd, +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) fh->pad, +#else + fh->state, +#endif 0); #else struct v4l2_mbus_framefmt *try_fmt = v4l2_subdev_state_get_format( - fh->pad, + fh->state, 0); #endif @@ -1522,7 +1526,11 @@ static const struct v4l2_ctrl_ops ov13858_ctrl_ops = { }; static int ov13858_enum_mbus_code(struct v4l2_subdev *sd, +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) struct v4l2_subdev_pad_config *cfg, +#else + struct v4l2_subdev_state *sd_state, +#endif struct v4l2_subdev_mbus_code_enum *code) { /* Only one bayer order(GRBG) is supported */ @@ -1535,7 +1543,11 @@ static int ov13858_enum_mbus_code(struct v4l2_subdev *sd, } static int ov13858_enum_frame_size(struct v4l2_subdev *sd, +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) struct v4l2_subdev_pad_config *cfg, +#else + struct v4l2_subdev_state *sd_state, +#endif struct v4l2_subdev_frame_size_enum *fse) { if (fse->index >= ARRAY_SIZE(supported_modes)) @@ -1562,17 +1574,21 @@ static void ov13858_update_pad_format(const struct ov13858_mode *mode, } static int ov13858_do_get_pad_format(struct ov13858 *ov13858, +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) struct v4l2_subdev_pad_config *cfg, +#else + struct v4l2_subdev_state *sd_state, +#endif struct v4l2_subdev_format *fmt) { struct v4l2_mbus_framefmt *framefmt; struct v4l2_subdev *sd = &ov13858->sd; if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad); #else - framefmt = v4l2_subdev_state_get_format(cfg, fmt->pad); + framefmt = v4l2_subdev_get_try_format(sd, sd_state, fmt->pad); #endif fmt->format = *framefmt; } else { @@ -1583,14 +1599,22 @@ static int ov13858_do_get_pad_format(struct ov13858 *ov13858, } static int ov13858_get_pad_format(struct v4l2_subdev *sd, +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) struct v4l2_subdev_pad_config *cfg, +#else + struct v4l2_subdev_state *sd_state, +#endif struct v4l2_subdev_format *fmt) { struct ov13858 *ov13858 = to_ov13858(sd); int ret; mutex_lock(&ov13858->mutex); +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) ret = ov13858_do_get_pad_format(ov13858, cfg, fmt); +#else + ret = ov13858_do_get_pad_format(ov13858, sd_state, fmt); +#endif mutex_unlock(&ov13858->mutex); return ret; @@ -1598,7 +1622,11 @@ static int ov13858_get_pad_format(struct v4l2_subdev *sd, static int ov13858_set_pad_format(struct v4l2_subdev *sd, +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) struct v4l2_subdev_pad_config *cfg, +#else + struct v4l2_subdev_state *sd_state, +#endif struct v4l2_subdev_format *fmt) { struct ov13858 *ov13858 = to_ov13858(sd); @@ -1622,10 +1650,10 @@ ov13858_set_pad_format(struct v4l2_subdev *sd, fmt->format.width, fmt->format.height); ov13858_update_pad_format(mode, fmt); if (fmt->which == V4L2_SUBDEV_FORMAT_TRY) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 8, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) framefmt = v4l2_subdev_get_try_format(sd, cfg, fmt->pad); #else - framefmt = v4l2_subdev_state_get_format(cfg, fmt->pad); + framefmt = v4l2_subdev_get_try_format(sd, sd_state, fmt->pad); #endif *framefmt = fmt->format; } else { @@ -1958,8 +1986,7 @@ static void ov13858_free_controls(struct ov13858 *ov13858) mutex_destroy(&ov13858->mutex); } -static int ov13858_probe(struct i2c_client *client, - const struct i2c_device_id *devid) +static int ov13858_probe(struct i2c_client *client) { struct ov13858 *ov13858; int ret; @@ -2004,7 +2031,11 @@ static int ov13858_probe(struct i2c_client *client, goto error_handler_free; } +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0) ret = v4l2_async_register_subdev_sensor_common(&ov13858->sd); +#else + ret = v4l2_async_register_subdev_sensor(&ov13858->sd); +#endif if (ret < 0) goto error_media_entity; @@ -2074,7 +2105,11 @@ static struct i2c_driver ov13858_i2c_driver = { .pm = &ov13858_pm_ops, .acpi_match_table = ACPI_PTR(ov13858_acpi_ids), }, +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0) + .probe_new = ov13858_probe, +#else .probe = ov13858_probe, +#endif .remove = ov13858_remove, .id_table = ov13858_id_table, };
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor