structdevice_node*of_node;/* associated device tree node */ structacpi_dev_nodeacpi_node;/* associated ACPI device node */ dev_tdevt;/* dev_t, creates the sysfs "dev" */ u32 id;/* device instance */ spinlock_tdevres_lock; structlist_headdevres_head; structklist_nodeknode_class; s...
struct device_node *of_node; /* associated device tree node */ dev_t devt; /* dev_t, creates the sysfs "dev" */ u32 id; /* device instance */ spinlock_t devres_lock; struct list_head devres_head; struct klist_node knode_class; struct class *class; const struct attribute_group ...
* @of_node: Associated device tree node. * @fwnode: Associated device node supplied by platform firmware. * @devt: For creating the sysfs "dev". * @id: device instance * @devres_lock: Spinlock to protect the resource of the device. * @devres_head: The resources list of the device. ...
-> of_mdiobus_register// 注册mii_bus设备,并通过设备树子节点创建PHY设备 drivers/of/of_mdio.c of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) -> mdio->phy_mask = ~0;// 屏蔽所有PHY,防止自动探测。相反,设备树中列出的phy将在总线注册后填充 -> mdio->dev.of_node = np...
Linux Kernel设备驱动模型之 struct device_node,严格说,此数据结构不是设备模型中的,它是一个DTS中节点对应的内存中设备描述,一般
//从devicetree数据中populateplatform devices。 intof_platform_populate(structdevice_node *root, conststruct of_device_id *matches, conststruct of_dev_auxdata *lookup, structdevice *parent) { structdevice_node *child; intrc = 0; root= root ? of_node_get(root) : of_find_node_by_path("...
*/ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr) { struct rb_node *rb_node; struct vm_area_struct *vma; /* Check the cache first. */ vma = vmacache_find(mm, addr); if (likely(vma)) return vma; rb_node = mm->mm_rb.rb_node; while (rb_node)...
int (*resume)(struct device *dev); struct subsys_private *p; ... }; struct bus_type i2c_bus_type = { .name = "i2c", .match = i2c_device_match, .probe = i2c_device_probe, .remove = i2c_device_remove, .shutdown = i2c_device_shutdown, ...
//从devicetree数据中populateplatform devices。intof_platform_populate(structdevice_node *root,conststruct of_device_id *matches,conststruct of_dev_auxdata *lookup,structdevice *parent){ structdevice_node *child;intrc = 0;root= root ? of_node_get(root) : of_find_node_by_path("...
Expand DownExpand Up@@ -1601,7 +1583,6 @@ MODULE_DEVICE_TABLE(of, rk_pcie_of_match); staticconststructdw_pcie_opsdw_pcie_ops={ .start_link=rk_pcie_establish_link, .link_up=rk_pcie_link_up, }; staticintrk1808_pcie_fixup(structrk_pcie*rk_pcie,structdevice_node*np) ...