9f4eed6111f4d06aa4483a58cc1eebb00d1ea5b2
[openwrt/staging/neocturne.git] /
1 From ca2e3e4cb1704ae28a15e889165bf5f319dcb905 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 16 Feb 2023 00:30:03 +0200
4 Subject: [PATCH] media: i2c: imx290: Add the error code to logs in
5 start_streaming
6
7 Should be upstream commit 5fcaecd6b5aa
8
9 imx290_start_streaming logs what failed, but not the error
10 code from that function. Add it into the log message.
11
12 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
13 Reviewed-by: Alexander Stein <alexander.stein@ew.tq-group.com>
14 Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
15 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
16 Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
17 ---
18 drivers/media/i2c/imx290.c | 12 ++++++------
19 1 file changed, 6 insertions(+), 6 deletions(-)
20
21 --- a/drivers/media/i2c/imx290.c
22 +++ b/drivers/media/i2c/imx290.c
23 @@ -1012,20 +1012,20 @@ static int imx290_start_streaming(struct
24 /* Set clock parameters based on mode and xclk */
25 ret = imx290_set_clock(imx290);
26 if (ret < 0) {
27 - dev_err(imx290->dev, "Could not set clocks\n");
28 + dev_err(imx290->dev, "Could not set clocks - %d\n", ret);
29 return ret;
30 }
31
32 /* Set data lane count */
33 ret = imx290_set_data_lanes(imx290);
34 if (ret < 0) {
35 - dev_err(imx290->dev, "Could not set data lanes\n");
36 + dev_err(imx290->dev, "Could not set data lanes - %d\n", ret);
37 return ret;
38 }
39
40 ret = imx290_set_csi_config(imx290);
41 if (ret < 0) {
42 - dev_err(imx290->dev, "Could not set csi cfg\n");
43 + dev_err(imx290->dev, "Could not set csi cfg - %d\n", ret);
44 return ret;
45 }
46
47 @@ -1033,7 +1033,7 @@ static int imx290_start_streaming(struct
48 format = v4l2_subdev_get_pad_format(&imx290->sd, state, 0);
49 ret = imx290_setup_format(imx290, format);
50 if (ret < 0) {
51 - dev_err(imx290->dev, "Could not set frame format\n");
52 + dev_err(imx290->dev, "Could not set frame format - %d\n", ret);
53 return ret;
54 }
55
56 @@ -1041,14 +1041,14 @@ static int imx290_start_streaming(struct
57 ret = imx290_set_register_array(imx290, imx290->current_mode->data,
58 imx290->current_mode->data_size);
59 if (ret < 0) {
60 - dev_err(imx290->dev, "Could not set current mode\n");
61 + dev_err(imx290->dev, "Could not set current mode - %d\n", ret);
62 return ret;
63 }
64
65 /* Apply customized values from user */
66 ret = __v4l2_ctrl_handler_setup(imx290->sd.ctrl_handler);
67 if (ret) {
68 - dev_err(imx290->dev, "Could not sync v4l2 controls\n");
69 + dev_err(imx290->dev, "Could not sync v4l2 controls - %d\n", ret);
70 return ret;
71 }
72