node_ep = of_graph_get_next_endpoint(node, NULL);
if (!node_ep) {
- dev_warn(dev, "no endpoint defined for node: %s\n",
- node->full_name);
+ dev_warn(dev, "no endpoint defined for node: %pOF\n", node);
return 0;
}
node_ep = of_graph_get_next_endpoint(node, NULL);
if (!node_ep) {
- dev_err(dev, "no endpoint defined at node %s\n",
- node->full_name);
+ dev_err(dev, "no endpoint defined at node %pOF\n", node);
return -EINVAL;
}
case V4L2_MBUS_PARALLEL:
break;
default:
- dev_err(dev, "unsupported bus in endpoint defined at node %s\n",
- node->full_name);
+ dev_err(dev, "unsupported bus in endpoint defined at node %pOF\n",
+ node);
return -EINVAL;
}
rem = of_graph_get_remote_port_parent(endpoint);
if (!rem) {
- dev_err(&pdev->dev, "Remote device at %s not found\n",
- endpoint->full_name);
+ dev_err(&pdev->dev, "Remote device at %pOF not found\n",
+ endpoint);
goto done;
}
rem = of_graph_get_remote_port_parent(epn);
if (!rem) {
- dev_notice(dev, "Remote device at %s not found\n",
- of_node_full_name(epn));
+ dev_notice(dev, "Remote device at %pOF not found\n",
+ epn);
continue;
}
vpif_obj.config->chan_config->inputs[i].subdev_name =
(char *)to_of_node(subdev->fwnode)->full_name;
vpif_dbg(2, debug,
- "%s: setting input %d subdev_name = %s\n",
+ "%s: setting input %d subdev_name = %pOF\n",
__func__, i,
- to_of_node(subdev->fwnode)->full_name);
+ to_of_node(subdev->fwnode));
return 0;
}
}
dev_err(&pdev->dev, "Could not parse the endpoint\n");
goto done;
}
- dev_dbg(&pdev->dev, "Endpoint %s, bus_width = %d\n",
- endpoint->full_name, bus_cfg.bus.parallel.bus_width);
+ dev_dbg(&pdev->dev, "Endpoint %pOF, bus_width = %d\n",
+ endpoint, bus_cfg.bus.parallel.bus_width);
flags = bus_cfg.bus.parallel.flags;
if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH)
rem = of_graph_get_remote_port_parent(endpoint);
if (!rem) {
- dev_dbg(&pdev->dev, "Remote device at %s not found\n",
- endpoint->full_name);
+ dev_dbg(&pdev->dev, "Remote device at %pOF not found\n",
+ endpoint);
goto done;
}
- dev_dbg(&pdev->dev, "Remote device %s, %s found\n",
- rem->name, rem->full_name);
+ dev_dbg(&pdev->dev, "Remote device %s, %pOF found\n",
+ rem->name, rem);
sdinfo->name = rem->full_name;
pdata->asd[i] = devm_kzalloc(&pdev->dev,
sensor->drvdata = fimc_is_sensor_get_drvdata(node);
if (!sensor->drvdata) {
- dev_err(&is->pdev->dev, "no driver data found for: %s\n",
- node->full_name);
+ dev_err(&is->pdev->dev, "no driver data found for: %pOF\n",
+ node);
return -EINVAL;
}
/* Use MIPI-CSIS channel id to determine the ISP I2C bus index. */
ret = of_property_read_u32(port, "reg", &tmp);
if (ret < 0) {
- dev_err(&is->pdev->dev, "reg property not found at: %s\n",
- port->full_name);
+ dev_err(&is->pdev->dev, "reg property not found at: %pOF\n",
+ port);
of_node_put(port);
return ret;
}
if (!drv_data || fimc->index >= drv_data->num_instances ||
fimc->index < 0) {
- dev_err(dev, "Wrong %s node alias\n",
- dev->of_node->full_name);
+ dev_err(dev, "Wrong %pOF node alias\n", dev->of_node);
return -EINVAL;
}
rem = of_graph_get_remote_port_parent(ep);
of_node_put(ep);
if (rem == NULL) {
- v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
- ep->full_name);
+ v4l2_info(&fmd->v4l2_dev, "Remote device at %pOF not found\n",
+ ep);
return 0;
}
*/
pd->sensor_bus_type = FIMC_BUS_TYPE_MIPI_CSI2;
} else {
- v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %s\n",
- endpoint.base.port, rem->full_name);
+ v4l2_err(&fmd->v4l2_dev, "Wrong port id (%u) at node %pOF\n",
+ endpoint.base.port, rem);
}
/*
* For FIMC-IS handled sensors, that are placed under i2c-isp device
node = of_graph_get_next_endpoint(node, NULL);
if (!node) {
- dev_err(&pdev->dev, "No port node at %s\n",
- pdev->dev.of_node->full_name);
+ dev_err(&pdev->dev, "No port node at %pOF\n",
+ pdev->dev.of_node);
return -EINVAL;
}
/* Get port node and validate MIPI-CSI channel id. */
larb_node = of_parse_phandle(node, "mediatek,larb", 0);
if (!larb_node) {
dev_err(dev,
- "Missing mediadek,larb phandle in %s node\n",
- node->full_name);
+ "Missing mediadek,larb phandle in %pOF node\n", node);
return -EINVAL;
}
larb_pdev = of_find_device_by_node(larb_node);
if (!larb_pdev) {
- dev_warn(dev, "Waiting for larb device %s\n",
- larb_node->full_name);
+ dev_warn(dev, "Waiting for larb device %pOF\n", larb_node);
of_node_put(larb_node);
return -EPROBE_DEFER;
}
continue;
if (!of_device_is_available(node)) {
- dev_err(dev, "Skipping disabled component %s\n",
- node->full_name);
+ dev_err(dev, "Skipping disabled component %pOF\n",
+ node);
continue;
}
comp_type = (enum mtk_mdp_comp_type)of_id->data;
comp_id = mtk_mdp_comp_get_id(dev, node, comp_type);
if (comp_id < 0) {
- dev_warn(dev, "Skipping unknown component %s\n",
- node->full_name);
+ dev_warn(dev, "Skipping unknown component %pOF\n",
+ node);
continue;
}
if (ret)
return ret;
- dev_dbg(dev, "parsing endpoint %s, interface %u\n",
- to_of_node(fwnode)->full_name, vep.base.port);
+ dev_dbg(dev, "parsing endpoint %pOF, interface %u\n",
+ to_of_node(fwnode), vep.base.port);
switch (vep.base.port) {
case ISP_OF_PHY_PARALLEL:
break;
default:
- dev_warn(dev, "%s: invalid interface %u\n",
- to_of_node(fwnode)->full_name, vep.base.port);
+ dev_warn(dev, "%pOF: invalid interface %u\n",
+ to_of_node(fwnode), vep.base.port);
return -EINVAL;
}
asd->match.fwnode.fwnode = of_fwnode_handle(remote);
of_node_put(remote);
} else {
- dev_notice(dev, "no remote for %s\n", of_node_full_name(np));
+ dev_notice(dev, "no remote for %pOF\n", np);
}
out:
subdevs[0] = &vin->digital.asd;
- vin_dbg(vin, "Found digital subdevice %s\n",
- of_node_full_name(to_of_node(subdevs[0]->match.fwnode.fwnode)));
+ vin_dbg(vin, "Found digital subdevice %pOF\n",
+ to_of_node(subdevs[0]->match.fwnode.fwnode));
vin->notifier.num_subdevs = 1;
vin->notifier.subdevs = subdevs;
v4l2_clk_name_i2c(clk_name, sizeof(clk_name),
client->adapter->nr, client->addr);
else
- v4l2_clk_name_of(clk_name, sizeof(clk_name),
- of_node_full_name(remote));
+ v4l2_clk_name_of(clk_name, sizeof(clk_name), remote);
icd->clk = v4l2_clk_register(&soc_camera_clk_ops, clk_name, icd);
if (IS_ERR(icd->clk)) {
ren = of_graph_get_remote_port(epn);
if (!ren) {
- dev_notice(dev, "no remote for %s\n",
- of_node_full_name(epn));
+ dev_notice(dev, "no remote for %pOF\n", epn);
continue;
}
of_node_put(ep);
ep = next;
- dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+ dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
if (ret < 0) {
- dev_err(xdev->dev, "failed to parse link for %s\n",
- ep->full_name);
+ dev_err(xdev->dev, "failed to parse link for %pOF\n",
+ ep);
continue;
}
* the link.
*/
if (link.local_port >= local->num_pads) {
- dev_err(xdev->dev, "invalid port number %u for %s\n",
+ dev_err(xdev->dev, "invalid port number %u for %pOF\n",
link.local_port,
- to_of_node(link.local_node)->full_name);
+ to_of_node(link.local_node));
v4l2_fwnode_put_link(&link);
ret = -EINVAL;
break;
local_pad = &local->pads[link.local_port];
if (local_pad->flags & MEDIA_PAD_FL_SINK) {
- dev_dbg(xdev->dev, "skipping sink port %s:%u\n",
- to_of_node(link.local_node)->full_name,
+ dev_dbg(xdev->dev, "skipping sink port %pOF:%u\n",
+ to_of_node(link.local_node),
link.local_port);
v4l2_fwnode_put_link(&link);
continue;
/* Skip DMA engines, they will be processed separately. */
if (link.remote_node == of_fwnode_handle(xdev->dev->of_node)) {
- dev_dbg(xdev->dev, "skipping DMA port %s:%u\n",
- to_of_node(link.local_node)->full_name,
+ dev_dbg(xdev->dev, "skipping DMA port %pOF:%u\n",
+ to_of_node(link.local_node),
link.local_port);
v4l2_fwnode_put_link(&link);
continue;
ent = xvip_graph_find_entity(xdev,
to_of_node(link.remote_node));
if (ent == NULL) {
- dev_err(xdev->dev, "no entity found for %s\n",
- to_of_node(link.remote_node)->full_name);
+ dev_err(xdev->dev, "no entity found for %pOF\n",
+ to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link);
ret = -ENODEV;
break;
remote = ent->entity;
if (link.remote_port >= remote->num_pads) {
- dev_err(xdev->dev, "invalid port number %u on %s\n",
- link.remote_port,
- to_of_node(link.remote_node)->full_name);
+ dev_err(xdev->dev, "invalid port number %u on %pOF\n",
+ link.remote_port, to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link);
ret = -EINVAL;
break;
of_node_put(ep);
ep = next;
- dev_dbg(xdev->dev, "processing endpoint %s\n", ep->full_name);
+ dev_dbg(xdev->dev, "processing endpoint %pOF\n", ep);
ret = v4l2_fwnode_parse_link(of_fwnode_handle(ep), &link);
if (ret < 0) {
- dev_err(xdev->dev, "failed to parse link for %s\n",
- ep->full_name);
+ dev_err(xdev->dev, "failed to parse link for %pOF\n",
+ ep);
continue;
}
ent = xvip_graph_find_entity(xdev,
to_of_node(link.remote_node));
if (ent == NULL) {
- dev_err(xdev->dev, "no entity found for %s\n",
- to_of_node(link.remote_node)->full_name);
+ dev_err(xdev->dev, "no entity found for %pOF\n",
+ to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link);
ret = -ENODEV;
break;
}
if (link.remote_port >= ent->entity->num_pads) {
- dev_err(xdev->dev, "invalid port number %u on %s\n",
+ dev_err(xdev->dev, "invalid port number %u on %pOF\n",
link.remote_port,
- to_of_node(link.remote_node)->full_name);
+ to_of_node(link.remote_node));
v4l2_fwnode_put_link(&link);
ret = -EINVAL;
break;
continue;
if (entity->subdev) {
- dev_err(xdev->dev, "duplicate subdev for node %s\n",
- entity->node->full_name);
+ dev_err(xdev->dev, "duplicate subdev for node %pOF\n",
+ entity->node);
return -EINVAL;
}
struct device_node *ep = NULL;
int ret = 0;
- dev_dbg(xdev->dev, "parsing node %s\n", node->full_name);
+ dev_dbg(xdev->dev, "parsing node %pOF\n", node);
while (1) {
ep = of_graph_get_next_endpoint(node, ep);
if (ep == NULL)
break;
- dev_dbg(xdev->dev, "handling endpoint %s\n", ep->full_name);
+ dev_dbg(xdev->dev, "handling endpoint %pOF\n", ep);
remote = of_graph_get_remote_port_parent(ep);
if (remote == NULL) {
ret = xvip_dma_init(xdev, dma, type, index);
if (ret < 0) {
- dev_err(xdev->dev, "%s initialization failed\n",
- node->full_name);
+ dev_err(xdev->dev, "%pOF initialization failed\n", node);
return ret;
}
/* if dev_name is not found, try use the OF name to find again */
if (PTR_ERR(clk) == -ENODEV && dev->of_node) {
- v4l2_clk_name_of(clk_name, sizeof(clk_name),
- of_node_full_name(dev->of_node));
+ v4l2_clk_name_of(clk_name, sizeof(clk_name), dev->of_node);
clk = v4l2_clk_find(clk_name);
}
#define v4l2_clk_name_i2c(name, size, adap, client) snprintf(name, size, \
"%d-%04x", adap, client)
-#define v4l2_clk_name_of(name, size, of_full_name) snprintf(name, size, \
- "of-%s", of_full_name)
+#define v4l2_clk_name_of(name, size, node) snprintf(name, size, \
+ "of-%pOF", node)
#endif