/linux-6.3-rc2/include/linux/ |
A D | fwnode.h | 93 struct fwnode_handle *fwnode; member 170 (!IS_ERR_OR_NULL(fwnode) && (fwnode)->ops && (fwnode)->ops->op) 174 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : (IS_ERR_OR_NULL(fwnode) ? -EINVAL : -ENXIO)) 177 (fwnode_has_op(fwnode, op) ? \ 178 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : false) 181 (fwnode_has_op(fwnode, op) ? \ 182 (fwnode)->ops->op(fwnode, ## __VA_ARGS__) : NULL) 186 (fwnode)->ops->op(fwnode, ## __VA_ARGS__); \ 188 #define get_dev_from_fwnode(fwnode) get_device((fwnode)->dev) argument 193 fwnode->ops = ops; in fwnode_init() [all …]
|
A D | property.h | 104 #define fwnode_for_each_parent_node(fwnode, parent) \ argument 105 for (parent = fwnode_get_parent(fwnode); parent; \ 118 #define fwnode_for_each_child_node(fwnode, child) \ argument 120 child = fwnode_get_next_child_node(fwnode, child)) 139 void fwnode_handle_put(struct fwnode_handle *fwnode); 205 return fwnode_property_present(fwnode, propname); in fwnode_property_read_bool() 399 int fwnode_get_phy_mode(struct fwnode_handle *fwnode); 408 const struct fwnode_handle *fwnode); 410 const struct fwnode_handle *fwnode); 412 const struct fwnode_handle *fwnode); [all …]
|
A D | irqdomain.h | 64 struct fwnode_handle *fwnode; member 161 struct fwnode_handle *fwnode; member 221 return to_of_node(d->fwnode); in irq_domain_get_of_node() 259 void irq_domain_free_fwnode(struct fwnode_handle *fwnode); 291 return node ? &node->fwnode : NULL; in of_node_to_fwnode() 296 static inline bool is_fwnode_irqchip(struct fwnode_handle *fwnode) in is_fwnode_irqchip() argument 298 return fwnode && fwnode->ops == &irqchip_fwnode_ops; in is_fwnode_irqchip() 309 .fwnode = fwnode, in irq_find_matching_fwnode() 380 return __irq_domain_add(fwnode, size, size, 0, ops, host_data); in irq_domain_create_linear() 387 return __irq_domain_add(fwnode, 0, ~0, 0, ops, host_data); in irq_domain_create_tree() [all …]
|
/linux-6.3-rc2/drivers/base/ |
A D | property.c | 57 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_present() 259 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_int_array() 414 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_string_array() 526 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_get_reference_args() 618 fwnode_handle_put(fwnode); in fwnode_get_next_parent() 749 if (IS_ERR_OR_NULL(fwnode)) in fwnode_get_next_available_child_node() 773 if (IS_ERR_OR_NULL(fwnode)) in device_get_next_child_node() 820 return fwnode; in fwnode_handle_get() 1012 parent = fwnode; in fwnode_graph_get_next_endpoint() 1306 if (!fwnode || !match) in fwnode_connection_find_match() [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() 935 if (IS_ERR(fwnode)) in fwnode_create_software_node() 938 return fwnode; in fwnode_create_software_node() [all …]
|
/linux-6.3-rc2/drivers/media/v4l2-core/ |
A D | v4l2-fwnode.c | 572 fwnode = fwnode_graph_get_remote_endpoint(fwnode); in v4l2_fwnode_parse_link() 573 if (!fwnode) { in v4l2_fwnode_parse_link() 657 if (!fwnode) in v4l2_fwnode_get_connector_type() 676 if (!fwnode) in v4l2_fwnode_connector_parse() 817 asd->match.fwnode = in v4l2_async_nf_fwnode_parse_endpoint() 885 fwnode, in v4l2_async_nf_parse_fwnode_endpoints() 1129 fwnode = fwnode_args.fwnode; in v4l2_fwnode_reference_get_int_prop() 1153 fwnode = child; in v4l2_fwnode_reference_get_int_prop() 1156 return fwnode; in v4l2_fwnode_reference_get_int_prop() 1205 if (IS_ERR(fwnode)) { in v4l2_fwnode_reference_parse_int_props() [all …]
|
/linux-6.3-rc2/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-6.3-rc2/drivers/acpi/ |
A D | property.c | 104 &dn->fwnode)) in acpi_nondev_subnode_extract() 107 &dn->fwnode)) { in acpi_nondev_subnode_extract() 710 if (is_acpi_data_node(fwnode)) { in acpi_device_data_of_node() 836 args->fwnode = ref_fwnode; in acpi_get_ref_args() 1252 return &dn->fwnode; in acpi_get_next_subnode() 1267 if (is_acpi_data_node(fwnode)) { in acpi_node_get_parent() 1397 struct fwnode_handle *fwnode; in acpi_graph_get_remote_endpoint() local 1419 fwnode = args.fwnode; in acpi_graph_get_remote_endpoint() 1423 fwnode = acpi_graph_get_child_prop_value(fwnode, "port", port_nr); in acpi_graph_get_remote_endpoint() 1519 if (is_acpi_data_node(fwnode)) { in acpi_fwnode_get_name() [all …]
|
A D | irq.c | 61 fwspec.fwnode = acpi_get_gsi_domain_id(gsi); in acpi_register_gsi() 62 if (WARN_ON(!fwspec.fwnode)) { in acpi_register_gsi() 126 result = &device->fwnode; in acpi_get_irq_source_fwhandle() 164 if (!fwnode) in acpi_irq_parse_one_match() 168 ctx->fwspec->fwnode = fwnode; in acpi_irq_parse_one_match() 198 struct fwnode_handle *fwnode; in acpi_irq_parse_one_cb() local 207 fwnode = acpi_get_gsi_domain_id(irq->interrupts[ctx->index]); in acpi_irq_parse_one_cb() 208 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], in acpi_irq_parse_one_cb() 220 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source, in acpi_irq_parse_one_cb() 222 acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index], in acpi_irq_parse_one_cb() [all …]
|
A D | viot.c | 31 struct fwnode_handle *fwnode; member 81 struct fwnode_handle *fwnode; in viot_get_pci_iommu_fwnode() local 90 fwnode = dev_fwnode(&pdev->dev); in viot_get_pci_iommu_fwnode() 91 if (!fwnode) { in viot_get_pci_iommu_fwnode() 96 fwnode = acpi_alloc_fwnode_static(); in viot_get_pci_iommu_fwnode() 97 if (!fwnode) { in viot_get_pci_iommu_fwnode() 101 set_primary_fwnode(&pdev->dev, fwnode); in viot_get_pci_iommu_fwnode() 103 viommu->fwnode = dev_fwnode(&pdev->dev); in viot_get_pci_iommu_fwnode() 123 viommu->fwnode = &adev->fwnode; in viot_get_mmio_iommu_fwnode() 316 if (device_match_fwnode(dev, viommu->fwnode)) in viot_dev_iommu_init() [all …]
|
/linux-6.3-rc2/drivers/gpio/ |
A D | gpiolib-swnode.c | 38 static struct gpio_chip *swnode_get_chip(struct fwnode_handle *fwnode) in swnode_get_chip() argument 43 chip_node = to_software_node(fwnode); in swnode_get_chip() 51 struct gpio_desc *swnode_find_gpio(struct fwnode_handle *fwnode, in swnode_find_gpio() argument 62 swnode = to_software_node(fwnode); in swnode_find_gpio() 75 __func__, propname, fwnode, idx); in swnode_find_gpio() 79 chip = swnode_get_chip(args.fwnode); in swnode_find_gpio() 80 fwnode_handle_put(args.fwnode); in swnode_find_gpio() 88 __func__, propname, fwnode, idx, PTR_ERR_OR_ZERO(desc)); in swnode_find_gpio() 103 int swnode_gpio_count(const struct fwnode_handle *fwnode, const char *con_id) in swnode_gpio_count() argument 116 while (fwnode_property_get_reference_args(fwnode, propname, NULL, 0, in swnode_gpio_count() [all …]
|
/linux-6.3-rc2/drivers/platform/x86/intel/ |
A D | chtwc_int33fe.c | 163 struct fwnode_handle *fwnode; in cht_int33fe_setup_dp() local 167 if (!fwnode) in cht_int33fe_setup_dp() 184 data->dp->secondary = fwnode; in cht_int33fe_setup_dp() 254 struct fwnode_handle *fwnode; in cht_int33fe_register_max17047() local 258 if (!fwnode) in cht_int33fe_register_max17047() 275 board_info.fwnode = fwnode; in cht_int33fe_register_max17047() 307 struct fwnode_handle *fwnode; in cht_int33fe_typec_probe() local 358 if (!fwnode) { in cht_int33fe_typec_probe() 366 board_info.fwnode = fwnode; in cht_int33fe_typec_probe() 376 if (!fwnode) { in cht_int33fe_typec_probe() [all …]
|
/linux-6.3-rc2/drivers/platform/chrome/ |
A D | cros_typec_switch.c | 176 struct fwnode_handle *fwnode) in cros_typec_register_mode_switch() argument 179 .fwnode = fwnode, in cros_typec_register_mode_switch() 181 .name = fwnode_get_name(fwnode), in cros_typec_register_mode_switch() 193 .fwnode = fwnode, in cros_typec_register_retimer() 195 .name = fwnode_get_name(fwnode), in cros_typec_register_retimer() 208 struct fwnode_handle *fwnode; in cros_typec_register_switches() local 219 device_for_each_child_node(dev, fwnode) { in cros_typec_register_switches() 226 adev = to_acpi_device_node(fwnode); in cros_typec_register_switches() 235 dev_err(fwnode->dev, "_ADR wasn't evaluated\n"); in cros_typec_register_switches() 250 ret = cros_typec_register_retimer(port, fwnode); in cros_typec_register_switches() [all …]
|
/linux-6.3-rc2/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 141 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-6.3-rc2/drivers/of/ |
A D | property.c | 871 of_node_put(to_of_node(fwnode)); in of_fwnode_put() 876 return of_device_is_available(to_of_node(fwnode)); in of_fwnode_device_is_available() 887 if (of_dma_is_coherent(to_of_node(fwnode))) in of_fwnode_device_get_dma_attr() 938 return kbasename(to_of_node(fwnode)->full_name); in of_fwnode_get_name() 944 if (!to_of_node(fwnode)->parent) in of_fwnode_get_name_prefix() 1002 args->fwnode = of_fwnode_handle(of_args.np); in of_fwnode_get_reference_args() 1031 np = of_get_parent(to_of_node(fwnode)); in of_fwnode_graph_get_port_parent() 1048 endpoint->local_fwnode = fwnode; in of_fwnode_graph_parse_endpoint() 1418 return of_iomap(to_of_node(fwnode), index); in of_fwnode_iomap() 1427 return of_irq_get(to_of_node(fwnode), index); in of_fwnode_irq_get() [all …]
|
/linux-6.3-rc2/drivers/usb/typec/ |
A D | mux.c | 32 return device_match_fwnode(dev, fwnode); in switch_fwnode_match() 35 static void *typec_switch_match(const struct fwnode_handle *fwnode, in typec_switch_match() argument 48 if (id && !fwnode_property_present(fwnode, id)) in typec_switch_match() 56 dev = class_find_device(&typec_mux_class, NULL, fwnode, in typec_switch_match() 182 sw_dev->dev.fwnode = desc->fwnode; in typec_switch_register() 262 return device_match_fwnode(dev, fwnode); in mux_fwnode_match() 289 match = fwnode_property_present(fwnode, "accessory") || in typec_mux_match() 290 fwnode_property_present(fwnode, id); in typec_mux_match() 297 nval = fwnode_property_count_u16(fwnode, "svid"); in typec_mux_match() 322 dev = class_find_device(&typec_mux_class, NULL, fwnode, in typec_mux_match() [all …]
|
A D | retimer.c | 20 static int retimer_fwnode_match(struct device *dev, const void *fwnode) in retimer_fwnode_match() argument 22 return is_typec_retimer(dev) && device_match_fwnode(dev, fwnode); in retimer_fwnode_match() 25 static void *typec_retimer_match(const struct fwnode_handle *fwnode, const char *id, void *data) in typec_retimer_match() argument 29 if (id && !fwnode_property_present(fwnode, id)) in typec_retimer_match() 32 dev = class_find_device(&retimer_class, NULL, fwnode, in typec_retimer_match() 47 struct typec_retimer *fwnode_typec_retimer_get(struct fwnode_handle *fwnode) in fwnode_typec_retimer_get() argument 51 retimer = fwnode_connection_find_match(fwnode, "retimer-switch", NULL, typec_retimer_match); in fwnode_typec_retimer_get() 121 retimer->dev.fwnode = desc->fwnode; in typec_retimer_register()
|
/linux-6.3-rc2/drivers/irqchip/ |
A D | irq-gic-v2m.c | 65 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() 329 v2m->fwnode = fwnode; in gicv2m_init_one() 469 return data->fwnode; in gicv2m_get_fwnode() 499 struct fwnode_handle *fwnode; in acpi_parse_madt_msi() local 526 if (!fwnode) { in acpi_parse_madt_msi() [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() 151 if (vpe->fwnode) in its_alloc_vcpu_sgis() 152 irq_domain_free_fwnode(vpe->fwnode); in its_alloc_vcpu_sgis() 161 vm->fwnode = irq_domain_alloc_named_id_fwnode("GICv4-vpe", in its_alloc_vcpu_irqs() 163 if (!vm->fwnode) in its_alloc_vcpu_irqs() 167 vm->fwnode, vpe_domain_ops, in its_alloc_vcpu_irqs() 195 if (vm->fwnode) in its_alloc_vcpu_irqs() 196 irq_domain_free_fwnode(vm->fwnode); in its_alloc_vcpu_irqs() 216 irq_domain_free_fwnode(vm->vpes[i]->fwnode); in its_free_sgi_irqs() [all …]
|
/linux-6.3-rc2/kernel/irq/ |
A D | irqdomain.c | 107 return &fwid->fwnode; in __irq_domain_alloc_fwnode() 120 if (!fwnode || WARN_ON(!is_fwnode_irqchip(fwnode))) in irq_domain_free_fwnode() 123 fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in irq_domain_free_fwnode() 152 fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in __irq_domain_create() 157 domain->fwnode = fwnode; in __irq_domain_create() 166 domain->fwnode = fwnode; in __irq_domain_create() 170 } else if (is_of_node(fwnode) || is_acpi_device_node(fwnode) || in __irq_domain_create() 188 domain->fwnode = fwnode; in __irq_domain_create() 193 if (fwnode) in __irq_domain_create() 439 struct fwnode_handle *fwnode = fwspec->fwnode; in irq_find_matching_fwspec() local [all …]
|
/linux-6.3-rc2/drivers/acpi/arm64/ |
A D | apmt.c | 74 struct fwnode_handle *fwnode) in apmt_add_platform_device() argument 100 pdev->dev.fwnode = fwnode; in apmt_add_platform_device() 119 struct fwnode_handle *fwnode; in apmt_init_platform_devices() local 135 fwnode = acpi_alloc_fwnode_static(); in apmt_init_platform_devices() 136 if (!fwnode) in apmt_init_platform_devices() 139 ret = apmt_add_platform_device(apmt_node, fwnode); in apmt_init_platform_devices() 141 acpi_free_fwnode_static(fwnode); in apmt_init_platform_devices()
|
/linux-6.3-rc2/drivers/usb/roles/ |
A D | class.c | 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() 194 dev = class_find_device_by_fwnode(role_class, fwnode); in usb_role_switch_find_by_fwnode() [all …]
|
/linux-6.3-rc2/drivers/leds/rgb/ |
A D | leds-pwm-multicolor.c | 69 struct fwnode_handle *fwnode; in iterate_subleds() local 75 fwnode_for_each_child_node(mcnode, fwnode) { in iterate_subleds() 77 pwmled->pwm = devm_fwnode_pwm_get(dev, fwnode, NULL); in iterate_subleds() 83 pwmled->active_low = fwnode_property_read_bool(fwnode, "active-low"); in iterate_subleds() 85 ret = fwnode_property_read_u32(fwnode, "color", &color); in iterate_subleds() 98 fwnode_handle_put(fwnode); in iterate_subleds() 104 struct fwnode_handle *mcnode, *fwnode; in led_pwm_mc_probe() local 118 fwnode_for_each_child_node(mcnode, fwnode) in led_pwm_mc_probe() 147 init_data.fwnode = mcnode; in led_pwm_mc_probe()
|
/linux-6.3-rc2/drivers/platform/surface/ |
A D | surface_gpe.c | 297 struct fwnode_handle *fwnode; in surface_gpe_init() local 310 fwnode = fwnode_create_software_node(match->driver_data, NULL); in surface_gpe_init() 311 if (IS_ERR(fwnode)) { in surface_gpe_init() 312 status = PTR_ERR(fwnode); in surface_gpe_init() 322 pdev->dev.fwnode = fwnode; in surface_gpe_init() 334 fwnode_remove_software_node(fwnode); in surface_gpe_init() 343 struct fwnode_handle *fwnode = surface_gpe_device->dev.fwnode; in surface_gpe_exit() local 347 fwnode_remove_software_node(fwnode); in surface_gpe_exit()
|