linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Tutorial or Read-me file for Linux can API
@ 2013-04-05  4:29 Katoch
  2013-04-05  6:00 ` Oliver Hartkopp
  0 siblings, 1 reply; 2+ messages in thread
From: Katoch @ 2013-04-05  4:29 UTC (permalink / raw)
  To: linux-can

Hi,

I am going through a can base network driver for MCP-2515
https://github.com/raspberrypi/linux/blob/rpi-3.6.y/drivers/net/can/mcp251x.c

Please suggest where i can find the description of the function, :--
alloc_candev
open_candev
alloc_can_skb
can_dropped_invalid_skb
alloc_can_err_skb
etc .....

Is there some read-me file or some tutorial ?

Please suggest.

//Katoch



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

* Re: Tutorial or Read-me file for Linux can API
  2013-04-05  4:29 Tutorial or Read-me file for Linux can API Katoch
@ 2013-04-05  6:00 ` Oliver Hartkopp
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Hartkopp @ 2013-04-05  6:00 UTC (permalink / raw)
  To: Katoch; +Cc: linux-can

On 05.04.2013 06:29, Katoch wrote:

> Hi,
> 
> I am going through a can base network driver for MCP-2515
> https://github.com/raspberrypi/linux/blob/rpi-3.6.y/drivers/net/can/mcp251x.c
> 
> Please suggest where i can find the description of the function, :--
> alloc_candev
> open_candev
> alloc_can_skb
> can_dropped_invalid_skb
> alloc_can_err_skb
> etc .....
> 


The mcp251x driver uses the Linux CAN driver infrastructure, e.g. to be able
to set bitrates and other settings with the ip tool from the iproute2 package.

See:

http://lxr.linux.no/#linux+v3.8.5/Documentation/networking/can.txt#L746

You can find the according header files and implementations in:

	linux/include/linux/can/dev.h

and

	linux/drivers/net/can/dev.c

Please take care that CONFIG_CAN_DEV and CONFIG_CAN_CALC_BITTIMING are enabled
in your Linux kernel configuration, see:

http://lxr.linux.no/#linux+v3.8.5/drivers/net/can/Kconfig#L33

Regards,
Oliver


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

end of thread, other threads:[~2013-04-05  6:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05  4:29 Tutorial or Read-me file for Linux can API Katoch
2013-04-05  6:00 ` Oliver Hartkopp

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).