kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* how CAN-bus Linux driver MCP251x.c works
@ 2011-01-14 14:23 cheng chen
  2011-01-14 15:28 ` Dave Hylands
  0 siblings, 1 reply; 5+ messages in thread
From: cheng chen @ 2011-01-14 14:23 UTC (permalink / raw)
  To: kernelnewbies

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
struct spi_driver  mcp2510_can_driver = {
    .driver = {...}
    .probe=
    ...
}
In probe function, it registers itself as a "net_device" with
"mcp251x_netdev_ops". So I am not sure how this system works.

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 "can.ko" -- the
protocol stack ?
Does the network stack talks to SPI and SPI talks to mcp2510 chip and
transmit messages can-bus? Or something else?

Thanks

-- 
Cheng(?)

My Page: http://freakrobot.blogbus.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110114/4ae80cd0/attachment.html 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-15  7:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-14 14:23 how CAN-bus Linux driver MCP251x.c works cheng chen
2011-01-14 15:28 ` Dave Hylands
2011-01-14 16:31   ` cheng chen
2011-01-14 19:26     ` Dave Hylands
2011-01-15  7:31       ` cheng chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).