/drivers/base/ |
D | property.c | 24 &dev->of_node->fwnode : dev->fwnode; in dev_fwnode() 46 bool fwnode_property_present(const struct fwnode_handle *fwnode, in fwnode_property_present() argument 51 ret = fwnode_call_bool_op(fwnode, property_present, propname); in fwnode_property_present() 52 if (ret == false && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_present() 53 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_present() 54 ret = fwnode_call_bool_op(fwnode->secondary, property_present, in fwnode_property_present() 229 static int fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in fwnode_property_read_int_array() argument 236 ret = fwnode_call_int_op(fwnode, property_read_int_array, propname, in fwnode_property_read_int_array() 238 if (ret == -EINVAL && !IS_ERR_OR_NULL(fwnode) && in fwnode_property_read_int_array() 239 !IS_ERR_OR_NULL(fwnode->secondary)) in fwnode_property_read_int_array() [all …]
|
D | swnode.c | 17 struct fwnode_handle fwnode; member 36 bool is_software_node(const struct fwnode_handle *fwnode) in is_software_node() argument 38 return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &software_node_ops; in is_software_node() 48 struct swnode, fwnode) : NULL; \ 53 struct fwnode_handle *fwnode = dev_fwnode(dev); in dev_to_swnode() local 55 if (!fwnode) in dev_to_swnode() 58 if (!is_software_node(fwnode)) in dev_to_swnode() 59 fwnode = fwnode->secondary; in dev_to_swnode() 61 return to_swnode(fwnode); in dev_to_swnode() 87 const struct software_node *to_software_node(const struct fwnode_handle *fwnode) in to_software_node() argument [all …]
|
D | core.c | 108 static void fwnode_links_purge_suppliers(struct fwnode_handle *fwnode) in fwnode_links_purge_suppliers() argument 113 list_for_each_entry_safe(link, tmp, &fwnode->suppliers, c_hook) { in fwnode_links_purge_suppliers() 127 static void fwnode_links_purge_consumers(struct fwnode_handle *fwnode) in fwnode_links_purge_consumers() argument 132 list_for_each_entry_safe(link, tmp, &fwnode->consumers, s_hook) { in fwnode_links_purge_consumers() 146 void fwnode_links_purge(struct fwnode_handle *fwnode) in fwnode_links_purge() argument 148 fwnode_links_purge_suppliers(fwnode); in fwnode_links_purge() 149 fwnode_links_purge_consumers(fwnode); in fwnode_links_purge() 152 static void fw_devlink_purge_absent_suppliers(struct fwnode_handle *fwnode) in fw_devlink_purge_absent_suppliers() argument 157 if (fwnode->dev) in fw_devlink_purge_absent_suppliers() 160 fwnode->flags |= FWNODE_FLAG_NOT_DEVICE; in fw_devlink_purge_absent_suppliers() [all …]
|
/drivers/media/v4l2-core/ |
D | v4l2-fwnode.c | 129 static int v4l2_fwnode_endpoint_parse_csi2_bus(struct fwnode_handle *fwnode, in v4l2_fwnode_endpoint_parse_csi2_bus() argument 166 rval = fwnode_property_count_u32(fwnode, "data-lanes"); in v4l2_fwnode_endpoint_parse_csi2_bus() 171 fwnode_property_read_u32_array(fwnode, "data-lanes", array, in v4l2_fwnode_endpoint_parse_csi2_bus() 194 rval = fwnode_property_count_u32(fwnode, "lane-polarities"); in v4l2_fwnode_endpoint_parse_csi2_bus() 205 if (!fwnode_property_read_u32(fwnode, "clock-lanes", &v)) { in v4l2_fwnode_endpoint_parse_csi2_bus() 218 if (fwnode_property_present(fwnode, "clock-noncontinuous")) { in v4l2_fwnode_endpoint_parse_csi2_bus() 248 fwnode_property_read_u32_array(fwnode, in v4l2_fwnode_endpoint_parse_csi2_bus() 273 v4l2_fwnode_endpoint_parse_parallel_bus(struct fwnode_handle *fwnode, in v4l2_fwnode_endpoint_parse_parallel_bus() argument 284 if (!fwnode_property_read_u32(fwnode, "hsync-active", &v)) { in v4l2_fwnode_endpoint_parse_parallel_bus() 292 if (!fwnode_property_read_u32(fwnode, "vsync-active", &v)) { in v4l2_fwnode_endpoint_parse_parallel_bus() [all …]
|
D | v4l2-async.c | 87 if (sd->fwnode == asd->match.fwnode) in match_fwnode() 98 sd_fwnode_is_ep = fwnode_graph_is_endpoint(sd->fwnode); in match_fwnode() 99 asd_fwnode_is_ep = fwnode_graph_is_endpoint(asd->match.fwnode); in match_fwnode() 109 dev_fwnode = fwnode_graph_get_port_parent(sd->fwnode); in match_fwnode() 110 other_fwnode = asd->match.fwnode; in match_fwnode() 112 dev_fwnode = fwnode_graph_get_port_parent(asd->match.fwnode); in match_fwnode() 113 other_fwnode = sd->fwnode; in match_fwnode() 210 return asd_x->match.fwnode == asd_y->match.fwnode; in asd_equal() 610 fwnode_handle_put(asd->match.fwnode); in __v4l2_async_notifier_cleanup() 652 struct fwnode_handle *fwnode, in v4l2_async_notifier_add_fwnode_subdev() argument [all …]
|
/drivers/hwtracing/coresight/ |
D | coresight-cti-platform.c | 74 static int cti_plat_get_cpu_at_node(struct fwnode_handle *fwnode) in cti_plat_get_cpu_at_node() argument 76 if (is_of_node(fwnode)) in cti_plat_get_cpu_at_node() 77 return of_cti_get_cpu_at_node(to_of_node(fwnode)); in cti_plat_get_cpu_at_node() 81 const char *cti_plat_get_node_name(struct fwnode_handle *fwnode) in cti_plat_get_node_name() argument 83 if (is_of_node(fwnode)) in cti_plat_get_node_name() 84 return of_node_full_name(to_of_node(fwnode)); in cti_plat_get_node_name() 94 cti_plat_get_csdev_or_node_name(struct fwnode_handle *fwnode, in cti_plat_get_csdev_or_node_name() argument 98 *csdev = coresight_find_csdev_by_fwnode(fwnode); in cti_plat_get_csdev_or_node_name() 102 name = cti_plat_get_node_name(fwnode); in cti_plat_get_csdev_or_node_name() 106 static bool cti_plat_node_name_eq(struct fwnode_handle *fwnode, in cti_plat_node_name_eq() argument [all …]
|
/drivers/acpi/ |
D | property.c | 79 fwnode_init(&dn->fwnode, &acpi_data_fwnode_ops); in acpi_nondev_subnode_extract() 99 &dn->fwnode)) in acpi_nondev_subnode_extract() 102 &dn->fwnode)) { in acpi_nondev_subnode_extract() 545 acpi_device_data_of_node(const struct fwnode_handle *fwnode) in acpi_device_data_of_node() argument 547 if (is_acpi_device_node(fwnode)) { in acpi_device_data_of_node() 548 const struct acpi_device *adev = to_acpi_device_node(fwnode); in acpi_device_data_of_node() 550 } else if (is_acpi_data_node(fwnode)) { in acpi_device_data_of_node() 551 const struct acpi_data_node *dn = to_acpi_data_node(fwnode); in acpi_device_data_of_node() 563 int acpi_node_prop_get(const struct fwnode_handle *fwnode, in acpi_node_prop_get() argument 566 return acpi_data_get_property(acpi_device_data_of_node(fwnode), in acpi_node_prop_get() [all …]
|
D | irq.c | 62 fwspec.fwnode = acpi_gsi_domain_id; in acpi_register_gsi() 119 result = &device->fwnode; in acpi_get_irq_source_fwhandle() 150 static inline void acpi_irq_parse_one_match(struct fwnode_handle *fwnode, in acpi_irq_parse_one_match() argument 155 if (!fwnode) in acpi_irq_parse_one_match() 159 ctx->fwspec->fwnode = fwnode; in acpi_irq_parse_one_match() 189 struct fwnode_handle *fwnode; in acpi_irq_parse_one_cb() local 198 fwnode = acpi_gsi_domain_id; in acpi_irq_parse_one_cb() 199 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], in acpi_irq_parse_one_cb() 211 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source); in acpi_irq_parse_one_cb() 212 acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index], in acpi_irq_parse_one_cb() [all …]
|
/drivers/platform/x86/ |
D | intel_cht_int33fe_typec.c | 138 struct fwnode_handle *fwnode; in cht_int33fe_setup_dp() local 141 fwnode = software_node_fwnode(&displayport_node); in cht_int33fe_setup_dp() 142 if (!fwnode) in cht_int33fe_setup_dp() 158 fwnode->secondary = ERR_PTR(-ENODEV); in cht_int33fe_setup_dp() 159 data->dp->secondary = fwnode; in cht_int33fe_setup_dp() 229 struct fwnode_handle *fwnode; in cht_int33fe_register_max17047() local 232 fwnode = software_node_fwnode(&max17047_node); in cht_int33fe_register_max17047() 233 if (!fwnode) in cht_int33fe_register_max17047() 239 set_secondary_fwnode(&max17047->dev, fwnode); in cht_int33fe_register_max17047() 250 board_info.fwnode = fwnode; in cht_int33fe_register_max17047() [all …]
|
/drivers/usb/typec/ |
D | mux.c | 32 static int switch_fwnode_match(struct device *dev, const void *fwnode) in switch_fwnode_match() argument 34 return dev_fwnode(dev) == fwnode && dev_name_ends_with(dev, "-switch"); in switch_fwnode_match() 37 static void *typec_switch_match(struct fwnode_handle *fwnode, const char *id, in typec_switch_match() argument 42 if (id && !fwnode_property_present(fwnode, id)) in typec_switch_match() 45 dev = class_find_device(&typec_mux_class, NULL, fwnode, in typec_switch_match() 60 struct typec_switch *fwnode_typec_switch_get(struct fwnode_handle *fwnode) in fwnode_typec_switch_get() argument 64 sw = fwnode_connection_find_match(fwnode, "orientation-switch", NULL, in fwnode_typec_switch_get() 126 sw->dev.fwnode = desc->fwnode; in typec_switch_register() 184 static int mux_fwnode_match(struct device *dev, const void *fwnode) in mux_fwnode_match() argument 186 return dev_fwnode(dev) == fwnode && dev_name_ends_with(dev, "-mux"); in mux_fwnode_match() [all …]
|
D | qcom-pmic-typec.c | 133 struct fwnode_handle *fwnode; in qcom_pmic_typec_probe() local 162 fwnode = device_get_named_child_node(dev, "connector"); in qcom_pmic_typec_probe() 163 if (!fwnode) in qcom_pmic_typec_probe() 166 ret = fwnode_property_read_string(fwnode, "power-role", &buf); in qcom_pmic_typec_probe() 176 ret = fwnode_property_read_string(fwnode, "data-role", &buf); in qcom_pmic_typec_probe() 187 cap.fwnode = fwnode; in qcom_pmic_typec_probe() 194 fwnode_handle_put(fwnode); in qcom_pmic_typec_probe() 227 fwnode_handle_put(fwnode); in qcom_pmic_typec_probe()
|
/drivers/leds/ |
D | leds-pwm.c | 60 struct led_pwm *led, struct fwnode_handle *fwnode) in led_pwm_add() argument 63 struct led_init_data init_data = { .fwnode = fwnode }; in led_pwm_add() 72 led_data->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); in led_pwm_add() 102 struct fwnode_handle *fwnode; in led_pwm_create_fwnode() local 108 device_for_each_child_node(dev, fwnode) { in led_pwm_create_fwnode() 109 ret = fwnode_property_read_string(fwnode, "label", &led.name); in led_pwm_create_fwnode() 110 if (ret && is_of_node(fwnode)) in led_pwm_create_fwnode() 111 led.name = to_of_node(fwnode)->name; in led_pwm_create_fwnode() 114 fwnode_handle_put(fwnode); in led_pwm_create_fwnode() 118 led.active_low = fwnode_property_read_bool(fwnode, in led_pwm_create_fwnode() [all …]
|
D | led-core.c | 329 struct fwnode_handle *fwnode = led_cdev->dev->fwnode; in led_get_default_pattern() local 333 count = fwnode_property_count_u32(fwnode, "led-pattern"); in led_get_default_pattern() 341 if (fwnode_property_read_u32_array(fwnode, "led-pattern", pattern, count)) { in led_get_default_pattern() 371 struct fwnode_handle *fwnode, in led_parse_fwnode_props() argument 376 if (!fwnode) in led_parse_fwnode_props() 379 if (fwnode_property_present(fwnode, "label")) { in led_parse_fwnode_props() 380 ret = fwnode_property_read_string(fwnode, "label", &props->label); in led_parse_fwnode_props() 386 if (fwnode_property_present(fwnode, "color")) { in led_parse_fwnode_props() 387 ret = fwnode_property_read_u32(fwnode, "color", &props->color); in led_parse_fwnode_props() 397 if (!fwnode_property_present(fwnode, "function")) in led_parse_fwnode_props() [all …]
|
D | leds-tps6105x.c | 15 struct fwnode_handle *fwnode; member 22 fwnode_handle_put(priv->fwnode); in tps6105x_handle_put() 55 priv->fwnode = device_get_next_child_node(pdev->dev.parent, NULL); in tps6105x_led_probe() 64 init_data.fwnode = priv->fwnode; in tps6105x_led_probe()
|
/drivers/of/ |
D | property.c | 860 static struct fwnode_handle *of_fwnode_get(struct fwnode_handle *fwnode) in of_fwnode_get() argument 862 return of_fwnode_handle(of_node_get(to_of_node(fwnode))); in of_fwnode_get() 865 static void of_fwnode_put(struct fwnode_handle *fwnode) in of_fwnode_put() argument 867 of_node_put(to_of_node(fwnode)); in of_fwnode_put() 870 static bool of_fwnode_device_is_available(const struct fwnode_handle *fwnode) in of_fwnode_device_is_available() argument 872 return of_device_is_available(to_of_node(fwnode)); in of_fwnode_device_is_available() 875 static bool of_fwnode_property_present(const struct fwnode_handle *fwnode, in of_fwnode_property_present() argument 878 return of_property_read_bool(to_of_node(fwnode), propname); in of_fwnode_property_present() 881 static int of_fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in of_fwnode_property_read_int_array() argument 886 const struct device_node *node = to_of_node(fwnode); in of_fwnode_property_read_int_array() [all …]
|
/drivers/irqchip/ |
D | irq-gic-v2m.c | 64 struct fwnode_handle *fwnode; member 143 if (is_of_node(domain->parent->fwnode)) { in gicv2m_irq_gic_domain_alloc() 144 fwspec.fwnode = domain->parent->fwnode; in gicv2m_irq_gic_domain_alloc() 149 } else if (is_fwnode_irqchip(domain->parent->fwnode)) { in gicv2m_irq_gic_domain_alloc() 150 fwspec.fwnode = domain->parent->fwnode; in gicv2m_irq_gic_domain_alloc() 274 of_node_put(to_of_node(v2m->fwnode)); in gicv2m_teardown() 275 if (is_fwnode_irqchip(v2m->fwnode)) in gicv2m_teardown() 276 irq_domain_free_fwnode(v2m->fwnode); in gicv2m_teardown() 290 inner_domain = irq_domain_create_tree(v2m->fwnode, in gicv2m_allocate_domains() 299 pci_domain = pci_msi_create_irq_domain(v2m->fwnode, in gicv2m_allocate_domains() [all …]
|
D | irq-ixp4xx.c | 135 if (is_of_node(fwspec->fwnode) && fwspec->param_count == 2) { in ixp4xx_irq_domain_translate() 141 if (is_fwnode_irqchip(fwspec->fwnode)) { in ixp4xx_irq_domain_translate() 257 struct fwnode_handle *fwnode, in ixp4xx_irq_setup() argument 288 ixi->domain = irq_domain_create_linear(fwnode, nr_irqs, in ixp4xx_irq_setup() 311 struct fwnode_handle *fwnode; in ixp4xx_irq_init() local 322 fwnode = irq_domain_alloc_fwnode(&irqbase); in ixp4xx_irq_init() 323 if (!fwnode) { in ixp4xx_irq_init() 327 ret = ixp4xx_irq_setup(ixi, base, fwnode, is_356); in ixp4xx_irq_init() 330 irq_domain_free_fwnode(fwnode); in ixp4xx_irq_init() 347 fwspec.fwnode = fwnode; in ixp4xx_irq_init() [all …]
|
D | irq-gic-v4.c | 107 vpe->fwnode = irq_domain_alloc_named_id_fwnode(name, idx); in its_alloc_vcpu_sgis() 108 if (!vpe->fwnode) in its_alloc_vcpu_sgis() 114 vpe->sgi_domain = irq_domain_create_linear(vpe->fwnode, 16, in its_alloc_vcpu_sgis() 130 if (vpe->fwnode) in its_alloc_vcpu_sgis() 131 irq_domain_free_fwnode(vpe->fwnode); in its_alloc_vcpu_sgis() 140 vm->fwnode = irq_domain_alloc_named_id_fwnode("GICv4-vpe", in its_alloc_vcpu_irqs() 142 if (!vm->fwnode) in its_alloc_vcpu_irqs() 146 vm->fwnode, vpe_domain_ops, in its_alloc_vcpu_irqs() 175 if (vm->fwnode) in its_alloc_vcpu_irqs() 176 irq_domain_free_fwnode(vm->fwnode); in its_alloc_vcpu_irqs() [all …]
|
D | irq-gic-v3-mbi.c | 53 if (!is_of_node(domain->parent->fwnode)) in mbi_irq_gic_domain_alloc() 61 fwspec.fwnode = domain->parent->fwnode; in mbi_irq_gic_domain_alloc() 186 *pci_domain = pci_msi_create_irq_domain(nexus_domain->parent->fwnode, in mbi_allocate_pci_domain() 237 nexus_domain = irq_domain_create_tree(parent->fwnode, in mbi_allocate_domains() 247 plat_domain = platform_msi_create_irq_domain(parent->fwnode, in mbi_allocate_domains() 263 int __init mbi_init(struct fwnode_handle *fwnode, struct irq_domain *parent) in mbi_init() argument 269 np = to_of_node(fwnode); in mbi_init()
|
/drivers/usb/roles/ |
D | class.c | 90 static void *usb_role_switch_match(struct fwnode_handle *fwnode, const char *id, in usb_role_switch_match() argument 95 if (id && !fwnode_property_present(fwnode, id)) in usb_role_switch_match() 98 dev = class_find_device_by_fwnode(role_class, fwnode); in usb_role_switch_match() 104 usb_role_switch_is_parent(struct fwnode_handle *fwnode) in usb_role_switch_is_parent() argument 106 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in usb_role_switch_is_parent() 149 struct usb_role_switch *fwnode_usb_role_switch_get(struct fwnode_handle *fwnode) in fwnode_usb_role_switch_get() argument 153 sw = usb_role_switch_is_parent(fwnode); in fwnode_usb_role_switch_get() 155 sw = fwnode_connection_find_match(fwnode, "usb-role-switch", in fwnode_usb_role_switch_get() 187 usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode) in usb_role_switch_find_by_fwnode() argument 191 if (!fwnode) in usb_role_switch_find_by_fwnode() [all …]
|
/drivers/usb/typec/mux/ |
D | intel_pmc_mux.c | 496 struct fwnode_handle *fwnode) in pmc_usb_register_port() argument 505 ret = fwnode_property_read_u8(fwnode, "usb2-port-number", &port->usb2_port); in pmc_usb_register_port() 509 ret = fwnode_property_read_u8(fwnode, "usb3-port-number", &port->usb3_port); in pmc_usb_register_port() 513 ret = fwnode_property_read_string(fwnode, "sbu-orientation", &str); in pmc_usb_register_port() 517 ret = fwnode_property_read_string(fwnode, "hsl-orientation", &str); in pmc_usb_register_port() 524 sw_desc.fwnode = fwnode; in pmc_usb_register_port() 526 sw_desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port() 533 mux_desc.fwnode = fwnode; in pmc_usb_register_port() 535 mux_desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port() 544 desc.fwnode = fwnode; in pmc_usb_register_port() [all …]
|
/drivers/thunderbolt/ |
D | acpi.c | 18 struct fwnode_handle *fwnode; in tb_acpi_add_link() local 28 fwnode = acpi_fwnode_handle(adev); in tb_acpi_add_link() 29 ret = fwnode_property_get_reference_args(fwnode, "usb4-host-interface", in tb_acpi_add_link() 35 if (nhi->pdev->dev.fwnode != args.fwnode) in tb_acpi_add_link() 103 fwnode_handle_put(args.fwnode); in tb_acpi_add_link()
|
/drivers/platform/chrome/ |
D | cros_ec_typec.c | 66 struct fwnode_handle *fwnode, in cros_typec_parse_port_props() argument 73 ret = fwnode_property_read_string(fwnode, "power-role", &buf); in cros_typec_parse_port_props() 84 ret = fwnode_property_read_string(fwnode, "data-role", &buf); in cros_typec_parse_port_props() 95 ret = fwnode_property_read_string(fwnode, "try-power-role", &buf); in cros_typec_parse_port_props() 106 cap->fwnode = fwnode; in cros_typec_parse_port_props() 112 struct fwnode_handle *fwnode, in cros_typec_get_switch_handles() argument 115 port->mux = fwnode_typec_mux_get(fwnode, NULL); in cros_typec_get_switch_handles() 121 port->ori_sw = fwnode_typec_switch_get(fwnode); in cros_typec_get_switch_handles() 127 port->role_sw = fwnode_usb_role_switch_get(fwnode); in cros_typec_get_switch_handles() 231 struct fwnode_handle *fwnode; in cros_typec_init_ports() local [all …]
|
/drivers/net/phy/ |
D | sfp-bus.c | 26 struct fwnode_handle *fwnode; member 422 static struct sfp_bus *sfp_bus_get(struct fwnode_handle *fwnode) in sfp_bus_get() argument 431 if (sfp->fwnode == fwnode) { in sfp_bus_get() 440 new->fwnode = fwnode; in sfp_bus_get() 605 struct sfp_bus *sfp_bus_find_fwnode(struct fwnode_handle *fwnode) in sfp_bus_find_fwnode() argument 611 ret = fwnode_property_get_reference_args(fwnode, "sfp", NULL, in sfp_bus_find_fwnode() 618 if (!fwnode_device_is_available(ref.fwnode)) { in sfp_bus_find_fwnode() 619 fwnode_handle_put(ref.fwnode); in sfp_bus_find_fwnode() 623 bus = sfp_bus_get(ref.fwnode); in sfp_bus_find_fwnode() 624 fwnode_handle_put(ref.fwnode); in sfp_bus_find_fwnode() [all …]
|
/drivers/gpio/ |
D | gpiolib-acpi.c | 516 args->fwnode = acpi_fwnode_handle(adev); in acpi_get_driver_gpio_data() 719 static int acpi_gpio_property_lookup(struct fwnode_handle *fwnode, in acpi_gpio_property_lookup() argument 728 ret = __acpi_node_get_property_reference(fwnode, propname, index, 3, in acpi_gpio_property_lookup() 731 struct acpi_device *adev = to_acpi_device_node(fwnode); in acpi_gpio_property_lookup() 744 if (!to_acpi_device_node(args.fwnode)) in acpi_gpio_property_lookup() 753 lookup->info.adev = to_acpi_device_node(args.fwnode); in acpi_gpio_property_lookup() 889 struct gpio_desc *acpi_node_get_gpiod(struct fwnode_handle *fwnode, in acpi_node_get_gpiod() argument 897 adev = to_acpi_device_node(fwnode); in acpi_node_get_gpiod() 901 if (!is_acpi_data_node(fwnode)) in acpi_node_get_gpiod() 910 ret = acpi_gpio_property_lookup(fwnode, propname, index, &lookup); in acpi_node_get_gpiod() [all …]
|