On Sat, Feb 06, 2016 at 05:12:19PM -0500, Tarl Neustaedter wrote:
On 2016-Feb-6 17:02 , Alyssa Milburn wrote:
chosen = find_dev("/chosen");
push_str(buf);
fword("open-dev");
set_int_property(chosen, "interrupt-controller", POP());
/chosen won't have an "open" method, so the open-dev will fail. You probably don't need the open-dev anyway, you should be able to call set_int_property with the chosen phandle without doing an open on it. That is, delete the 3rd line of the above, it probably works.
I'm trying to open the openpic (at the path in 'buf'), but you're right, it doesn't have an open..!
I added these at a global scope:
DECLARE_UNNAMED_NODE( ob_openpic, INSTALL_OPEN, 0 ); NODE_METHODS(ob_openpic) = { };
And this after creating the device:
REGISTER_NODE_METHODS(ob_openpic, buf);
And it works now (I hope).
Thanks,
- Alyssa