<div dir="ltr"><div><span style="font-family:arial,sans-serif;font-size:13px">Hi Chris,</span></div><div><span style="font-family:arial,sans-serif;font-size:13px"> probably you can do cat /proc/device-tree o/p to see if such a node exist in the device tree file.</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px">also you can check</span></div><div><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px">arch/ppc</span><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px">/boot/</span><span style="font-weight:bold;color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px">dts</span><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px">/ directory and check the .dts file to check if such an entry really exist in the .dts file which</span><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div><div><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px">you are using.</span></div><div><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px"><br></span></div>
<div><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px">Since in your case </span></div><div><span style="font-size:13px;font-family:arial,sans-serif"> np = of_find_compatible_node(NULL,</span><span style="font-size:13px;font-family:arial,sans-serif">NULL,</span><br style="font-size:13px;font-family:arial,sans-serif">
<span style="font-size:13px;font-family:arial,sans-serif">"xilinx,cpld-led");</span><span style="color:rgb(68,68,68);font-family:arial,sans-serif;line-height:16px"><br></span></div><div><span style="font-size:13px;font-family:arial,sans-serif">returns NULL, its a sign that the entry does not exist in the .dts file your system is using.</span></div>
<div><span style="font-size:13px;font-family:arial,sans-serif">thnaks,</span></div><div><span style="font-size:13px;font-family:arial,sans-serif">Vishwas S</span></div><span style="font-family:arial,sans-serif;font-size:13px"><div>
<span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px"><br>
</span></div>Hello out there,</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">I got a problem with the kernel function "of_find_compatible_node". I</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">use it with: np = of_find_compatible_node(NULL,</span><span style="font-family:arial,sans-serif;font-size:13px">NULL,</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">"xilinx,cpld-led"); or with np = of_find_compatible_node(NULL,</span><span style="font-family:arial,sans-serif;font-size:13px">NULL,</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">"cpld-led"); but none of this works, because I get a null-pointer back.</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">But it suppose to work? The target is a PPC-walnut-board.</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">Which is the mechanism behind this function, which namespace is parsed</span><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">in order to detect devices on the board? Can I parse the whole namespace</span><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">in order to list up all devices?</span><br style="font-family:arial,sans-serif;font-size:13px"><br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">What else can I do to solve this problem?</span><br style="font-family:arial,sans-serif;font-size:13px">
<br style="font-family:arial,sans-serif;font-size:13px"><span style="font-family:arial,sans-serif;font-size:13px">Thank you in advance...</span><br style="font-family:arial,sans-serif;font-size:13px"><br style="font-family:arial,sans-serif;font-size:13px">
<span style="font-family:arial,sans-serif;font-size:13px">Regards /chris</span><br style="font-family:arial,sans-serif;font-size:13px"></div>