of_property_read_bool入参:const struct device_node *np是一个设备树节点指针 const char *propname如此:设备树是否存在的属性 property 的 name,字符串 of_find_property之前了解过,就是单链表的方式遍历,查找是否存在 property /** * of_property_read_bool - Find a property * @np: device node from wh...
of_property_read_bool示例 `of_property_read_bool`是Linux内核中用于读取设备树中属性的函数,通常用于在设备树中查找和读取布尔类型的属性。这个函数的原型如下:```cintof_property_read_bool(conststructdevice_node*np,constchar*propname);```它接受两个参数:1.`np`:指向设备树节点(devicenode)的指针,...
nop->reset_active_low =true;/* default behaviour */if(dev->of_node) {structdevice_node*node=dev->of_node;enumof_gpio_flags flags =0;if(of_property_read_u32(node,"clock-frequency", &clk_rate)) clk_rate =0; needs_vcc =of_property_read_bool(node,"vcc-supply"); nop->gpio_reset...
Name:_property_read_bool - Find a property*@np: device node from which the property value is to be read.*@propname: name of the property to be searched.* Search for a property in a device node.* Returns true if the property exists false otherwise. Proto:static inline bool of_property...
bool ro_cap_invert, ro_gpio_invert = false; @@ -445,12 +445,12 @@ int mmc_of_parse(struct mmc_host *host) */ /* Parse Card Detection */ - if (of_find_property(np, "non-removable", &len)) { + if (of_property_read_bool(np, "non-removable")) { ...
Use more compact of_property_read_bool() calls instead of the of_find_property() calls. Signed-off-by: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> Thanks, applied for next! Thanks to you! :-) Next, time please run checkpatch to remove errors/warnings. ...
Use more compact of_property_read_bool() calls instead of the of_find_property() calls. Signed-off-by: Sergei Shtylyov <sergei.shtyl...@cogentembedded.com> Thanks, applied for next! Thanks to you! :-) Next, time please run checkpatch to remove errors/warnings. ...