Home
last modified time | relevance | path

Searched refs:fwnode (Results 1 – 25 of 551) sorted by relevance

12345678910>>...23

/openbmc/linux/include/linux/
H A Dfwnode.h93 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 …]
H A Dproperty.h115 #define fwnode_for_each_parent_node(fwnode, parent) \ argument
116 for (parent = fwnode_get_parent(fwnode); parent; \
129 #define fwnode_for_each_child_node(fwnode, child) \ argument
131 child = fwnode_get_next_child_node(fwnode, child))
150 void fwnode_handle_put(struct fwnode_handle *fwnode);
216 return fwnode_property_present(fwnode, propname); in fwnode_property_read_bool()
419 const struct fwnode_handle *fwnode);
421 const struct fwnode_handle *fwnode);
423 const struct fwnode_handle *fwnode);
450 #define fwnode_graph_for_each_endpoint(fwnode, child) \ argument
[all …]
H A Dirqdomain.h64 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 …]
/openbmc/linux/drivers/base/
H A Dproperty.c61 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_present()
263 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_int_array()
418 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_read_string_array()
530 if (IS_ERR_OR_NULL(fwnode)) in fwnode_property_get_reference_args()
632 fwnode_handle_put(fwnode); in fwnode_get_next_parent()
772 if (IS_ERR_OR_NULL(fwnode)) in fwnode_get_next_available_child_node()
800 if (IS_ERR_OR_NULL(fwnode)) in device_get_next_child_node()
856 return fwnode; in fwnode_handle_get()
1061 parent = fwnode; in fwnode_graph_get_next_endpoint()
1367 if (!fwnode || !match) in fwnode_connection_find_match()
[all …]
H A Dswnode.c18 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()
822 return &swnode->fwnode; in swnode_register()
938 if (IS_ERR(fwnode)) in fwnode_create_software_node()
941 return fwnode; in fwnode_create_software_node()
[all …]
/openbmc/linux/drivers/media/v4l2-core/
H A Dv4l2-fwnode.c574 fwnode = fwnode_graph_get_remote_endpoint(fwnode); in v4l2_fwnode_parse_link()
575 if (!fwnode) in v4l2_fwnode_parse_link()
588 fwnode_handle_put(fwnode); in v4l2_fwnode_parse_link()
667 if (!fwnode) in v4l2_fwnode_get_connector_type()
686 if (!fwnode) in v4l2_fwnode_connector_parse()
1042 fwnode = fwnode_args.fwnode; in v4l2_fwnode_reference_get_int_prop()
1066 fwnode = child; in v4l2_fwnode_reference_get_int_prop()
1069 return fwnode; in v4l2_fwnode_reference_get_int_prop()
1118 if (IS_ERR(fwnode)) { in v4l2_fwnode_reference_parse_int_props()
1126 return PTR_ERR(fwnode); in v4l2_fwnode_reference_parse_int_props()
[all …]
H A Dv4l2-async.c102 sd_fwnode, match->fwnode); in match_fwnode_one()
104 if (sd_fwnode == match->fwnode) { in match_fwnode_one()
142 match->fwnode); in match_fwnode()
222 return match1->fwnode == match2->fwnode; in v4l2_async_match_equal()
355 asc->match.fwnode, ret); in v4l2_async_match_notify()
371 asc->match.fwnode, ret); in v4l2_async_match_notify()
711 asc->match.fwnode = fwnode_handle_get(fwnode); in __v4l2_async_nf_add_fwnode()
771 ase->endpoint = fwnode; in v4l2_async_subdev_endpoint_add()
807 if (!sd->fwnode && sd->dev) { in v4l2_async_register_subdev()
902 struct fwnode_handle *devnode, *fwnode = match->fwnode; in print_waiting_match() local
[all …]
/openbmc/linux/drivers/hwtracing/coresight/
H A Dcoresight-cti-platform.c76 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 …]
/openbmc/linux/drivers/acpi/
H A Dproperty.c104 &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()
1245 return &dn->fwnode; in acpi_get_next_subnode()
1260 if (is_acpi_data_node(fwnode)) { in acpi_node_get_parent()
1390 struct fwnode_handle *fwnode; in acpi_graph_get_remote_endpoint() local
1412 fwnode = args.fwnode; in acpi_graph_get_remote_endpoint()
1416 fwnode = acpi_graph_get_child_prop_value(fwnode, "port", port_nr); in acpi_graph_get_remote_endpoint()
1512 if (is_acpi_data_node(fwnode)) { in acpi_fwnode_get_name()
[all …]
H A Dirq.c62 fwspec.fwnode = acpi_get_gsi_domain_id(gsi); in acpi_register_gsi()
63 if (WARN_ON(!fwspec.fwnode)) { in acpi_register_gsi()
131 result = &device->fwnode; in acpi_get_irq_source_fwhandle()
169 if (!fwnode) in acpi_irq_parse_one_match()
173 ctx->fwspec->fwnode = fwnode; in acpi_irq_parse_one_match()
203 struct fwnode_handle *fwnode; in acpi_irq_parse_one_cb() local
212 fwnode = acpi_get_gsi_domain_id(irq->interrupts[ctx->index]); in acpi_irq_parse_one_cb()
213 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], in acpi_irq_parse_one_cb()
225 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source, in acpi_irq_parse_one_cb()
227 acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index], in acpi_irq_parse_one_cb()
[all …]
/openbmc/linux/drivers/gpio/
H A Dgpiolib-swnode.c39 static struct gpio_chip *swnode_get_chip(struct fwnode_handle *fwnode) in swnode_get_chip() argument
44 chip_node = to_software_node(fwnode); in swnode_get_chip()
52 struct gpio_desc *swnode_find_gpio(struct fwnode_handle *fwnode, in swnode_find_gpio() argument
63 swnode = to_software_node(fwnode); in swnode_find_gpio()
76 __func__, propname, fwnode, idx); in swnode_find_gpio()
80 chip = swnode_get_chip(args.fwnode); in swnode_find_gpio()
81 fwnode_handle_put(args.fwnode); in swnode_find_gpio()
89 __func__, propname, fwnode, idx, PTR_ERR_OR_ZERO(desc)); in swnode_find_gpio()
104 int swnode_gpio_count(const struct fwnode_handle *fwnode, const char *con_id) in swnode_gpio_count() argument
117 while (fwnode_property_get_reference_args(fwnode, propname, NULL, 0, in swnode_gpio_count()
[all …]
/openbmc/linux/drivers/platform/x86/intel/
H A Dchtwc_int33fe.c163 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 …]
/openbmc/linux/drivers/platform/chrome/
H A Dcros_typec_switch.c181 struct fwnode_handle *fwnode) in cros_typec_register_mode_switch() argument
184 .fwnode = fwnode, in cros_typec_register_mode_switch()
186 .name = fwnode_get_name(fwnode), in cros_typec_register_mode_switch()
198 .fwnode = fwnode, in cros_typec_register_retimer()
200 .name = fwnode_get_name(fwnode), in cros_typec_register_retimer()
213 struct fwnode_handle *fwnode; in cros_typec_register_switches() local
224 device_for_each_child_node(dev, fwnode) { in cros_typec_register_switches()
231 adev = to_acpi_device_node(fwnode); in cros_typec_register_switches()
240 dev_err(fwnode->dev, "_ADR wasn't evaluated\n"); in cros_typec_register_switches()
255 ret = cros_typec_register_retimer(port, fwnode); in cros_typec_register_switches()
[all …]
/openbmc/u-boot/drivers/net/fm/
H A Dfdt.c19 int rc, fmnode, fwnode = -1; in fdt_fixup_fman_firmware() local
80 fwnode = fdt_add_subnode(blob, fmnode, "fman-firmware"); in fdt_fixup_fman_firmware()
81 if (fwnode < 0) { in fdt_fixup_fman_firmware()
85 fdt_strerror(fwnode)); in fdt_fixup_fman_firmware()
88 rc = fdt_setprop_string(blob, fwnode, "compatible", in fdt_fixup_fman_firmware()
92 fdt_get_path(blob, fwnode, s, sizeof(s)); in fdt_fixup_fman_firmware()
97 phandle = fdt_create_phandle(blob, fwnode); in fdt_fixup_fman_firmware()
100 fdt_get_path(blob, fwnode, s, sizeof(s)); in fdt_fixup_fman_firmware()
105 rc = fdt_setprop(blob, fwnode, "fsl,firmware", fmanfw, length); in fdt_fixup_fman_firmware()
108 fdt_get_path(blob, fwnode, s, sizeof(s)); in fdt_fixup_fman_firmware()
/openbmc/linux/drivers/leds/
H A Dleds-pwm.c62 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 …]
H A Dled-core.c378 struct fwnode_handle *fwnode = led_cdev->dev->fwnode; in led_get_default_pattern() local
382 count = fwnode_property_count_u32(fwnode, "led-pattern"); in led_get_default_pattern()
420 struct fwnode_handle *fwnode, in led_parse_fwnode_props() argument
425 if (!fwnode) in led_parse_fwnode_props()
428 if (fwnode_property_present(fwnode, "label")) { in led_parse_fwnode_props()
435 if (fwnode_property_present(fwnode, "color")) { in led_parse_fwnode_props()
446 if (!fwnode_property_present(fwnode, "function")) in led_parse_fwnode_props()
474 struct fwnode_handle *fwnode = init_data->fwnode; in led_compose_name() local
480 led_parse_fwnode_props(dev, fwnode, &props); in led_compose_name()
522 } else if (is_of_node(fwnode)) { in led_compose_name()
[all …]
/openbmc/linux/drivers/of/
H A Dproperty.c873 of_node_put(to_of_node(fwnode)); in of_fwnode_put()
878 return of_device_is_available(to_of_node(fwnode)); in of_fwnode_device_is_available()
889 if (of_dma_is_coherent(to_of_node(fwnode))) in of_fwnode_device_get_dma_attr()
940 return kbasename(to_of_node(fwnode)->full_name); in of_fwnode_get_name()
946 if (!to_of_node(fwnode)->parent) in of_fwnode_get_name_prefix()
1004 args->fwnode = of_fwnode_handle(of_args.np); in of_fwnode_get_reference_args()
1033 np = of_get_parent(to_of_node(fwnode)); in of_fwnode_graph_get_port_parent()
1050 endpoint->local_fwnode = fwnode; in of_fwnode_graph_parse_endpoint()
1405 return of_iomap(to_of_node(fwnode), index); in of_fwnode_iomap()
1414 return of_irq_get(to_of_node(fwnode), index); in of_fwnode_irq_get()
[all …]
/openbmc/linux/drivers/usb/typec/
H A Dretimer.c20 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()
H A Dmux.c27 static int switch_fwnode_match(struct device *dev, const void *fwnode) in switch_fwnode_match() argument
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()
278 if (id && !fwnode_property_present(fwnode, id)) in typec_mux_match()
281 dev = class_find_device(&typec_mux_class, NULL, fwnode, in typec_mux_match()
308 count = fwnode_connection_find_matches(fwnode, "mode-switch", in fwnode_typec_mux_get()
[all …]
/openbmc/linux/drivers/irqchip/
H A Dirq-gic-v2m.c65 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 …]
H A Dirq-gic-v4.c130 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 …]
/openbmc/linux/kernel/irq/
H A Dirqdomain.c107 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()
186 domain->fwnode = fwnode; in __irq_domain_create()
191 if (fwnode) in __irq_domain_create()
437 struct fwnode_handle *fwnode = fwspec->fwnode; in irq_find_matching_fwspec() local
[all …]
/openbmc/linux/drivers/acpi/arm64/
H A Dapmt.c76 struct fwnode_handle *fwnode) in apmt_add_platform_device() argument
102 pdev->dev.fwnode = fwnode; in apmt_add_platform_device()
121 struct fwnode_handle *fwnode; in apmt_init_platform_devices() local
137 fwnode = acpi_alloc_fwnode_static(); in apmt_init_platform_devices()
138 if (!fwnode) in apmt_init_platform_devices()
141 ret = apmt_add_platform_device(apmt_node, fwnode); in apmt_init_platform_devices()
143 acpi_free_fwnode_static(fwnode); in apmt_init_platform_devices()
/openbmc/linux/drivers/leds/rgb/
H A Dleds-pwm-multicolor.c69 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()
/openbmc/linux/drivers/usb/roles/
H A Dclass.c102 if (id && !fwnode_property_present(fwnode, id)) in usb_role_switch_match()
105 dev = class_find_device_by_fwnode(&role_class, fwnode); in usb_role_switch_match()
111 usb_role_switch_is_parent(struct fwnode_handle *fwnode) in usb_role_switch_is_parent() argument
113 struct fwnode_handle *parent = fwnode_get_parent(fwnode); in usb_role_switch_is_parent()
156 struct usb_role_switch *fwnode_usb_role_switch_get(struct fwnode_handle *fwnode) in fwnode_usb_role_switch_get() argument
160 sw = usb_role_switch_is_parent(fwnode); in fwnode_usb_role_switch_get()
162 sw = fwnode_connection_find_match(fwnode, "usb-role-switch", in fwnode_usb_role_switch_get()
194 usb_role_switch_find_by_fwnode(const struct fwnode_handle *fwnode) in usb_role_switch_find_by_fwnode() argument
199 if (!fwnode) in usb_role_switch_find_by_fwnode()
202 dev = class_find_device_by_fwnode(&role_class, fwnode); in usb_role_switch_find_by_fwnode()
[all …]

12345678910>>...23