<div dir="ltr"><div dir="ltr"><div><div><div><div><div><div><div><span style="font-family:courier new,monospace">Hi all,<br><br></span></div><span style="font-family:courier new,monospace">Facing some issues while passing the <b>irq</b> property in child node of SPI node.<br></span></div><span style="font-family:courier new,monospace">I
was trying to enable the SPI based mcp2515 can controller, according to
the documentation available in the bindings of mcp251x driver, added
the required properties of the node.<br></span></div><span style="font-family:courier new,monospace">As
per the requirement need to pass an irq of a GPIO, used
'interrupt-parent' and 'interrupts' properties in the child node
(mcp251x can node).<br></span></div><span style="font-family:courier new,monospace">I had a doubt, how exactly the interrupts property was parsed and taken in the mcp251x driver?<br></span></div><span style="font-family:courier new,monospace">In driver the <b>spi->irq</b> holds the irq number, in non dt kernels we are passing the irq value directly from platform data.<br></span></div><span style="font-family:courier new,monospace">How can we pass the <b>irq</b> property required by mcp251x driver from the device tree node?<br><br><a href="http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt" target="_blank">http://lxr.free-electrons.com/source/Documentation/devicetree/bindings/net/can/microchip,mcp251x.txt</a><br><a href="http://lxr.free-electrons.com/source/drivers/net/can/mcp251x.c?v=2.6.33" target="_blank">http://lxr.free-electrons.com/source/drivers/net/can/mcp251x.c?v=2.6.33</a><br></span></div><div><span style="font-family:courier new,monospace"><br></span></div><span style="font-family:courier new,monospace">spi dt node:<br></span><span style="font-family:courier new,monospace"><br></span><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="font-family:courier new,monospace"> &dspi1 {<br> status = "okay";<br> spi-max-frequency = <25000000>;<br><br> can2: can@1 {<br> compatible = "microchip,mcp2515";<br> reg = <0>;<br> clocks = <&clk16m>;<br> interrupt-parent = <&gpio2>;<br> interrupts = <43 0x8>;<br> spi-max-frequency = <10000000>;<br> };<br> };</span></blockquote><br><br clear="all"><div><span style="font-family:courier new,monospace"><span><font color="#888888">Best Regards,<br></font></span></span></div><span style="font-family:courier new,monospace"><span><font color="#888888">Bhuvanchandara DV</font></span></span></div></div>