Lines Matching defs:fwnode

3  * V4L2 fwnode binding parsing library
5 * The origins of the V4L2 fwnode library are in V4L2 OF library that
28 #include <media/v4l2-fwnode.h>
124 static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode,
161 rval = fwnode_property_count_u32(fwnode, "data-lanes");
166 fwnode_property_read_u32_array(fwnode, "data-lanes", array,
189 rval = fwnode_property_count_u32(fwnode, "lane-polarities");
200 rval = fwnode_property_count_u32(fwnode, "line-orders");
211 if (!fwnode_property_read_u32(fwnode, "clock-lanes", &v)) {
224 if (fwnode_property_present(fwnode, "clock-noncontinuous")) {
252 fwnode_property_read_u32_array(fwnode,
266 fwnode_property_read_u32_array(fwnode,
307 v4l2_fwnode_endpoint_parse_parallel_bus(struct fwnode_handle *fwnode,
318 if (!fwnode_property_read_u32(fwnode, "hsync-active", &v)) {
326 if (!fwnode_property_read_u32(fwnode, "vsync-active", &v)) {
334 if (!fwnode_property_read_u32(fwnode, "field-even-active", &v)) {
342 if (!fwnode_property_read_u32(fwnode, "pclk-sample", &v)) {
365 if (!fwnode_property_read_u32(fwnode, "data-active", &v)) {
373 if (fwnode_property_present(fwnode, "slave-mode")) {
382 if (!fwnode_property_read_u32(fwnode, "bus-width", &v)) {
387 if (!fwnode_property_read_u32(fwnode, "data-shift", &v)) {
392 if (!fwnode_property_read_u32(fwnode, "sync-on-green-active", &v)) {
400 if (!fwnode_property_read_u32(fwnode, "data-enable-active", &v)) {
428 v4l2_fwnode_endpoint_parse_csi1_bus(struct fwnode_handle *fwnode,
435 if (!fwnode_property_read_u32(fwnode, "clock-inv", &v)) {
440 if (!fwnode_property_read_u32(fwnode, "strobe", &v)) {
445 if (!fwnode_property_read_u32(fwnode, "data-lanes", &v)) {
450 if (!fwnode_property_read_u32(fwnode, "clock-lanes", &v)) {
461 static int __v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
468 pr_debug("===== begin parsing endpoint %pfw\n", fwnode);
470 fwnode_property_read_u32(fwnode, "bus-type", &bus_type);
471 pr_debug("fwnode video bus type %s (%u), mbus type %s (%u)\n",
494 rval = v4l2_fwnode_endpoint_parse_csi2_bus(fwnode, vep,
500 v4l2_fwnode_endpoint_parse_parallel_bus(fwnode, vep,
510 v4l2_fwnode_endpoint_parse_csi1_bus(fwnode, vep, vep->bus_type);
515 rval = v4l2_fwnode_endpoint_parse_csi2_bus(fwnode, vep,
523 v4l2_fwnode_endpoint_parse_parallel_bus(fwnode, vep,
532 fwnode_graph_parse_endpoint(fwnode, &vep->base);
537 int v4l2_fwnode_endpoint_parse(struct fwnode_handle *fwnode,
542 ret = __v4l2_fwnode_endpoint_parse(fwnode, vep);
544 pr_debug("===== end parsing endpoint %pfw\n", fwnode);
560 int v4l2_fwnode_endpoint_alloc_parse(struct fwnode_handle *fwnode,
565 rval = __v4l2_fwnode_endpoint_parse(fwnode, vep);
569 rval = fwnode_property_count_u64(fwnode, "link-frequencies");
581 rval = fwnode_property_read_u64_array(fwnode,
595 pr_debug("===== end parsing endpoint %pfw\n", fwnode);
601 int v4l2_fwnode_parse_link(struct fwnode_handle *fwnode,
608 fwnode_graph_parse_endpoint(fwnode, &fwep);
611 link->local_node = fwnode_graph_get_port_parent(fwnode);
615 fwnode = fwnode_graph_get_remote_endpoint(fwnode);
616 if (!fwnode)
619 fwnode_graph_parse_endpoint(fwnode, &fwep);
622 link->remote_node = fwnode_graph_get_port_parent(fwnode);
629 fwnode_handle_put(fwnode);
671 v4l2_fwnode_connector_parse_analog(struct fwnode_handle *fwnode,
677 ret = fwnode_property_read_u32(fwnode, "sdtv-standards", &stds);
703 v4l2_fwnode_get_connector_type(struct fwnode_handle *fwnode)
708 if (!fwnode)
712 err = fwnode_property_read_string(fwnode, "compatible", &type_name);
719 int v4l2_fwnode_connector_parse(struct fwnode_handle *fwnode,
727 if (!fwnode)
734 connector_node = fwnode_graph_get_port_parent(fwnode);
738 connector_node = fwnode_graph_get_remote_port_parent(fwnode);
771 int v4l2_fwnode_connector_add_link(struct fwnode_handle *fwnode,
778 if (!fwnode || !connector || connector->type == V4L2_CONN_UNKNOWN)
781 connector_ep = fwnode_graph_get_remote_endpoint(fwnode);
813 struct fwnode_handle *fwnode = dev_fwnode(dev);
820 ret = fwnode_property_read_u32(fwnode, "orientation", &val);
837 ret = fwnode_property_read_u32(fwnode, "rotation", &val);
877 asd = v4l2_async_nf_add_fwnode(notifier, args.fwnode,
879 fwnode_handle_put(args.fwnode);
900 * @fwnode: fwnode to read @prop from
907 * First find an fwnode referred to by the reference at @index in @prop.
909 * Then under that fwnode, @nprops times, for each property in @props,
910 * iteratively follow child nodes starting from fwnode such that they have the
915 * The child fwnode reached at the end of the iteration is then returned to the
922 * underneath the device fwnode, the next tuple identifies a child node
923 * underneath the fwnode identified by the previous tuple, etc. until you
924 * reached the fwnode you need.
1014 * @fwnode: fwnode referring to EP40 under ISP.
1020 * And you'd get back fwnode referring to EP00 under CAM0.
1023 * fwnode, you'll get fwnode referring to EP40 under ISP.
1057 v4l2_fwnode_reference_get_int_prop(struct fwnode_handle *fwnode,
1069 * Obtain remote fwnode as well as the integer arguments.
1074 ret = fwnode_property_get_reference_args(fwnode, prop, NULL, nprops,
1080 * Find a node in the tree under the referred fwnode corresponding to
1083 fwnode = fwnode_args.fwnode;
1087 /* Loop over all child nodes under fwnode. */
1088 fwnode_for_each_child_node(fwnode, child) {
1097 fwnode_handle_put(fwnode);
1101 fwnode = ERR_PTR(-ENOENT);
1107 fwnode = child;
1110 return fwnode;
1147 struct fwnode_handle *fwnode;
1156 fwnode = v4l2_fwnode_reference_get_int_prop(dev_fwnode(dev),
1159 if (IS_ERR(fwnode)) {
1165 if (PTR_ERR(fwnode) != -ENOENT &&
1166 PTR_ERR(fwnode) != -ENODATA)
1167 return PTR_ERR(fwnode);
1170 fwnode_handle_put(fwnode);
1175 !IS_ERR((fwnode = v4l2_fwnode_reference_get_int_prop(dev_fwnode(dev),
1182 asd = v4l2_async_nf_add_fwnode(notifier, fwnode,
1184 fwnode_handle_put(fwnode);
1195 return !fwnode || PTR_ERR(fwnode) == -ENOENT ? 0 : PTR_ERR(fwnode);
1295 MODULE_DESCRIPTION("V4L2 fwnode binding parsing library");