Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7599

Interfacing (DSI, CSI, I2C, etc.) • Re: MIPI-CSI2 camera having ISP

$
0
0
You'll need to add extra logging to the driver.

Code:

static int PX6130_s_stream(struct v4l2_subdev *sd, int enable){struct i2c_client *client = v4l2_get_subdevdata(sd);struct PX6130 *sensor = to_sensor(sd);int ret;dev_info(&client->dev, "dbg_info: %s, line: %d\n", __func__, __LINE__);mutex_lock(&sensor->lock);if (sensor->streaming == enable) {mutex_unlock(&sensor->lock);dev_info(&client->dev, "dbg_info: %s, line: %d\n", __func__, __LINE__);return 0;}if (enable) {ret = pm_runtime_resume_and_get(&client->dev);if (ret < 0)// THIS APPEARS TO BE THE ONLY ERROR PATH THAT DOESN'T LOG ANYTHING.goto error_unlock;ret = PX6130_stream_on(sd);if (ret < 0) {dev_err(&client->dev, "stream start failed: %d\n", ret);goto error_pm;}} else {ret = PX6130_stream_off(sd);if (ret < 0) {dev_err(&client->dev, "stream stop failed: %d\n", ret);goto error_pm;}pm_runtime_put(&client->dev);}sensor->streaming = enable;mutex_unlock(&sensor->lock);//LOG MESSAGE TO CONFIRM YOU'RE PASSING THROUGH THE SUCCESS CASEreturn 0;error_pm:pm_runtime_put(&client->dev);error_unlock:mutex_unlock(&sensor->lock);// ADD A LOG MESSAGE HERE TO CONFIRM WHAT VALUE OF ret YOU ARE RETURNING ON ERROR.return ret;}
You're calling into pm_runtime, but have commented out the runtime ops

Code:

//.pm= &PX6130_pm_ops,
Does that result in it returning an error and hence failing? I haven't checked the core code for that.

Statistics: Posted by 6by9 — Thu Nov 14, 2024 11:33 am



Viewing all articles
Browse latest Browse all 7599

Trending Articles