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
7 Should be upstream commit 5fcaecd6b5aa
9 imx290_start_streaming logs what failed, but not the error
10 code from that function. Add it into the log message.
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>
18 drivers/media/i2c/imx290.c | 12 ++++++------
19 1 file changed, 6 insertions(+), 6 deletions(-)
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);
27 - dev_err(imx290->dev, "Could not set clocks\n");
28 + dev_err(imx290->dev, "Could not set clocks - %d\n", ret);
32 /* Set data lane count */
33 ret = imx290_set_data_lanes(imx290);
35 - dev_err(imx290->dev, "Could not set data lanes\n");
36 + dev_err(imx290->dev, "Could not set data lanes - %d\n", ret);
40 ret = imx290_set_csi_config(imx290);
42 - dev_err(imx290->dev, "Could not set csi cfg\n");
43 + dev_err(imx290->dev, "Could not set csi cfg - %d\n", ret);
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);
51 - dev_err(imx290->dev, "Could not set frame format\n");
52 + dev_err(imx290->dev, "Could not set frame format - %d\n", ret);
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);
60 - dev_err(imx290->dev, "Could not set current mode\n");
61 + dev_err(imx290->dev, "Could not set current mode - %d\n", ret);
65 /* Apply customized values from user */
66 ret = __v4l2_ctrl_handler_setup(imx290->sd.ctrl_handler);
68 - dev_err(imx290->dev, "Could not sync v4l2 controls\n");
69 + dev_err(imx290->dev, "Could not sync v4l2 controls - %d\n", ret);