hc
2023-12-09 b22da3d8526a935aa31e086e63f60ff3246cb61c
kernel/drivers/media/i2c/techpoint/techpoint_v4l2.c
....@@ -2,7 +2,7 @@
22 /*
33 * techpoint v4l2 driver
44 *
5
- * Copyright (C) 2022 Rockchip Electronics Co., Ltd.
5
+ * Copyright (C) 2023 Rockchip Electronics Co., Ltd.
66 *
77 */
88
....@@ -217,8 +217,6 @@
217217 {
218218 int ret;
219219 struct device *dev = &techpoint->client->dev;
220
-
221
- dev_dbg(dev, "%s\n", __func__);
222220
223221 if (!IS_ERR_OR_NULL(techpoint->pins_default)) {
224222 ret = pinctrl_select_state(techpoint->pinctrl,
....@@ -471,9 +469,6 @@
471469 struct v4l2_subdev_frame_size_enum *fse)
472470 {
473471 struct techpoint *techpoint = to_techpoint(sd);
474
- struct i2c_client *client = techpoint->client;
475
-
476
- dev_dbg(&client->dev, "%s:\n", __func__);
477472
478473 if (fse->index >= techpoint->video_modes_num)
479474 return -EINVAL;
....@@ -502,6 +497,7 @@
502497 }
503498
504499 static int techpoint_g_mbus_config(struct v4l2_subdev *sd,
500
+ unsigned int pad_id,
505501 struct v4l2_mbus_config *cfg)
506502 {
507503 struct techpoint *techpoint = to_techpoint(sd);
....@@ -512,7 +508,7 @@
512508 V4L2_MBUS_PCLK_SAMPLE_RISING |
513509 V4L2_MBUS_PCLK_SAMPLE_FALLING;
514510 } else if (techpoint->input_type == TECHPOINT_MIPI) {
515
- cfg->type = V4L2_MBUS_CSI2;
511
+ cfg->type = V4L2_MBUS_CSI2_DPHY;
516512 if (techpoint->data_lanes == 4) {
517513 cfg->flags = V4L2_MBUS_CSI2_4_LANE | V4L2_MBUS_CSI2_CHANNELS;
518514 } else if (techpoint->data_lanes == 2) {
....@@ -827,7 +823,6 @@
827823
828824 static const struct v4l2_subdev_video_ops techpoint_video_ops = {
829825 .s_stream = techpoint_stream,
830
- .g_mbus_config = techpoint_g_mbus_config,
831826 .g_frame_interval = techpoint_g_frame_interval,
832827 .querystd = techpoint_querystd,
833828 };
....@@ -837,6 +832,7 @@
837832 .enum_frame_size = techpoint_enum_frame_sizes,
838833 .get_fmt = techpoint_get_fmt,
839834 .set_fmt = techpoint_set_fmt,
835
+ .get_mbus_config = techpoint_g_mbus_config,
840836 };
841837
842838 static const struct v4l2_subdev_core_ops techpoint_core_ops = {
....@@ -1210,7 +1206,9 @@
12101206 struct device_node *np;
12111207 int i, count;
12121208
1213
- count = of_count_phandle_with_args(node, "techpoint,audio-in-cascade-slaves", NULL);
1209
+ count = of_count_phandle_with_args(node,
1210
+ "techpoint,audio-in-cascade-slaves",
1211
+ NULL);
12141212 if (count < 0 || count > MAX_SLAVES)
12151213 return -EINVAL;
12161214
....@@ -1516,4 +1514,4 @@
15161514
15171515 MODULE_AUTHOR("Vicent Chi <vicent.chi@rock-chips.com>");
15181516 MODULE_DESCRIPTION("Techpoint decoder driver");
1519
-MODULE_LICENSE("GPL v2");
1517
+MODULE_LICENSE("GPL");