Home
last modified time | relevance | path

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

12345678910>>...15

/kernel/linux/linux-5.10/include/linux/
Dfwnode.h44 struct fwnode_handle *fwnode; member
111 struct fwnode_handle *(*get)(struct fwnode_handle *fwnode);
112 void (*put)(struct fwnode_handle *fwnode);
113 bool (*device_is_available)(const struct fwnode_handle *fwnode);
114 const void *(*device_get_match_data)(const struct fwnode_handle *fwnode,
116 bool (*property_present)(const struct fwnode_handle *fwnode,
118 int (*property_read_int_array)(const struct fwnode_handle *fwnode,
126 const char *(*get_name)(const struct fwnode_handle *fwnode);
127 const char *(*get_name_prefix)(const struct fwnode_handle *fwnode);
128 struct fwnode_handle *(*get_parent)(const struct fwnode_handle *fwnode);
[all …]
Dproperty.h52 bool fwnode_device_is_available(const struct fwnode_handle *fwnode);
53 bool fwnode_property_present(const struct fwnode_handle *fwnode,
55 int fwnode_property_read_u8_array(const struct fwnode_handle *fwnode,
58 int fwnode_property_read_u16_array(const struct fwnode_handle *fwnode,
61 int fwnode_property_read_u32_array(const struct fwnode_handle *fwnode,
64 int fwnode_property_read_u64_array(const struct fwnode_handle *fwnode,
67 int fwnode_property_read_string_array(const struct fwnode_handle *fwnode,
70 int fwnode_property_read_string(const struct fwnode_handle *fwnode,
72 int fwnode_property_match_string(const struct fwnode_handle *fwnode,
74 int fwnode_property_get_reference_args(const struct fwnode_handle *fwnode,
[all …]
Dirqdomain.h64 struct fwnode_handle *fwnode; member
171 struct fwnode_handle *fwnode; member
227 return to_of_node(d->fwnode); in irq_domain_get_of_node()
258 void irq_domain_free_fwnode(struct fwnode_handle *fwnode);
259 struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size,
285 return node ? &node->fwnode : NULL; in of_node_to_fwnode()
290 static inline bool is_fwnode_irqchip(struct fwnode_handle *fwnode) in is_fwnode_irqchip() argument
292 return fwnode && fwnode->ops == &irqchip_fwnode_ops; in is_fwnode_irqchip()
299 struct irq_domain *irq_find_matching_fwnode(struct fwnode_handle *fwnode, in irq_find_matching_fwnode() argument
303 .fwnode = fwnode, in irq_find_matching_fwnode()
[all …]
Dacpi.h43 #define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode)
47 #define ACPI_HANDLE_FWNODE(fwnode) \ argument
48 acpi_device_handle(to_acpi_device_node(fwnode))
52 struct fwnode_handle *fwnode; in acpi_alloc_fwnode_static() local
54 fwnode = kzalloc(sizeof(struct fwnode_handle), GFP_KERNEL); in acpi_alloc_fwnode_static()
55 if (!fwnode) in acpi_alloc_fwnode_static()
58 fwnode->ops = &acpi_static_fwnode_ops; in acpi_alloc_fwnode_static()
60 return fwnode; in acpi_alloc_fwnode_static()
63 static inline void acpi_free_fwnode_static(struct fwnode_handle *fwnode) in acpi_free_fwnode_static() argument
65 if (WARN_ON(!is_acpi_static_node(fwnode))) in acpi_free_fwnode_static()
[all …]
/kernel/linux/linux-5.10/drivers/base/
Dproperty.c24 &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 …]
Dswnode.c17 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; \
74 const struct software_node *to_software_node(const struct fwnode_handle *fwnode) in to_software_node() argument
76 const struct swnode *swnode = to_swnode(fwnode); in to_software_node()
86 return swnode ? &swnode->fwnode : NULL; in software_node_fwnode()
350 static struct fwnode_handle *software_node_get(struct fwnode_handle *fwnode) in software_node_get() argument
352 struct swnode *swnode = to_swnode(fwnode); in software_node_get()
356 return &swnode->fwnode; in software_node_get()
[all …]
/kernel/linux/linux-5.10/drivers/media/v4l2-core/
Dv4l2-fwnode.c129 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 …]
Dv4l2-async.c87 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 …]
/kernel/linux/linux-5.10/drivers/hwtracing/coresight/
Dcoresight-cti-platform.c74 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 …]
/kernel/linux/linux-5.10/drivers/acpi/
Dproperty.c79 dn->fwnode.ops = &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 …]
Dirq.c61 fwspec.fwnode = acpi_gsi_domain_id; in acpi_register_gsi()
114 result = &device->fwnode; in acpi_get_irq_source_fwhandle()
145 static inline void acpi_irq_parse_one_match(struct fwnode_handle *fwnode, in acpi_irq_parse_one_match() argument
150 if (!fwnode) in acpi_irq_parse_one_match()
154 ctx->fwspec->fwnode = fwnode; in acpi_irq_parse_one_match()
184 struct fwnode_handle *fwnode; in acpi_irq_parse_one_cb() local
193 fwnode = acpi_gsi_domain_id; in acpi_irq_parse_one_cb()
194 acpi_irq_parse_one_match(fwnode, irq->interrupts[ctx->index], in acpi_irq_parse_one_cb()
206 fwnode = acpi_get_irq_source_fwhandle(&eirq->resource_source); in acpi_irq_parse_one_cb()
207 acpi_irq_parse_one_match(fwnode, eirq->interrupts[ctx->index], in acpi_irq_parse_one_cb()
[all …]
/kernel/linux/linux-5.10/drivers/platform/x86/
Dintel_cht_int33fe_typec.c138 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 …]
/kernel/linux/linux-5.10/drivers/leds/
Dleds-pwm.c60 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 …]
Dled-core.c329 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 …]
Dleds-tps6105x.c15 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()
/kernel/linux/linux-5.10/drivers/usb/typec/
Dmux.c32 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 …]
Dqcom-pmic-typec.c133 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()
/kernel/linux/linux-5.10/drivers/of/
Dproperty.c841 static struct fwnode_handle *of_fwnode_get(struct fwnode_handle *fwnode) in of_fwnode_get() argument
843 return of_fwnode_handle(of_node_get(to_of_node(fwnode))); in of_fwnode_get()
846 static void of_fwnode_put(struct fwnode_handle *fwnode) in of_fwnode_put() argument
848 of_node_put(to_of_node(fwnode)); in of_fwnode_put()
851 static bool of_fwnode_device_is_available(const struct fwnode_handle *fwnode) in of_fwnode_device_is_available() argument
853 return of_device_is_available(to_of_node(fwnode)); in of_fwnode_device_is_available()
856 static bool of_fwnode_property_present(const struct fwnode_handle *fwnode, in of_fwnode_property_present() argument
859 return of_property_read_bool(to_of_node(fwnode), propname); in of_fwnode_property_present()
862 static int of_fwnode_property_read_int_array(const struct fwnode_handle *fwnode, in of_fwnode_property_read_int_array() argument
867 const struct device_node *node = to_of_node(fwnode); in of_fwnode_property_read_int_array()
[all …]
/kernel/linux/linux-5.10/drivers/irqchip/
Dirq-gic-v2m.c64 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 …]
Dirq-ixp4xx.c135 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 …]
Dirq-gic-v4.c107 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 …]
/kernel/linux/linux-5.10/drivers/usb/roles/
Dclass.c90 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 …]
/kernel/linux/linux-5.10/kernel/irq/
Dirqdomain.c31 struct fwnode_handle fwnode; member
94 fwid->fwnode.ops = &irqchip_fwnode_ops; in __irq_domain_alloc_fwnode()
95 return &fwid->fwnode; in __irq_domain_alloc_fwnode()
104 void irq_domain_free_fwnode(struct fwnode_handle *fwnode) in irq_domain_free_fwnode() argument
108 if (WARN_ON(!is_fwnode_irqchip(fwnode))) in irq_domain_free_fwnode()
111 fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in irq_domain_free_fwnode()
130 struct irq_domain *__irq_domain_add(struct fwnode_handle *fwnode, int size, in __irq_domain_add() argument
141 GFP_KERNEL, of_node_to_nid(to_of_node(fwnode))); in __irq_domain_add()
145 if (is_fwnode_irqchip(fwnode)) { in __irq_domain_add()
146 fwid = container_of(fwnode, struct irqchip_fwid, fwnode); in __irq_domain_add()
[all …]
/kernel/linux/linux-5.10/drivers/thunderbolt/
Dacpi.c18 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()
/kernel/linux/linux-5.10/drivers/usb/typec/mux/
Dintel_pmc_mux.c483 struct fwnode_handle *fwnode) in pmc_usb_register_port() argument
492 ret = fwnode_property_read_u8(fwnode, "usb2-port-number", &port->usb2_port); in pmc_usb_register_port()
496 ret = fwnode_property_read_u8(fwnode, "usb3-port-number", &port->usb3_port); in pmc_usb_register_port()
500 ret = fwnode_property_read_string(fwnode, "sbu-orientation", &str); in pmc_usb_register_port()
504 ret = fwnode_property_read_string(fwnode, "hsl-orientation", &str); in pmc_usb_register_port()
511 sw_desc.fwnode = fwnode; in pmc_usb_register_port()
513 sw_desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port()
520 mux_desc.fwnode = fwnode; in pmc_usb_register_port()
522 mux_desc.name = fwnode_get_name(fwnode); in pmc_usb_register_port()
531 desc.fwnode = fwnode; in pmc_usb_register_port()
[all …]

12345678910>>...15