/linux/include/linux/ |
A D | fwnode.h | 80 struct fwnode_handle *fwnode; member 152 ((fwnode) && (fwnode)->ops && (fwnode)->ops->op) 154 (fwnode ? (fwnode_has_op(fwnode, op) ? \ 155 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : -ENXIO) : \ 159 (fwnode_has_op(fwnode, op) ? \ 160 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false) 164 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL) 168 (fwnode)->ops->op(fwnode, ## __VA_ARGS__); \ 170 #define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev) argument 175 fwnode->ops = ops; in fwnode_init() [all …]
|
A D | property.h | 88 struct fwnode_handle *fwnode); 100 #define fwnode_for_each_child_node(fwnode, child) \ argument 102 child = fwnode_get_next_child_node(fwnode, child)) 121 void fwnode_handle_put(struct fwnode_handle *fwnode); 186 return fwnode_property_present(fwnode, propname); in fwnode_property_read_bool() 393 int fwnode_get_phy_mode(struct fwnode_handle *fwnode); 399 const struct fwnode_handle *fwnode); 401 const struct fwnode_handle *fwnode); 403 const struct fwnode_handle *fwnode); 430 #define fwnode_graph_for_each_endpoint(fwnode, child) \ argument [all …]
|
A D | irqdomain.h | 62 struct fwnode_handle *fwnode; member 171 struct fwnode_handle *fwnode; member 226 return to_of_node(d->fwnode); in irq_domain_get_of_node() 257 void irq_domain_free_fwnode(struct fwnode_handle *fwnode); 290 return node ? &node->fwnode : NULL; in of_node_to_fwnode() 295 static inline bool is_fwnode_irqchip(struct fwnode_handle *fwnode) in is_fwnode_irqchip() argument 297 return fwnode && fwnode->ops == &irqchip_fwnode_ops; in is_fwnode_irqchip() 308 .fwnode = fwnode, in irq_find_matching_fwnode() 379 return __irq_domain_add(fwnode, size, size, 0, ops, host_data); in irq_domain_create_linear() 386 return __irq_domain_add(fwnode, 0, ~0, 0, ops, host_data); in irq_domain_create_tree() [all …]
|
A D | acpi.h | 47 #define ACPI_HANDLE_FWNODE(fwnode) \ argument 52 struct fwnode_handle *fwnode; in acpi_alloc_fwnode_static() local 55 if (!fwnode) in acpi_alloc_fwnode_static() 58 fwnode_init(fwnode, &acpi_static_fwnode_ops); in acpi_alloc_fwnode_static() 60 return fwnode; in acpi_alloc_fwnode_static() 65 if (WARN_ON(!is_acpi_static_node(fwnode))) in acpi_free_fwnode_static() 68 kfree(fwnode); in acpi_free_fwnode_static() 86 return is_acpi_device_node(dev->fwnode); in has_acpi_companion() 339 struct fwnode_handle *fwnode); 343 struct fwnode_handle *fwnode, [all …]
|
/linux/drivers/base/ |
A D | property.c | 522 if (!fwnode) in device_remove_properties() 550 if (IS_ERR(fwnode)) in device_add_properties() 633 fwnode = fwnode_get_next_parent(fwnode); in fwnode_get_next_parent_dev() 634 if (!fwnode) in fwnode_get_next_parent_dev() 682 fwnode = fwnode_get_next_parent(fwnode); in fwnode_get_nth_parent() 684 return fwnode; in fwnode_get_nth_parent() 740 if (!fwnode) in fwnode_get_next_available_child_node() 770 if (fwnode && !IS_ERR_OR_NULL(fwnode->secondary)) in device_get_next_child_node() 811 return fwnode; in fwnode_handle_get() 984 parent = fwnode; in fwnode_graph_get_next_endpoint() [all …]
|
A D | swnode.c | 18 struct fwnode_handle fwnode; member 41 return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &software_node_ops; in is_software_node() 58 if (!fwnode) in dev_to_swnode() 62 fwnode = fwnode->secondary; in dev_to_swnode() 64 return to_swnode(fwnode); in dev_to_swnode() 372 return &swnode->fwnode; in software_node_get() 486 return &child->fwnode; in software_node_get_named_child_node() 819 return &swnode->fwnode; in swnode_register() 996 if (IS_ERR(fwnode)) in fwnode_create_software_node() 999 return fwnode; in fwnode_create_software_node() [all …]
|
/linux/drivers/media/v4l2-core/ |
A D | v4l2-fwnode.c | 553 fwnode = fwnode_graph_get_remote_endpoint(fwnode); in v4l2_fwnode_parse_link() 554 if (!fwnode) { in v4l2_fwnode_parse_link() 638 if (!fwnode) in v4l2_fwnode_get_connector_type() 657 if (!fwnode) in v4l2_fwnode_connector_parse() 798 asd->match.fwnode = in v4l2_async_nf_fwnode_parse_endpoint() 866 fwnode, in v4l2_async_nf_parse_fwnode_endpoints() 1122 fwnode = fwnode_args.fwnode; in v4l2_fwnode_reference_get_int_prop() 1146 fwnode = child; in v4l2_fwnode_reference_get_int_prop() 1149 return fwnode; in v4l2_fwnode_reference_get_int_prop() 1198 if (IS_ERR(fwnode)) { in v4l2_fwnode_reference_parse_int_props() [all …]
|
A D | v4l2-async.c | 83 if (sd->fwnode == asd->match.fwnode) in match_fwnode() 91 sd->fwnode->secondary == asd->match.fwnode) in match_fwnode() 114 other_fwnode = asd->match.fwnode; in match_fwnode() 117 other_fwnode = sd->fwnode; in match_fwnode() 195 return asd_x->match.fwnode == asd_y->match.fwnode; in asd_equal() 644 asd->match.fwnode = fwnode_handle_get(fwnode); in __v4l2_async_nf_add_fwnode() 648 fwnode_handle_put(fwnode); in __v4l2_async_nf_add_fwnode() 715 if (!sd->fwnode && sd->dev) in v4l2_async_register_subdev() 807 struct fwnode_handle *devnode, *fwnode = asd->match.fwnode; in print_waiting_subdev() local 811 fwnode_handle_get(fwnode); in print_waiting_subdev() [all …]
|
/linux/drivers/hwtracing/coresight/ |
A D | coresight-cti-platform.c | 76 if (is_of_node(fwnode)) in cti_plat_get_cpu_at_node() 83 if (is_of_node(fwnode)) in cti_plat_get_node_name() 102 name = cti_plat_get_node_name(fwnode); in cti_plat_get_csdev_or_node_name() 109 if (is_of_node(fwnode)) in cti_plat_node_name_eq() 226 if (is_of_node(fwnode)) in cti_plat_check_v8_arch_compatible() 241 const struct fwnode_handle *fwnode, in cti_plat_read_trig_group() argument 315 const struct fwnode_handle *fwnode) in cti_plat_process_filter_sigs() argument 342 struct fwnode_handle *fwnode) in cti_plat_create_connection() argument 392 cpuid = cti_plat_get_cpu_at_node(fwnode); in cti_plat_create_connection() 422 if (IS_ERR_OR_NULL(fwnode)) in cti_plat_create_impdef_connections() [all …]
|
/linux/drivers/acpi/ |
A D | property.c | 99 &dn->fwnode)) in acpi_nondev_subnode_extract() 102 &dn->fwnode)) { in acpi_nondev_subnode_extract() 759 args->fwnode = ref_fwnode; in __acpi_node_get_property_reference() 1075 return &dn->fwnode; in acpi_get_next_subnode() 1090 if (is_acpi_data_node(fwnode)) { in acpi_node_get_parent() 1218 struct fwnode_handle *fwnode; in acpi_graph_get_remote_endpoint() local 1240 fwnode = args.fwnode; in acpi_graph_get_remote_endpoint() 1244 fwnode = acpi_graph_get_child_prop_value(fwnode, "port", port_nr); in acpi_graph_get_remote_endpoint() 1322 if (is_acpi_data_node(fwnode)) { in acpi_fwnode_get_name() 1367 endpoint->local_fwnode = fwnode; in acpi_fwnode_graph_parse_endpoint() [all …]
|
A D | irq.c | 61 fwspec.fwnode = acpi_gsi_domain_id; in acpi_register_gsi() 118 result = &device->fwnode; in acpi_get_irq_source_fwhandle() 154 if (!fwnode) in acpi_irq_parse_one_match() 158 ctx->fwspec->fwnode = fwnode; in acpi_irq_parse_one_match() 188 struct fwnode_handle *fwnode; in acpi_irq_parse_one_cb() local 197 fwnode = acpi_gsi_domain_id; in acpi_irq_parse_one_cb() 198 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], in acpi_irq_parse_one_cb() 210 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source); in acpi_irq_parse_one_cb() 294 struct fwnode_handle *fwnode) in acpi_set_irq_model() argument 297 acpi_gsi_domain_id = fwnode; in acpi_set_irq_model() [all …]
|
A D | viot.c | 32 struct fwnode_handle *fwnode; member 82 struct fwnode_handle *fwnode; in viot_get_pci_iommu_fwnode() local 91 fwnode = pdev->dev.fwnode; in viot_get_pci_iommu_fwnode() 92 if (!fwnode) { in viot_get_pci_iommu_fwnode() 97 fwnode = acpi_alloc_fwnode_static(); in viot_get_pci_iommu_fwnode() 98 if (!fwnode) { in viot_get_pci_iommu_fwnode() 102 set_primary_fwnode(&pdev->dev, fwnode); in viot_get_pci_iommu_fwnode() 104 viommu->fwnode = pdev->dev.fwnode; in viot_get_pci_iommu_fwnode() 124 viommu->fwnode = &adev->fwnode; in viot_get_mmio_iommu_fwnode() 297 if (viommu->fwnode == dev->fwnode) in viot_dev_iommu_init() [all …]
|
/linux/drivers/platform/x86/intel/int33fe/ |
A D | intel_cht_int33fe_typec.c | 157 struct fwnode_handle *fwnode; in cht_int33fe_setup_dp() local 161 if (!fwnode) in cht_int33fe_setup_dp() 178 data->dp->secondary = fwnode; in cht_int33fe_setup_dp() 248 struct fwnode_handle *fwnode; in cht_int33fe_register_max17047() local 252 if (!fwnode) in cht_int33fe_register_max17047() 269 board_info.fwnode = fwnode; in cht_int33fe_register_max17047() 279 struct fwnode_handle *fwnode; in cht_int33fe_typec_probe() local 323 if (!fwnode) { in cht_int33fe_typec_probe() 331 board_info.fwnode = fwnode; in cht_int33fe_typec_probe() 341 if (!fwnode) { in cht_int33fe_typec_probe() [all …]
|
/linux/drivers/usb/typec/ |
A D | mux.c | 20 static int switch_fwnode_match(struct device *dev, const void *fwnode) in switch_fwnode_match() argument 25 return dev_fwnode(dev) == fwnode; in switch_fwnode_match() 41 if (id && !fwnode_property_present(fwnode, id)) in typec_switch_match() 49 dev = class_find_device(&typec_mux_class, NULL, fwnode, in typec_switch_match() 130 sw->dev.fwnode = desc->fwnode; in typec_switch_register() 190 return dev_fwnode(dev) == fwnode; in mux_fwnode_match() 214 match = fwnode_property_present(fwnode, "accessory"); in typec_mux_match() 221 nval = fwnode_property_count_u16(fwnode, "svid"); in typec_mux_match() 229 ret = fwnode_property_read_u16_array(fwnode, "svid", val, nval); in typec_mux_match() 246 dev = class_find_device(&typec_mux_class, NULL, fwnode, in typec_mux_match() [all …]
|
A 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()
|
/linux/drivers/leds/ |
A D | leds-pwm.c | 62 struct led_pwm *led, struct fwnode_handle *fwnode) in led_pwm_add() argument 65 struct led_init_data init_data = { .fwnode = fwnode }; in led_pwm_add() 74 led_data->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); in led_pwm_add() 137 struct fwnode_handle *fwnode; in led_pwm_create_fwnode() local 143 device_for_each_child_node(dev, fwnode) { in led_pwm_create_fwnode() 145 if (ret && is_of_node(fwnode)) in led_pwm_create_fwnode() 146 led.name = to_of_node(fwnode)->name; in led_pwm_create_fwnode() 153 led.active_low = fwnode_property_read_bool(fwnode, in led_pwm_create_fwnode() 155 fwnode_property_read_u32(fwnode, "max-brightness", in led_pwm_create_fwnode() 160 ret = led_pwm_add(dev, priv, &led, fwnode); in led_pwm_create_fwnode() [all …]
|
A D | led-core.c | 323 struct fwnode_handle *fwnode = led_cdev->dev->fwnode; in led_get_default_pattern() local 327 count = fwnode_property_count_u32(fwnode, "led-pattern"); in led_get_default_pattern() 365 struct fwnode_handle *fwnode, in led_parse_fwnode_props() argument 370 if (!fwnode) in led_parse_fwnode_props() 373 if (fwnode_property_present(fwnode, "label")) { in led_parse_fwnode_props() 380 if (fwnode_property_present(fwnode, "color")) { in led_parse_fwnode_props() 391 if (!fwnode_property_present(fwnode, "function")) in led_parse_fwnode_props() 419 struct fwnode_handle *fwnode = init_data->fwnode; in led_compose_name() local 429 led_parse_fwnode_props(dev, fwnode, &props); in led_compose_name() 471 } else if (is_of_node(fwnode)) { in led_compose_name() [all …]
|
/linux/drivers/of/ |
A D | property.c | 867 of_node_put(to_of_node(fwnode)); in of_fwnode_put() 872 return of_device_is_available(to_of_node(fwnode)); in of_fwnode_device_is_available() 886 const struct device_node *node = to_of_node(fwnode); in of_fwnode_property_read_int_array() 920 return kbasename(to_of_node(fwnode)->full_name); in of_fwnode_get_name() 926 if (!to_of_node(fwnode)->parent) in of_fwnode_get_name_prefix() 982 args->fwnode = of_fwnode_handle(of_args.np); in of_fwnode_get_reference_args() 1002 of_graph_get_remote_endpoint(to_of_node(fwnode))); in of_fwnode_graph_get_remote_endpoint() 1011 np = of_get_parent(to_of_node(fwnode)); in of_fwnode_graph_get_port_parent() 1028 endpoint->local_fwnode = fwnode; in of_fwnode_graph_parse_endpoint() 1128 sup_dev = get_dev_from_fwnode(&sup_np->fwnode); in of_link_to_phandle() [all …]
|
/linux/drivers/irqchip/ |
A D | irq-gic-v2m.c | 64 struct fwnode_handle *fwnode; member 144 fwspec.fwnode = 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() 330 v2m->fwnode = fwnode; in gicv2m_init_one() 470 return data->fwnode; in gicv2m_get_fwnode() 500 struct fwnode_handle *fwnode; in acpi_parse_madt_msi() local 527 if (!fwnode) { in acpi_parse_madt_msi() [all …]
|
A D | irq-ixp4xx.c | 141 if (is_fwnode_irqchip(fwspec->fwnode)) { in ixp4xx_irq_domain_translate() 257 struct fwnode_handle *fwnode, in ixp4xx_irq_setup() argument 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() 373 struct fwnode_handle *fwnode; in ixp4xx_of_init_irq() local 382 fwnode = of_node_to_fwnode(np); in ixp4xx_of_init_irq() [all …]
|
A D | irq-gic-v4.c | 130 vpe->fwnode = irq_domain_alloc_named_id_fwnode(name, idx); in its_alloc_vcpu_sgis() 131 if (!vpe->fwnode) in its_alloc_vcpu_sgis() 153 if (vpe->fwnode) in its_alloc_vcpu_sgis() 154 irq_domain_free_fwnode(vpe->fwnode); in its_alloc_vcpu_sgis() 163 vm->fwnode = irq_domain_alloc_named_id_fwnode("GICv4-vpe", in its_alloc_vcpu_irqs() 165 if (!vm->fwnode) in its_alloc_vcpu_irqs() 169 vm->fwnode, vpe_domain_ops, in its_alloc_vcpu_irqs() 198 if (vm->fwnode) in its_alloc_vcpu_irqs() 199 irq_domain_free_fwnode(vm->fwnode); in its_alloc_vcpu_irqs() 219 irq_domain_free_fwnode(vm->vpes[i]->fwnode); in its_free_sgi_irqs() [all …]
|
/linux/kernel/irq/ |
A D | irqdomain.c | 47 struct irqchip_fwid *fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in irqchip_fwnode_get_name() 104 return &fwid->fwnode; in __irq_domain_alloc_fwnode() 120 fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in irq_domain_free_fwnode() 159 fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in __irq_domain_add() 164 domain->fwnode = fwnode; in __irq_domain_add() 173 domain->fwnode = fwnode; in __irq_domain_add() 177 } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || in __irq_domain_add() 195 domain->fwnode = fwnode; in __irq_domain_add() 200 if (fwnode) in __irq_domain_add() 406 struct fwnode_handle *fwnode = fwspec->fwnode; in irq_find_matching_fwspec() local [all …]
|
/linux/drivers/usb/roles/ |
A 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() 150 sw = usb_role_switch_is_parent(fwnode); in fwnode_usb_role_switch_get() 152 sw = fwnode_connection_find_match(fwnode, "usb-role-switch", in fwnode_usb_role_switch_get() 184 usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode) in usb_role_switch_find_by_fwnode() argument 188 if (!fwnode) in usb_role_switch_find_by_fwnode() 191 dev = class_find_device_by_fwnode(role_class, fwnode); in usb_role_switch_find_by_fwnode() [all …]
|
/linux/drivers/platform/surface/ |
A D | surface_gpe.c | 277 struct fwnode_handle *fwnode; in surface_gpe_init() local 290 fwnode = fwnode_create_software_node(match->driver_data, NULL); in surface_gpe_init() 291 if (IS_ERR(fwnode)) { in surface_gpe_init() 292 status = PTR_ERR(fwnode); in surface_gpe_init() 302 pdev->dev.fwnode = fwnode; in surface_gpe_init() 314 fwnode_remove_software_node(fwnode); in surface_gpe_init() 323 struct fwnode_handle *fwnode = surface_gpe_device->dev.fwnode; in surface_gpe_exit() local 327 fwnode_remove_software_node(fwnode); in surface_gpe_exit()
|
/linux/drivers/usb/typec/mux/ |
A D | intel_pmc_mux.c | 485 struct fwnode_handle *fwnode) in pmc_usb_register_port() argument 513 sw_desc.fwnode = fwnode; in pmc_usb_register_port() 515 sw_desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port() 522 mux_desc.fwnode = fwnode; in pmc_usb_register_port() 524 mux_desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port() 533 desc.fwnode = fwnode; in pmc_usb_register_port() 535 desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port() 619 struct fwnode_handle *fwnode = NULL; in pmc_usb_probe() local 657 fwnode = device_get_next_child_node(pmc->dev, fwnode); in pmc_usb_probe() 658 if (!fwnode) in pmc_usb_probe() [all …]
|