@@ -616,7 +616,7 @@ static int adv748x_parse_csi2_lanes(struct adv748x_state *state,
if (port != ADV748X_PORT_TXA && port != ADV748X_PORT_TXB)
return 0;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &vep);
+ ret = v4l2_fwnode_endpoint_parse(state->dev, of_fwnode_handle(ep), &vep);
if (ret)
return ret;
@@ -3209,7 +3209,8 @@ static int adv76xx_parse_dt(struct adv76xx_state *state)
if (!endpoint)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint), &bus_cfg);
+ ret = v4l2_fwnode_endpoint_parse(&state->i2c_clients[ADV76XX_PAGE_IO]->dev,
+ of_fwnode_handle(endpoint), &bus_cfg);
of_node_put(endpoint);
if (ret)
return ret;
@@ -1071,7 +1071,7 @@ static int ar0521_probe(struct i2c_client *client)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(endpoint, &ep);
+ ret = v4l2_fwnode_endpoint_parse(dev, endpoint, &ep);
fwnode_handle_put(endpoint);
if (ret) {
dev_err(dev, "could not parse endpoint\n");
@@ -3206,7 +3206,7 @@ static int ccs_get_hwconfig(struct ccs_sensor *sensor, struct device *dev)
* Note that we do need to rely on detecting the bus type between CSI-2
* D-PHY and CCP2 as the old bindings did not require it.
*/
- rval = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ rval = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
if (rval)
goto out_err;
@@ -688,7 +688,7 @@ static int ub913_parse_dt(struct ub913_data *priv)
if (!ep_fwnode)
return dev_err_probe(dev, -ENOENT, "No sink endpoint\n");
- ret = v4l2_fwnode_endpoint_parse(ep_fwnode, &vep);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep_fwnode, &vep);
fwnode_handle_put(ep_fwnode);
@@ -1144,7 +1144,7 @@ static int ub953_parse_dt(struct ub953_data *priv)
if (!ep_fwnode)
return dev_err_probe(dev, -ENOENT, "no endpoint found\n");
- ret = v4l2_fwnode_endpoint_parse(ep_fwnode, &vep);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep_fwnode, &vep);
fwnode_handle_put(ep_fwnode);
@@ -1129,7 +1129,7 @@ static int ub960_parse_dt_txport(struct ub960_data *priv,
txport->nport = nport;
vep.bus_type = V4L2_MBUS_CSI2_DPHY;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep_fwnode, &vep);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep_fwnode, &vep);
if (ret) {
dev_err(dev, "tx%u: failed to parse endpoint data\n", nport);
goto err_free_txport;
@@ -3346,7 +3346,7 @@ static int ub960_parse_dt_rxport_ep_properties(struct ub960_data *priv,
}
vep.bus_type = V4L2_MBUS_PARALLEL;
- ret = v4l2_fwnode_endpoint_parse(ep_fwnode, &vep);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep_fwnode, &vep);
if (ret) {
dev_err(dev, "rx%u: failed to parse endpoint data\n", nport);
goto err_put_source_ep_fwnode;
@@ -1208,7 +1208,7 @@ static int hi556_check_hwcfg(struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -2003,7 +2003,7 @@ static int hi846_parse_dt(struct hi846 *hi846, struct device *dev)
return -ENXIO;
}
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret) {
dev_err(dev, "failed to parse endpoint node: %d\n", ret);
@@ -2864,7 +2864,7 @@ static int hi847_check_hwcfg(struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -886,7 +886,7 @@ static int imx214_parse_fwnode(struct device *dev)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, endpoint, &bus_cfg);
if (ret) {
dev_err(dev, "parsing endpoint node failed\n");
goto done;
@@ -1283,7 +1283,7 @@ static int imx219_check_hwcfg(struct device *dev, struct imx219 *imx219)
return -EINVAL;
}
- if (v4l2_fwnode_endpoint_alloc_parse(endpoint, &ep_cfg)) {
+ if (v4l2_fwnode_endpoint_alloc_parse(dev, endpoint, &ep_cfg)) {
dev_err(dev, "could not parse endpoint\n");
goto error_out;
}
@@ -1971,7 +1971,7 @@ static int imx274_fwnode_parse(struct device *dev)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(endpoint, &ep);
+ ret = v4l2_fwnode_endpoint_parse(dev, endpoint, &ep);
fwnode_handle_put(endpoint);
if (ret == -ENXIO) {
dev_err(dev, "Unsupported bus type, should be CSI2\n");
@@ -1470,7 +1470,7 @@ static int imx290_parse_dt(struct imx290 *imx290)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &ep);
+ ret = v4l2_fwnode_endpoint_alloc_parse(imx290->dev, endpoint, &ep);
fwnode_handle_put(endpoint);
if (ret == -ENXIO) {
dev_err(imx290->dev, "Unsupported bus type, should be CSI2\n");
@@ -2382,7 +2382,7 @@ static struct imx319_hwcfg *imx319_get_hwcfg(struct device *dev)
if (!ep)
return NULL;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
if (ret)
goto out_err;
@@ -1153,7 +1153,7 @@ static int imx334_parse_hw_config(struct imx334 *imx334)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(imx334->dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -807,7 +807,7 @@ static int imx335_parse_hw_config(struct imx335 *imx335)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(imx335->dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1671,7 +1671,7 @@ static struct imx355_hwcfg *imx355_get_hwcfg(struct device *dev)
if (!ep)
return NULL;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
if (ret)
goto out_err;
@@ -969,7 +969,7 @@ static int imx412_parse_hw_config(struct imx412 *imx412)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(imx412->dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1077,7 +1077,7 @@ static int imx415_parse_hw_config(struct imx415 *sensor)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(sensor->dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1493,7 +1493,7 @@ static int isl7998x_probe(struct i2c_client *client)
if (!ep)
return dev_err_probe(dev, -EINVAL, "Missing endpoint node\n");
- ret = v4l2_fwnode_endpoint_parse(ep, &endpoint);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep, &endpoint);
fwnode_handle_put(ep);
if (ret)
return dev_err_probe(dev, ret, "Failed to parse endpoint\n");
@@ -1474,7 +1474,7 @@ static int max9286_parse_dt(struct max9286_priv *priv)
int ret;
ret = v4l2_fwnode_endpoint_parse(
- of_fwnode_handle(node), &vep);
+ dev, of_fwnode_handle(node), &vep);
if (ret) {
of_node_put(node);
return ret;
@@ -1226,7 +1226,7 @@ static int mt9m111_probe_fw(struct i2c_client *client, struct mt9m111 *mt9m111)
if (!np)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(np, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_parse(&client->dev, np, &bus_cfg);
if (ret)
goto out_put_fw;
@@ -1084,7 +1084,8 @@ mt9p031_get_pdata(struct i2c_client *client)
if (!np)
return NULL;
- if (v4l2_fwnode_endpoint_parse(of_fwnode_handle(np), &endpoint) < 0)
+ if (v4l2_fwnode_endpoint_parse(&client->dev, of_fwnode_handle(np),
+ &endpoint) < 0)
goto done;
pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
@@ -1012,7 +1012,8 @@ mt9v032_get_pdata(struct i2c_client *client)
if (!np)
return NULL;
- if (v4l2_fwnode_endpoint_parse(of_fwnode_handle(np), &endpoint) < 0)
+ if (v4l2_fwnode_endpoint_parse(&client->dev, of_fwnode_handle(np),
+ &endpoint) < 0)
goto done;
pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
@@ -976,7 +976,7 @@ static int og01a1b_check_hwcfg(struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -821,7 +821,7 @@ static int ov02a10_check_hwcfg(struct device *dev, struct ov02a10 *ov02a10)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1375,7 +1375,7 @@ static int ov08d10_get_hwcfg(struct ov08d10 *ov08d10, struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -3172,7 +3172,7 @@ static int ov08x40_check_hwcfg(struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1436,7 +1436,7 @@ static int ov13b10_check_hwcfg(struct device *dev)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1392,7 +1392,8 @@ ov2659_get_pdata(struct i2c_client *client)
if (!endpoint)
return NULL;
- ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(endpoint),
+ ret = v4l2_fwnode_endpoint_alloc_parse(&client->dev,
+ of_fwnode_handle(endpoint),
&bus_cfg);
if (ret) {
pdata = NULL;
@@ -1027,7 +1027,7 @@ static int ov2680_parse_dt(struct ov2680_dev *sensor)
return dev_err_probe(dev, -EPROBE_DEFER,
"waiting for fwnode graph endpoint\n");
- ret = v4l2_fwnode_endpoint_alloc_parse(ep_fwnode, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep_fwnode, &bus_cfg);
fwnode_handle_put(ep_fwnode);
if (ret)
return ret;
@@ -1006,7 +1006,7 @@ static int ov2740_check_hwcfg(struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -851,7 +851,7 @@ static int ov4689_check_hwcfg(struct device *dev)
if (!endpoint)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, endpoint, &bus_cfg);
fwnode_handle_put(endpoint);
if (ret)
return ret;
@@ -3861,7 +3861,7 @@ static int ov5640_probe(struct i2c_client *client)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(endpoint, &sensor->ep);
+ ret = v4l2_fwnode_endpoint_parse(dev, endpoint, &sensor->ep);
fwnode_handle_put(endpoint);
if (ret) {
dev_err(dev, "Could not parse endpoint\n");
@@ -1059,7 +1059,7 @@ static int ov5645_probe(struct i2c_client *client)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint),
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(endpoint),
&ov5645->ep);
of_node_put(endpoint);
@@ -97,6 +97,7 @@ struct ov5647_mode {
};
struct ov5647 {
+ struct device *dev;
struct v4l2_subdev sd;
struct media_pad pad;
struct mutex lock;
@@ -1373,7 +1374,8 @@ static int ov5647_parse_dt(struct ov5647 *sensor, struct device_node *np)
if (!ep)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &bus_cfg);
+ ret = v4l2_fwnode_endpoint_parse(sensor->dev, of_fwnode_handle(ep),
+ &bus_cfg);
if (ret)
goto out;
@@ -1399,6 +1401,8 @@ static int ov5647_probe(struct i2c_client *client)
if (!sensor)
return -ENOMEM;
+ sensor->dev = dev;
+
if (IS_ENABLED(CONFIG_OF) && np) {
ret = ov5647_parse_dt(sensor, np);
if (ret) {
@@ -2464,7 +2464,7 @@ static int ov5648_probe(struct i2c_client *client)
sensor->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY;
- ret = v4l2_fwnode_endpoint_alloc_parse(handle, &sensor->endpoint);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, handle, &sensor->endpoint);
fwnode_handle_put(handle);
if (ret) {
dev_err(dev, "failed to parse endpoint node\n");
@@ -2726,7 +2726,8 @@ static int ov5670_probe(struct i2c_client *client)
ov5670->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY;
ov5670->endpoint.bus.mipi_csi2.num_data_lanes = 2;
- ret = v4l2_fwnode_endpoint_alloc_parse(handle, &ov5670->endpoint);
+ ret = v4l2_fwnode_endpoint_alloc_parse(&client->dev, handle,
+ &ov5670->endpoint);
fwnode_handle_put(handle);
if (ret)
return dev_err_probe(&client->dev, ret, "Endpoint parse failed\n");
@@ -1273,7 +1273,7 @@ static int ov5675_get_hwcfg(struct ov5675 *ov5675, struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1231,7 +1231,7 @@ static int ov5693_check_hwcfg(struct ov5693_device *ov5693)
if (!endpoint)
return -EPROBE_DEFER; /* Could be provided by cio2-bridge */
- ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(ov5693->dev, endpoint, &bus_cfg);
fwnode_handle_put(endpoint);
if (ret)
return ret;
@@ -1467,7 +1467,7 @@ static int ov7251_check_hwcfg(struct ov7251 *ov7251)
if (!endpoint)
return -EPROBE_DEFER; /* could be provided by cio2-bridge */
- ret = v4l2_fwnode_endpoint_alloc_parse(endpoint, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(ov7251->dev, endpoint, &bus_cfg);
fwnode_handle_put(endpoint);
if (ret)
return dev_err_probe(ov7251->dev, ret,
@@ -1798,7 +1798,7 @@ static int ov7670_parse_dt(struct device *dev,
if (!ep)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1389,11 +1389,12 @@ static int ov772x_parse_dt(struct i2c_client *client,
* time. v4l2_fwnode_endpoint_alloc_parse() will not fail if
* 'bus-type' is not specified.
*/
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(&client->dev, ep, &bus_cfg);
if (ret) {
bus_cfg = (struct v4l2_fwnode_endpoint)
{ .bus_type = V4L2_MBUS_BT656 };
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(&client->dev, ep,
+ &bus_cfg);
if (ret)
goto error_fwnode_put;
}
@@ -2354,7 +2354,7 @@ static int ov8856_get_hwcfg(struct ov8856 *ov8856, struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1849,7 +1849,7 @@ static int ov8858_parse_of(struct ov8858 *ov8858)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(endpoint, &vep);
+ ret = v4l2_fwnode_endpoint_parse(dev, endpoint, &vep);
if (ret) {
dev_err(dev, "Failed to parse endpoint: %d\n", ret);
fwnode_handle_put(endpoint);
@@ -2987,7 +2987,7 @@ static int ov8865_probe(struct i2c_client *client)
sensor->endpoint.bus_type = V4L2_MBUS_CSI2_DPHY;
- ret = v4l2_fwnode_endpoint_alloc_parse(handle, &sensor->endpoint);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, handle, &sensor->endpoint);
fwnode_handle_put(handle);
if (ret) {
dev_err(dev, "failed to parse endpoint node\n");
@@ -1156,7 +1156,7 @@ static int ov9282_parse_hw_config(struct ov9282 *ov9282)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(ov9282->dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -898,7 +898,7 @@ static int ov9734_check_hwcfg(struct device *dev)
if (!ep)
return -ENXIO;
- ret = v4l2_fwnode_endpoint_alloc_parse(ep, &bus_cfg);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, ep, &bus_cfg);
fwnode_handle_put(ep);
if (ret)
return ret;
@@ -1561,7 +1561,7 @@ static int s5c73m3_get_dt_data(struct s5c73m3 *state)
return 0;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(node_ep), &ep);
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(node_ep), &ep);
of_node_put(node_ep);
if (ret)
return ret;
@@ -1842,7 +1842,7 @@ static int s5k5baf_parse_device_node(struct s5k5baf *state, struct device *dev)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(node_ep), &ep);
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(node_ep), &ep);
of_node_put(node_ep);
if (ret)
return ret;
@@ -903,7 +903,8 @@ static int mipid02_parse_rx_ep(struct mipid02_dev *bridge)
goto error;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep_node), &ep);
+ ret = v4l2_fwnode_endpoint_parse(&client->dev, of_fwnode_handle(ep_node),
+ &ep);
if (ret) {
dev_err(&client->dev, "Could not parse v4l2 endpoint %d\n",
ret);
@@ -964,7 +965,8 @@ static int mipid02_parse_tx_ep(struct mipid02_dev *bridge)
goto error;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep_node), &ep);
+ ret = v4l2_fwnode_endpoint_parse(&client->dev, of_fwnode_handle(ep_node),
+ &ep);
if (ret) {
dev_err(&client->dev, "Could not parse v4l2 endpoint\n");
goto error_of_node_put;
@@ -1504,7 +1504,7 @@ static int vgxy61_tx_from_ep(struct vgxy61_dev *sensor,
unsigned int p, l, i;
int ret;
- ret = v4l2_fwnode_endpoint_alloc_parse(handle, &ep);
+ ret = v4l2_fwnode_endpoint_alloc_parse(&client->dev, handle, &ep);
if (ret)
return -EINVAL;
@@ -1901,7 +1901,8 @@ static int tc358743_probe_of(struct tc358743_state *state)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_alloc_parse(of_fwnode_handle(ep), &endpoint);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, of_fwnode_handle(ep),
+ &endpoint);
if (ret) {
dev_err(dev, "failed to parse endpoint\n");
goto put_node;
@@ -1316,7 +1316,7 @@ tc358746_init_output_port(struct tc358746 *tc358746, unsigned long refclk)
/* Currently we only support 'parallel in' -> 'csi out' */
vep = &tc358746->csi_vep;
vep->bus_type = V4L2_MBUS_CSI2_DPHY;
- err = v4l2_fwnode_endpoint_alloc_parse(ep, vep);
+ err = v4l2_fwnode_endpoint_alloc_parse(dev, ep, vep);
fwnode_handle_put(ep);
if (err) {
dev_err(dev, "Failed to parse source endpoint\n");
@@ -1454,7 +1454,7 @@ static int tc358746_async_register(struct tc358746 *tc358746)
if (!ep)
return -ENOTCONN;
- err = v4l2_fwnode_endpoint_parse(ep, &vep);
+ err = v4l2_fwnode_endpoint_parse(tc358746->sd.dev, ep, &vep);
if (err) {
fwnode_handle_put(ep);
return err;
@@ -2311,7 +2311,8 @@ static int tda1997x_parse_dt(struct tda1997x_state *state)
if (!ep)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &bus_cfg);
+ ret = v4l2_fwnode_endpoint_parse(&state->client->dev, of_fwnode_handle(ep),
+ &bus_cfg);
if (ret) {
of_node_put(ep);
return ret;
@@ -991,7 +991,8 @@ tvp514x_get_pdata(struct i2c_client *client)
if (!endpoint)
return NULL;
- if (v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint), &bus_cfg))
+ if (v4l2_fwnode_endpoint_parse(&client->dev, of_fwnode_handle(endpoint),
+ &bus_cfg))
goto done;
pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
@@ -2080,7 +2080,7 @@ static int tvp5150_parse_dt(struct tvp5150 *decoder, struct device_node *np)
dev_err(dev, "Error no output endpoint available\n");
goto err_free;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep_np), &bus_cfg);
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(ep_np), &bus_cfg);
of_node_put(ep_np);
if (ret)
goto err_free;
@@ -897,7 +897,8 @@ tvp7002_get_pdata(struct i2c_client *client)
if (!endpoint)
return NULL;
- if (v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint), &bus_cfg))
+ if (v4l2_fwnode_endpoint_parse(&client->dev, of_fwnode_handle(endpoint),
+ &bus_cfg))
goto done;
pdata = devm_kzalloc(&client->dev, sizeof(*pdata), GFP_KERNEL);
@@ -1477,7 +1477,7 @@ static int cio2_parse_firmware(struct cio2_device *cio2)
if (!ep)
continue;
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep, &vep);
if (ret)
goto err_parse;
@@ -655,7 +655,7 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep, &v4l2_ep);
if (ret) {
dev_err(dev, "could not parse v4l2 endpoint\n");
fwnode_handle_put(ep);
@@ -675,7 +675,7 @@ static int mei_csi_parse_firmware(struct mei_csi *csi)
return PTR_ERR(asd);
}
- ret = v4l2_fwnode_endpoint_alloc_parse(fwnode, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_alloc_parse(dev, fwnode, &v4l2_ep);
fwnode_handle_put(fwnode);
if (ret)
return ret;
@@ -837,7 +837,7 @@ static int atmel_isi_parse_dt(struct atmel_isi *isi,
return -EINVAL;
}
- err = v4l2_fwnode_endpoint_parse(of_fwnode_handle(np), &ep);
+ err = v4l2_fwnode_endpoint_parse(&pdev->dev, of_fwnode_handle(np), &ep);
of_node_put(np);
if (err) {
dev_err(&pdev->dev, "Could not parse the endpoint\n");
@@ -450,7 +450,7 @@ static int csi2rx_parse_dt(struct csi2rx_priv *csi2rx)
return -EINVAL;
fwh = of_fwnode_handle(ep);
- ret = v4l2_fwnode_endpoint_parse(fwh, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(csi2rx->dev, fwh, &v4l2_ep);
if (ret) {
dev_err(csi2rx->dev, "Could not parse v4l2 endpoint\n");
of_node_put(ep);
@@ -504,7 +504,8 @@ static int csi2tx_check_lanes(struct csi2tx_priv *csi2tx)
if (!ep)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(csi2tx->dev, of_fwnode_handle(ep),
+ &v4l2_ep);
if (ret) {
dev_err(csi2tx->dev, "Could not parse v4l2 endpoint\n");
goto out;
@@ -2213,7 +2213,7 @@ static int pxa_camera_pdata_from_dt(struct device *dev,
return -EINVAL;
}
- err = v4l2_fwnode_endpoint_parse(of_fwnode_handle(np), &ep);
+ err = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(np), &ep);
if (err) {
dev_err(dev, "could not parse endpoint\n");
goto out;
@@ -569,7 +569,8 @@ static int csi2dc_of_parse(struct csi2dc_device *csi2dc,
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(input_fwnode, &input_endpoint);
+ ret = v4l2_fwnode_endpoint_parse(csi2dc->dev, input_fwnode,
+ &input_endpoint);
if (ret) {
dev_err(csi2dc->dev, "endpoint not defined at %pOF\n", of_node);
goto csi2dc_of_parse_err;
@@ -595,7 +596,7 @@ static int csi2dc_of_parse(struct csi2dc_device *csi2dc,
(of_fwnode_handle(of_node), input_fwnode);
if (output_fwnode)
- ret = v4l2_fwnode_endpoint_parse(output_fwnode,
+ ret = v4l2_fwnode_endpoint_parse(csi2dc->dev, output_fwnode,
&output_endpoint);
fwnode_handle_put(output_fwnode);
@@ -367,7 +367,7 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
if (!epn)
return 0;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
ret = -EINVAL;
@@ -353,7 +353,7 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc)
if (!epn)
return 0;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
ret = -EINVAL;
@@ -1258,7 +1258,7 @@ static int mipi_csis_async_register(struct mipi_csis_device *csis)
if (!ep)
return -ENOTCONN;
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(csis->dev, ep, &vep);
if (ret)
goto err_parse;
@@ -598,7 +598,7 @@ static int imx8mq_mipi_csi_async_register(struct csi_state *state)
if (!ep)
return -ENOTCONN;
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(state->dev, ep, &vep);
if (ret)
goto err_parse;
@@ -1039,7 +1039,7 @@ static int camss_of_parse_endpoint_node(struct device *dev,
struct v4l2_fwnode_endpoint vep = { { 0 } };
unsigned int i;
- v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &vep);
+ v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(node), &vep);
csd->interface.csiphy_id = vep.base.port;
@@ -318,7 +318,7 @@ static int rvin_group_parse_of(struct rvin_dev *vin, unsigned int port,
return 0;
fwnode = fwnode_graph_get_remote_endpoint(ep);
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(vin->dev, ep, &vep);
fwnode_handle_put(ep);
if (ret) {
vin_err(vin, "Failed to parse %pOF\n", to_of_node(fwnode));
@@ -663,7 +663,7 @@ static int rvin_parallel_parse_of(struct rvin_dev *vin)
return 0;
fwnode = fwnode_graph_get_remote_endpoint(ep);
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(vin->dev, ep, &vep);
fwnode_handle_put(ep);
if (ret) {
vin_err(vin, "Failed to parse %pOF\n", to_of_node(fwnode));
@@ -1385,7 +1385,7 @@ static int rcsi2_parse_dt(struct rcar_csi2 *priv)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(priv->dev, ep, &v4l2_ep);
if (ret) {
dev_err(priv->dev, "Could not parse v4l2 endpoint\n");
fwnode_handle_put(ep);
@@ -1558,7 +1558,8 @@ static int ceu_parse_dt(struct ceu_device *ceudev)
goto error_cleanup;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &fw_ep);
+ ret = v4l2_fwnode_endpoint_parse(ceudev->dev,
+ of_fwnode_handle(ep), &fw_ep);
if (ret) {
dev_err(ceudev->dev,
"Unable to parse endpoint #%u: %d.\n", i, ret);
@@ -146,7 +146,7 @@ static int rzg2l_cru_mc_parse_of(struct rzg2l_cru_dev *cru)
return 0;
fwnode = fwnode_graph_get_remote_endpoint(ep);
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(cru->dev, ep, &vep);
fwnode_handle_put(ep);
if (ret) {
dev_err(cru->dev, "Failed to parse %pOF\n", to_of_node(fwnode));
@@ -657,7 +657,7 @@ static int rzg2l_csi2_parse_dt(struct rzg2l_csi2 *csi2)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(csi2->dev, ep, &v4l2_ep);
if (ret) {
dev_err(csi2->dev, "Could not parse v4l2 endpoint\n");
fwnode_handle_put(ep);
@@ -227,7 +227,7 @@ static int rkisp1_subdev_notifier_register(struct rkisp1_device *rkisp1)
}
/* Parse the endpoint and validate the bus type. */
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(rkisp1->dev, ep, &vep);
if (ret) {
dev_err(rkisp1->dev, "failed to parse endpoint %pfw\n",
ep);
@@ -404,7 +404,8 @@ static int fimc_md_parse_one_endpoint(struct fimc_md *fmd,
struct v4l2_fwnode_endpoint endpoint = { .bus_type = 0 };
int ret;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep), &endpoint);
+ ret = v4l2_fwnode_endpoint_parse(&fmd->pdev->dev, of_fwnode_handle(ep),
+ &endpoint);
if (ret) {
of_node_put(ep);
return ret;
@@ -735,7 +735,8 @@ static int s5pcsis_parse_dt(struct platform_device *pdev,
return -EINVAL;
}
/* Get port node and validate MIPI-CSI channel id. */
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(node), &endpoint);
+ ret = v4l2_fwnode_endpoint_parse(&pdev->dev, of_fwnode_handle(node),
+ &endpoint);
if (ret)
goto err;
@@ -1921,7 +1921,7 @@ static int dcmi_probe(struct platform_device *pdev)
return -ENODEV;
}
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(np), &ep);
+ ret = v4l2_fwnode_endpoint_parse(&pdev->dev, of_fwnode_handle(np), &ep);
of_node_put(np);
if (ret) {
dev_err(&pdev->dev, "Could not parse the endpoint\n");
@@ -128,7 +128,7 @@ static int sun4i_csi_notifier_init(struct sun4i_csi *csi)
if (!ep)
return -EINVAL;
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(csi->dev, ep, &vep);
if (ret)
goto out;
@@ -720,7 +720,7 @@ static int sun6i_csi_bridge_source_setup(struct sun6i_csi_device *csi_dev,
if (!handle)
return -ENODEV;
- ret = v4l2_fwnode_endpoint_parse(handle, endpoint);
+ ret = v4l2_fwnode_endpoint_parse(dev, handle, endpoint);
if (ret)
goto complete;
@@ -473,7 +473,7 @@ sun6i_mipi_csi2_bridge_source_setup(struct sun6i_mipi_csi2_device *csi2_dev)
endpoint->bus_type = V4L2_MBUS_CSI2_DPHY;
- ret = v4l2_fwnode_endpoint_parse(handle, endpoint);
+ ret = v4l2_fwnode_endpoint_parse(dev, handle, endpoint);
if (ret)
goto complete;
@@ -510,7 +510,7 @@ sun8i_a83t_mipi_csi2_bridge_source_setup(struct sun8i_a83t_mipi_csi2_device *csi
endpoint->bus_type = V4L2_MBUS_CSI2_DPHY;
- ret = v4l2_fwnode_endpoint_parse(handle, endpoint);
+ ret = v4l2_fwnode_endpoint_parse(dev, handle, endpoint);
if (ret)
goto complete;
@@ -2338,7 +2338,7 @@ vpfe_get_pdata(struct vpfe_device *vpfe)
sdinfo->vpfe_param.if_type = VPFE_RAW_BAYER;
}
- err = v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint),
+ err = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(endpoint),
&bus_cfg);
if (err) {
dev_err(dev, "Could not parse the endpoint\n");
@@ -545,7 +545,8 @@ static int cal_camerarx_parse_dt(struct cal_camerarx *phy)
}
endpoint->bus_type = V4L2_MBUS_CSI2_DPHY;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep_node), endpoint);
+ ret = v4l2_fwnode_endpoint_parse(phy->cal->dev, of_fwnode_handle(ep_node),
+ endpoint);
if (ret < 0) {
phy_err(phy, "Failed to parse endpoint\n");
goto done;
@@ -1547,7 +1547,8 @@ vpif_capture_get_pdata(struct platform_device *pdev,
chan->inputs[i].input.std = V4L2_STD_ALL;
chan->inputs[i].input.capabilities = V4L2_IN_CAP_STD;
- err = v4l2_fwnode_endpoint_parse(of_fwnode_handle(endpoint),
+ err = v4l2_fwnode_endpoint_parse(&pdev->dev,
+ of_fwnode_handle(endpoint),
&bus_cfg);
if (err) {
dev_err(&pdev->dev, "Could not parse the endpoint\n");
@@ -2164,7 +2164,7 @@ static int isp_parse_of_endpoints(struct isp_device *isp)
dev_dbg(isp->dev, "parsing parallel interface\n");
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(isp->dev, ep, &vep);
if (!ret) {
isd = v4l2_async_nf_add_fwnode_remote(&isp->notifier,
@@ -2193,16 +2193,16 @@ static int isp_parse_of_endpoints(struct isp_device *isp)
dev_dbg(isp->dev, "parsing serial interface %u, node %pOF\n", i,
to_of_node(ep));
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(isp->dev, ep, &vep);
if (ret == -ENXIO) {
vep = (struct v4l2_fwnode_endpoint)
{ .bus_type = V4L2_MBUS_CSI1 };
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(isp->dev, ep, &vep);
if (ret == -ENXIO) {
vep = (struct v4l2_fwnode_endpoint)
{ .bus_type = V4L2_MBUS_CCP2 };
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(isp->dev, ep, &vep);
}
}
@@ -923,7 +923,7 @@ static int xcsi2rxss_parse_of(struct xcsi2rxss_state *xcsi2rxss)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(dev, ep, &vep);
fwnode_handle_put(ep);
if (ret) {
dev_err(dev, "error parsing sink port");
@@ -493,7 +493,7 @@ static int __v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
return 0;
}
-int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
+int v4l2_fwnode_endpoint_parse(struct device *dev, struct fwnode_handle *fwnode,
struct v4l2_fwnode_endpoint *vep)
{
int ret;
@@ -516,7 +516,8 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep)
}
EXPORT_SYMBOL_GPL(v4l2_fwnode_endpoint_free);
-int v4l2_fwnode_endpoint_alloc_parse(struct fwnode_handle *fwnode,
+int v4l2_fwnode_endpoint_alloc_parse(struct device *dev,
+ struct fwnode_handle *fwnode,
struct v4l2_fwnode_endpoint *vep)
{
int rval;
@@ -682,7 +682,7 @@ int atomisp_csi2_bridge_parse_firmware(struct atomisp_device *isp)
if (!ep)
continue;
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(isp->dev, ep, &vep);
if (ret)
goto err_parse;
@@ -347,7 +347,7 @@ static int isc_parse_dt(struct device *dev, struct isc_device *isc)
if (!epn)
return 0;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
ret = -EINVAL;
@@ -333,7 +333,7 @@ static int xisc_parse_dt(struct device *dev, struct isc_device *isc)
if (!epn)
return 0;
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(epn),
+ ret = v4l2_fwnode_endpoint_parse(dev, of_fwnode_handle(epn),
&v4l2_epn);
if (ret) {
ret = -EINVAL;
@@ -687,7 +687,7 @@ static int csi2_async_register(struct csi2_dev *csi2)
if (!ep)
return -ENOTCONN;
- ret = v4l2_fwnode_endpoint_parse(ep, &vep);
+ ret = v4l2_fwnode_endpoint_parse(csi2->dev, ep, &vep);
if (ret)
goto err_parse;
@@ -353,7 +353,7 @@ static int max96712_parse_dt(struct max96712_priv *priv)
return -EINVAL;
}
- ret = v4l2_fwnode_endpoint_parse(ep, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(&priv->client->dev, ep, &v4l2_ep);
fwnode_handle_put(ep);
if (ret) {
dev_err(&priv->client->dev, "Could not parse v4l2 endpoint\n");
@@ -463,7 +463,7 @@ static int sun6i_isp_proc_source_setup(struct sun6i_isp_device *isp_dev,
if (!handle)
return -ENODEV;
- ret = v4l2_fwnode_endpoint_parse(handle, endpoint);
+ ret = v4l2_fwnode_endpoint_parse(dev, handle, endpoint);
if (ret)
goto complete;
@@ -547,7 +547,7 @@ static int tegra_csi_channels_alloc(struct tegra_csi *csi)
continue;
fwh = of_fwnode_handle(ep);
- ret = v4l2_fwnode_endpoint_parse(fwh, &v4l2_ep);
+ ret = v4l2_fwnode_endpoint_parse(csi->dev, fwh, &v4l2_ep);
of_node_put(ep);
if (ret) {
dev_err(csi->dev,
@@ -1289,7 +1289,7 @@ static int tegra_vi_channels_alloc(struct tegra_vi *vi)
ep = of_graph_get_endpoint_by_regs(parent, 0, 0);
of_node_put(parent);
- ret = v4l2_fwnode_endpoint_parse(of_fwnode_handle(ep),
+ ret = v4l2_fwnode_endpoint_parse(vi->dev, of_fwnode_handle(ep),
&v4l2_ep);
of_node_put(ep);
if (ret)
@@ -130,7 +130,7 @@ static int tegra_vip_channel_of_parse(struct tegra_vip *vip)
}
fwh = of_fwnode_handle(ep);
- err = v4l2_fwnode_endpoint_parse(fwh, &v4l2_ep);
+ err = v4l2_fwnode_endpoint_parse(dev, fwh, &v4l2_ep);
of_node_put(ep);
if (err) {
dev_err_probe(dev, err, "%pOF: failed to parse v4l2 endpoint\n", np);
@@ -182,6 +182,7 @@ enum v4l2_fwnode_bus_type {
/**
* v4l2_fwnode_endpoint_parse() - parse all fwnode node properties
+ * @dev: the device parsing the endpoint
* @fwnode: pointer to the endpoint's fwnode handle
* @vep: pointer to the V4L2 fwnode data structure
*
@@ -212,6 +213,8 @@ enum v4l2_fwnode_bus_type {
*
* The function does not change the V4L2 fwnode endpoint state if it fails.
*
+ * The @dev argument is used to provide context in kernel log message.
+ *
* NOTE: This function does not parse "link-frequencies" property as its size is
* not known in advance. Please use v4l2_fwnode_endpoint_alloc_parse() if you
* need properties of variable size.
@@ -221,7 +224,8 @@ enum v4l2_fwnode_bus_type {
* %-EINVAL on parsing failure
* %-ENXIO on mismatching bus types
*/
-int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
+int v4l2_fwnode_endpoint_parse(struct device *dev,
+ struct fwnode_handle *fwnode,
struct v4l2_fwnode_endpoint *vep);
/**
@@ -236,6 +240,7 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep);
/**
* v4l2_fwnode_endpoint_alloc_parse() - parse all fwnode node properties
+ * @dev: the device parsing the endpoint
* @fwnode: pointer to the endpoint's fwnode handle
* @vep: pointer to the V4L2 fwnode data structure
*
@@ -266,6 +271,8 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep);
*
* The function does not change the V4L2 fwnode endpoint state if it fails.
*
+ * The @dev argument is used to provide context in kernel log message.
+ *
* v4l2_fwnode_endpoint_alloc_parse() has two important differences to
* v4l2_fwnode_endpoint_parse():
*
@@ -279,7 +286,8 @@ void v4l2_fwnode_endpoint_free(struct v4l2_fwnode_endpoint *vep);
* %-EINVAL on parsing failure
* %-ENXIO on mismatching bus types
*/
-int v4l2_fwnode_endpoint_alloc_parse(struct fwnode_handle *fwnode,
+int v4l2_fwnode_endpoint_alloc_parse(struct device *dev,
+ struct fwnode_handle *fwnode,
struct v4l2_fwnode_endpoint *vep);
/**
The v4l2_fwnode_endpoint_parse() and v4l2_fwnode_endpoint_alloc_parse() functions print lots of debugging information with pr_debug(), which can make the log confusing as the information isn't associated with a device. Pass a struct device pointer to the functions to prepare for replacing the pr_debug() calls with dev_dbg(). No functional change is intended in this commit. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- drivers/media/i2c/adv748x/adv748x-core.c | 2 +- drivers/media/i2c/adv7604.c | 3 ++- drivers/media/i2c/ar0521.c | 2 +- drivers/media/i2c/ccs/ccs-core.c | 2 +- drivers/media/i2c/ds90ub913.c | 2 +- drivers/media/i2c/ds90ub953.c | 2 +- drivers/media/i2c/ds90ub960.c | 4 ++-- drivers/media/i2c/hi556.c | 2 +- drivers/media/i2c/hi846.c | 2 +- drivers/media/i2c/hi847.c | 2 +- drivers/media/i2c/imx214.c | 2 +- drivers/media/i2c/imx219.c | 2 +- drivers/media/i2c/imx274.c | 2 +- drivers/media/i2c/imx290.c | 2 +- drivers/media/i2c/imx319.c | 2 +- drivers/media/i2c/imx334.c | 2 +- drivers/media/i2c/imx335.c | 2 +- drivers/media/i2c/imx355.c | 2 +- drivers/media/i2c/imx412.c | 2 +- drivers/media/i2c/imx415.c | 2 +- drivers/media/i2c/isl7998x.c | 2 +- drivers/media/i2c/max9286.c | 2 +- drivers/media/i2c/mt9m111.c | 2 +- drivers/media/i2c/mt9p031.c | 3 ++- drivers/media/i2c/mt9v032.c | 3 ++- drivers/media/i2c/og01a1b.c | 2 +- drivers/media/i2c/ov02a10.c | 2 +- drivers/media/i2c/ov08d10.c | 2 +- drivers/media/i2c/ov08x40.c | 2 +- drivers/media/i2c/ov13b10.c | 2 +- drivers/media/i2c/ov2659.c | 3 ++- drivers/media/i2c/ov2680.c | 2 +- drivers/media/i2c/ov2740.c | 2 +- drivers/media/i2c/ov4689.c | 2 +- drivers/media/i2c/ov5640.c | 2 +- drivers/media/i2c/ov5645.c | 2 +- drivers/media/i2c/ov5647.c | 6 +++++- drivers/media/i2c/ov5648.c | 2 +- drivers/media/i2c/ov5670.c | 3 ++- drivers/media/i2c/ov5675.c | 2 +- drivers/media/i2c/ov5693.c | 2 +- drivers/media/i2c/ov7251.c | 2 +- drivers/media/i2c/ov7670.c | 2 +- drivers/media/i2c/ov772x.c | 5 +++-- drivers/media/i2c/ov8856.c | 2 +- drivers/media/i2c/ov8858.c | 2 +- drivers/media/i2c/ov8865.c | 2 +- drivers/media/i2c/ov9282.c | 2 +- drivers/media/i2c/ov9734.c | 2 +- drivers/media/i2c/s5c73m3/s5c73m3-core.c | 2 +- drivers/media/i2c/s5k5baf.c | 2 +- drivers/media/i2c/st-mipid02.c | 6 ++++-- drivers/media/i2c/st-vgxy61.c | 2 +- drivers/media/i2c/tc358743.c | 3 ++- drivers/media/i2c/tc358746.c | 4 ++-- drivers/media/i2c/tda1997x.c | 3 ++- drivers/media/i2c/tvp514x.c | 3 ++- drivers/media/i2c/tvp5150.c | 2 +- drivers/media/i2c/tvp7002.c | 3 ++- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/pci/intel/ivsc/mei_csi.c | 4 ++-- drivers/media/platform/atmel/atmel-isi.c | 2 +- drivers/media/platform/cadence/cdns-csi2rx.c | 2 +- drivers/media/platform/cadence/cdns-csi2tx.c | 3 ++- drivers/media/platform/intel/pxa_camera.c | 2 +- drivers/media/platform/microchip/microchip-csi2dc.c | 5 +++-- .../media/platform/microchip/microchip-sama5d2-isc.c | 2 +- .../media/platform/microchip/microchip-sama7g5-isc.c | 2 +- drivers/media/platform/nxp/imx-mipi-csis.c | 2 +- drivers/media/platform/nxp/imx8mq-mipi-csi2.c | 2 +- drivers/media/platform/qcom/camss/camss.c | 2 +- drivers/media/platform/renesas/rcar-vin/rcar-core.c | 4 ++-- drivers/media/platform/renesas/rcar-vin/rcar-csi2.c | 2 +- drivers/media/platform/renesas/renesas-ceu.c | 3 ++- .../media/platform/renesas/rzg2l-cru/rzg2l-core.c | 2 +- .../media/platform/renesas/rzg2l-cru/rzg2l-csi2.c | 2 +- drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 2 +- .../media/platform/samsung/exynos4-is/media-dev.c | 3 ++- .../media/platform/samsung/exynos4-is/mipi-csis.c | 3 ++- drivers/media/platform/st/stm32/stm32-dcmi.c | 2 +- drivers/media/platform/sunxi/sun4i-csi/sun4i_csi.c | 2 +- .../platform/sunxi/sun6i-csi/sun6i_csi_bridge.c | 2 +- .../platform/sunxi/sun6i-mipi-csi2/sun6i_mipi_csi2.c | 2 +- .../sun8i-a83t-mipi-csi2/sun8i_a83t_mipi_csi2.c | 2 +- drivers/media/platform/ti/am437x/am437x-vpfe.c | 2 +- drivers/media/platform/ti/cal/cal-camerarx.c | 3 ++- drivers/media/platform/ti/davinci/vpif_capture.c | 3 ++- drivers/media/platform/ti/omap3isp/isp.c | 8 ++++---- drivers/media/platform/xilinx/xilinx-csi2rxss.c | 2 +- drivers/media/v4l2-core/v4l2-fwnode.c | 5 +++-- .../staging/media/atomisp/pci/atomisp_csi2_bridge.c | 2 +- .../media/deprecated/atmel/atmel-sama5d2-isc.c | 2 +- .../media/deprecated/atmel/atmel-sama7g5-isc.c | 2 +- drivers/staging/media/imx/imx6-mipi-csi2.c | 2 +- drivers/staging/media/max96712/max96712.c | 2 +- .../staging/media/sunxi/sun6i-isp/sun6i_isp_proc.c | 2 +- drivers/staging/media/tegra-video/csi.c | 2 +- drivers/staging/media/tegra-video/vi.c | 2 +- drivers/staging/media/tegra-video/vip.c | 2 +- include/media/v4l2-fwnode.h | 12 ++++++++++-- 100 files changed, 144 insertions(+), 112 deletions(-)