From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Katoch <din.gulu.er@gmail.com>
Cc: linux-can@vger.kernel.org
Subject: Re: Tutorial or Read-me file for Linux can API
Date: Fri, 05 Apr 2013 08:00:34 +0200 [thread overview]
Message-ID: <515E6882.7070807@hartkopp.net> (raw)
In-Reply-To: <loom.20130405T062502-943@post.gmane.org>
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
prev parent reply other threads:[~2013-04-05 6:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 4:29 Tutorial or Read-me file for Linux can API Katoch
2013-04-05 6:00 ` Oliver Hartkopp [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=515E6882.7070807@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=din.gulu.er@gmail.com \
--cc=linux-can@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.