how CAN-bus Linux driver MCP251x.c works

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux