linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Florian Feldbauer <florian@ep1.ruhr-uni-bochum.de>,
	linux-can@vger.kernel.org
Subject: Re: Writing socketCAN module for my own hardware
Date: Wed, 01 Oct 2014 14:41:43 +0200	[thread overview]
Message-ID: <542BF687.1000800@pengutronix.de> (raw)
In-Reply-To: <542BF456.3030201@ep1.ruhr-uni-bochum.de>

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

On 10/01/2014 02:32 PM, Florian Feldbauer wrote:
>> Do you get any interrupts?
> Seems not the case
> Sending doesn't work either...
> From a very quick look, it seems the GPIOs are not set...But to be sure
> I have to build a small adapter in order to properly connect our digital
> scope to it...

Let's see if there is actual output on the GPIO lines...

BTW: what's the use-case of the rpi, better buy a beagle bone black.
IIRC you need to attach the CAN phy, and you're ready to go. It comes
with two internal CAN cores, the first one is quite easy to setup, the
second one uses the same pins as one the the I2C busses, which has to be
disabled then... And you can use a proper mainline kernel.

>>> I'm working with the raspberry pi kernel
>>> (https://github.com/raspberrypi/linux)
>>> version 3.12.y commit c256eb9968c8997dce47350d2075e42f1b3991d3
>>>
>>> Source of my own kernel module is also on github
>>> https://github.com/ffeldbauer/epics_RPi_can/blob/ver3.0.0/CAN_interface/driver/sja1000_raspi.c
>>>
>>>
>>>
>>> As written before, I could not find a documentation of socketCAN and
>>> simply tried
>>> to "copy" the sja1000_isa.c driver...naybe I did something completely
>>> wrong or missed
>>> something?
>> Yes, making a copy of the driver is probably not the right thing....
>> BTW: where's are the original copyright notes?
> "Copy" in this case means: I looked into
> sja1000_isa.c/sja1000_platform.c to see what function have
> to be implemented and what parameters do they use.
> I copied the corresponding functions from my chardev driver and modified
> them
> accordingly....

IANAL, but it's best practice to state which parts of your driver is
based on the work of others.

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

  reply	other threads:[~2014-10-01 12:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-12  7:51 Writing socketCAN module for my own hardware Florian Feldbauer
2014-08-12  8:24 ` Marc Kleine-Budde
2014-08-12  8:57   ` Florian Feldbauer
2014-08-12 10:01     ` Marc Kleine-Budde
2014-10-01  7:26       ` Florian Feldbauer
2014-10-01  7:49         ` Marc Kleine-Budde
2014-10-01 12:32           ` Florian Feldbauer
2014-10-01 12:41             ` Marc Kleine-Budde [this message]
2014-10-01 12:56               ` Florian Feldbauer
2014-10-01 13:11                 ` Marc Kleine-Budde
2014-10-09 15:06               ` Florian Feldbauer
2014-10-09 16:13                 ` Marc Kleine-Budde
2014-10-10  7:43                   ` Florian Feldbauer
2014-10-10  8:06                     ` Marc Kleine-Budde
2014-10-10  8:09                       ` Florian Feldbauer

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=542BF687.1000800@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=florian@ep1.ruhr-uni-bochum.de \
    --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 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).