From cdece49a36480b7b4776059a1b7f64e9e141cd8e Mon Sep 17 00:00:00 2001 From: Cai Wenzhong Date: Tue, 1 Apr 2025 15:57:32 +0800 Subject: [PATCH] media: i2c: maxim: driver version v3.09.01 Signed-off-by: Cai Wenzhong Change-Id: Iaf1dc715c63ce99532090fed50cebff16a4f6714 --- drivers/media/i2c/maxim/local/maxim2c/maxim2c_drv.c | 9 +++++++-- drivers/media/i2c/maxim/local/maxim2c/maxim2c_v4l2.c | 2 +- drivers/media/i2c/maxim/local/maxim4c/maxim4c_drv.c | 9 +++++++-- drivers/media/i2c/maxim/local/maxim4c/maxim4c_v4l2.c | 2 +- drivers/media/i2c/maxim/remote/dummy.c | 4 ++-- drivers/media/i2c/maxim/remote/os04a10.c | 4 ++-- drivers/media/i2c/maxim/remote/ov231x.c | 4 ++-- drivers/media/i2c/maxim/remote/ox01f10.c | 4 ++-- drivers/media/i2c/maxim/remote/ox03j10.c | 4 ++-- drivers/media/i2c/maxim/remote/sc320at.c | 4 ++-- 10 files changed, 28 insertions(+), 18 deletions(-) diff --git a/drivers/media/i2c/maxim/local/maxim2c/maxim2c_drv.c b/drivers/media/i2c/maxim/local/maxim2c/maxim2c_drv.c index ae3be2f197e9..2564d148e94e 100644 --- a/drivers/media/i2c/maxim/local/maxim2c/maxim2c_drv.c +++ b/drivers/media/i2c/maxim/local/maxim2c/maxim2c_drv.c @@ -64,6 +64,11 @@ * 1. if remote camera not connected, hot plug state check timer working, * fix the issue of mutex deadlock when stream off. * + * V3.09.01 + * 1. initialize controls using v4l2_ctrl_s_ctrl instead of __v4l2_ctrl_s_ctrl, + * fix lockdep debug warning. + * 2. fix compile warning when MAXIM2C_LOCAL_DES_ON_OFF_EN enable. + * */ #include #include @@ -91,7 +96,7 @@ #include "maxim2c_api.h" -#define DRIVER_VERSION KERNEL_VERSION(3, 0x09, 0x00) +#define DRIVER_VERSION KERNEL_VERSION(3, 0x09, 0x01) #define MAXIM2C_NAME "maxim2c" @@ -446,6 +451,7 @@ static int maxim2c_runtime_suspend(struct device *dev) static int __maybe_unused maxim2c_resume(struct device *dev) { +#if (MAXIM2C_LOCAL_DES_ON_OFF_EN == 0) struct i2c_client *client = to_i2c_client(dev); struct v4l2_subdev *sd = i2c_get_clientdata(client); maxim2c_t *maxim2c = v4l2_get_subdevdata(sd); @@ -453,7 +459,6 @@ static int __maybe_unused maxim2c_resume(struct device *dev) dev_info(dev, "maxim2c resume\n"); -#if (MAXIM2C_LOCAL_DES_ON_OFF_EN == 0) #if MAXIM2C_TEST_PATTERN ret = maxim2c_pattern_hw_init(maxim2c); if (ret) { diff --git a/drivers/media/i2c/maxim/local/maxim2c/maxim2c_v4l2.c b/drivers/media/i2c/maxim/local/maxim2c/maxim2c_v4l2.c index 1f4c331b0583..83729a942428 100644 --- a/drivers/media/i2c/maxim/local/maxim2c/maxim2c_v4l2.c +++ b/drivers/media/i2c/maxim/local/maxim2c/maxim2c_v4l2.c @@ -1181,7 +1181,7 @@ static int maxim2c_initialize_controls(maxim2c_t *maxim2c) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_items) - 1, 0, link_freq_items); - __v4l2_ctrl_s_ctrl(maxim2c->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(maxim2c->link_freq, mode->link_freq_idx); link_freq = link_freq_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", diff --git a/drivers/media/i2c/maxim/local/maxim4c/maxim4c_drv.c b/drivers/media/i2c/maxim/local/maxim4c/maxim4c_drv.c index 28726207b43d..505fe2413ca9 100644 --- a/drivers/media/i2c/maxim/local/maxim4c/maxim4c_drv.c +++ b/drivers/media/i2c/maxim/local/maxim4c/maxim4c_drv.c @@ -87,6 +87,11 @@ * 1. if remote camera not connected, hot plug state check timer working, * fix the issue of mutex deadlock when stream off. * + * V3.09.01 + * 1. initialize controls using v4l2_ctrl_s_ctrl instead of __v4l2_ctrl_s_ctrl, + * fix lockdep debug warning. + * 2. fix compile warning when MAXIM4C_LOCAL_DES_ON_OFF_EN enable. + * */ #include #include @@ -114,7 +119,7 @@ #include "maxim4c_api.h" -#define DRIVER_VERSION KERNEL_VERSION(3, 0x09, 0x00) +#define DRIVER_VERSION KERNEL_VERSION(3, 0x09, 0x01) #define MAXIM4C_NAME "maxim4c" @@ -521,6 +526,7 @@ static int maxim4c_runtime_suspend(struct device *dev) static int __maybe_unused maxim4c_resume(struct device *dev) { +#if (MAXIM4C_LOCAL_DES_ON_OFF_EN == 0) struct i2c_client *client = to_i2c_client(dev); struct v4l2_subdev *sd = i2c_get_clientdata(client); maxim4c_t *maxim4c = v4l2_get_subdevdata(sd); @@ -528,7 +534,6 @@ static int __maybe_unused maxim4c_resume(struct device *dev) dev_info(dev, "maxim4c resume\n"); -#if (MAXIM4C_LOCAL_DES_ON_OFF_EN == 0) #if MAXIM4C_TEST_PATTERN ret = maxim4c_pattern_hw_init(maxim4c); if (ret) { diff --git a/drivers/media/i2c/maxim/local/maxim4c/maxim4c_v4l2.c b/drivers/media/i2c/maxim/local/maxim4c/maxim4c_v4l2.c index 6b1519c98008..754f36008117 100644 --- a/drivers/media/i2c/maxim/local/maxim4c/maxim4c_v4l2.c +++ b/drivers/media/i2c/maxim/local/maxim4c/maxim4c_v4l2.c @@ -1182,7 +1182,7 @@ static int maxim4c_initialize_controls(maxim4c_t *maxim4c) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_items) - 1, 0, link_freq_items); - __v4l2_ctrl_s_ctrl(maxim4c->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(maxim4c->link_freq, mode->link_freq_idx); link_freq = link_freq_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", diff --git a/drivers/media/i2c/maxim/remote/dummy.c b/drivers/media/i2c/maxim/remote/dummy.c index c6039ffbb668..9b5dab6ea880 100644 --- a/drivers/media/i2c/maxim/remote/dummy.c +++ b/drivers/media/i2c/maxim/remote/dummy.c @@ -26,7 +26,7 @@ #include "maxim_remote.h" -#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x03) +#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x04) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -1128,7 +1128,7 @@ static int sensor_initialize_controls(struct sensor *sensor) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_menu_items) - 1, 0, link_freq_menu_items); - __v4l2_ctrl_s_ctrl(sensor->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(sensor->link_freq, mode->link_freq_idx); link_freq = link_freq_menu_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", mode->link_freq_idx, link_freq); diff --git a/drivers/media/i2c/maxim/remote/os04a10.c b/drivers/media/i2c/maxim/remote/os04a10.c index 46ad2ad43cdc..5d7b2f6a8775 100644 --- a/drivers/media/i2c/maxim/remote/os04a10.c +++ b/drivers/media/i2c/maxim/remote/os04a10.c @@ -28,7 +28,7 @@ #include "maxim_remote.h" -#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x01) +#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x02) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -2722,7 +2722,7 @@ static int os04a10_initialize_controls(struct os04a10 *os04a10) 0, PIXEL_RATE_WITH_648M, 1, dst_pixel_rate); - __v4l2_ctrl_s_ctrl(os04a10->link_freq, dst_link_freq); + v4l2_ctrl_s_ctrl(os04a10->link_freq, dst_link_freq); h_blank = mode->hts_def - mode->width; os04a10->hblank = v4l2_ctrl_new_std(handler, NULL, V4L2_CID_HBLANK, diff --git a/drivers/media/i2c/maxim/remote/ov231x.c b/drivers/media/i2c/maxim/remote/ov231x.c index f336466012ef..87789cee22e2 100644 --- a/drivers/media/i2c/maxim/remote/ov231x.c +++ b/drivers/media/i2c/maxim/remote/ov231x.c @@ -24,7 +24,7 @@ #include "maxim_remote.h" -#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x02) +#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x03) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -907,7 +907,7 @@ static int ov231x_initialize_controls(struct ov231x *ov231x) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_menu_items) - 1, 0, link_freq_menu_items); - __v4l2_ctrl_s_ctrl(ov231x->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(ov231x->link_freq, mode->link_freq_idx); link_freq = link_freq_menu_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", mode->link_freq_idx, link_freq); diff --git a/drivers/media/i2c/maxim/remote/ox01f10.c b/drivers/media/i2c/maxim/remote/ox01f10.c index 4e3d14d9ec06..0d28b52ce8ed 100644 --- a/drivers/media/i2c/maxim/remote/ox01f10.c +++ b/drivers/media/i2c/maxim/remote/ox01f10.c @@ -24,7 +24,7 @@ #include "maxim_remote.h" -#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x02) +#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x03) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -907,7 +907,7 @@ static int ox01f10_initialize_controls(struct ox01f10 *ox01f10) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_menu_items) - 1, 0, link_freq_menu_items); - __v4l2_ctrl_s_ctrl(ox01f10->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(ox01f10->link_freq, mode->link_freq_idx); link_freq = link_freq_menu_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", mode->link_freq_idx, link_freq); diff --git a/drivers/media/i2c/maxim/remote/ox03j10.c b/drivers/media/i2c/maxim/remote/ox03j10.c index 5e02e5e265ca..c996bb8d231d 100644 --- a/drivers/media/i2c/maxim/remote/ox03j10.c +++ b/drivers/media/i2c/maxim/remote/ox03j10.c @@ -24,7 +24,7 @@ #include "maxim_remote.h" -#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x02) +#define DRIVER_VERSION KERNEL_VERSION(1, 0x00, 0x03) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -907,7 +907,7 @@ static int ox03j10_initialize_controls(struct ox03j10 *ox03j10) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_menu_items) - 1, 0, link_freq_menu_items); - __v4l2_ctrl_s_ctrl(ox03j10->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(ox03j10->link_freq, mode->link_freq_idx); link_freq = link_freq_menu_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", mode->link_freq_idx, link_freq); diff --git a/drivers/media/i2c/maxim/remote/sc320at.c b/drivers/media/i2c/maxim/remote/sc320at.c index 695c7ae7879e..6279ffbe82da 100644 --- a/drivers/media/i2c/maxim/remote/sc320at.c +++ b/drivers/media/i2c/maxim/remote/sc320at.c @@ -24,7 +24,7 @@ #include "maxim_remote.h" -#define DRIVER_VERSION KERNEL_VERSION(1, 0x01, 0x01) +#define DRIVER_VERSION KERNEL_VERSION(1, 0x01, 0x02) #ifndef V4L2_CID_DIGITAL_GAIN #define V4L2_CID_DIGITAL_GAIN V4L2_CID_GAIN @@ -907,7 +907,7 @@ static int sc320at_initialize_controls(struct sc320at *sc320at) V4L2_CID_LINK_FREQ, ARRAY_SIZE(link_freq_menu_items) - 1, 0, link_freq_menu_items); - __v4l2_ctrl_s_ctrl(sc320at->link_freq, mode->link_freq_idx); + v4l2_ctrl_s_ctrl(sc320at->link_freq, mode->link_freq_idx); link_freq = link_freq_menu_items[mode->link_freq_idx]; dev_info(dev, "mipi_freq_idx = %d, mipi_link_freq = %lld\n", mode->link_freq_idx, link_freq);