I am studying CAN-bus chip Linux driver, MCP251x.c in the kernel source. However, I find a little confused about how this driver works, it registers itself as a SPI slave device using the structure<div>struct spi_driver  mcp2510_can_driver = {</div>
<div>    .driver = {...}</div><div>    .probe=</div><div>    ...<br><div><div>}</div><div>In probe function, it registers itself as a &quot;net_device&quot; with &quot;mcp251x_netdev_ops&quot;. So I am not sure how this system works.</div>
<div><br></div><div>I know that the userspace must see it as a network driver. But can userspace really see this driver? Or what it can see is the module &quot;can.ko&quot; -- the protocol stack ?</div><div>Does the network stack talks to SPI and SPI talks to mcp2510 chip and transmit messages can-bus? Or something else?</div>
<div><br></div><div>Thanks<br clear="all"><br>-- <br>Cheng(誠)<br><div><br></div><div>My Page: <a href="http://freakrobot.blogbus.com/" target="_blank">http://freakrobot.blogbus.com/</a></div><br>
</div></div></div>