of_parse_phandle in device_node

Nuno Sá noname.nuno at gmail.com
Mon Jul 29 05:20:29 EDT 2019


Hi guys,

So I'm working on a driver and on dt parsing i need to get a reference
to device_node using of_parse_phandle. I was trying to see if there is
any equivalent on the fwnode_* api's and i could find nothing...

I use 

device_for_each_child_node(dev, child) {
	...
}

and then some of my fwnode's need to reference some other ones. Now,
i'm using fwnode's api and using to_of_node() and of_fwnode_handle()
macros to use of_parse_phandle() but i don't really want to mix
device_node with of_node so if there's nothing i guess i will just go
with of_node api's.

So, my question,
Is there any equivalent to of_parse_phandle() in the device_node api's?



Note that i don't have any strong requirement to use device_node
instead of of_node but I now i just got curious...

Regards,
Nuno Sá




More information about the Kernelnewbies mailing list