Linux CAN drivers development
 help / color / mirror / Atom feed
From: Stephane Grosjean <s.grosjean@peak-system.com>
To: "linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: About adding a new CAN-FD driver...
Date: Mon, 17 Oct 2016 11:42:02 +0200	[thread overview]
Message-ID: <d88756ae-0eb8-705d-e6a5-0e4532a8e28c@peak-system.com> (raw)

Hello,

We're planning to add a new driver under drivers/net/can that adds 
support to our PCAN-PCIe FD boards family.

Before pushing any patches, I would first discuss about how and where to 
do that: all of our CAN-FD products actually embed some FPGA running the 
same µCode, internally called "uCAN core". So I first think to create a 
new sub-dir "drivers/net/can/ucan".

But several months ago (Kernel v4.0), we already have pushed a driver 
for our USB CAN-FD adapters, so the new files have been obviously added 
under "driver/net/can/usb/peak_usb". Among these new files, 
"pcan_ucan.h" describes messages exchanged between host and uCAN core, 
whatever the PC interface is (USB, PCie...). So, I can imagine that the 
new driver for PCIe should include this file too, as well as some pieces 
of code present in "peak_usb_fd.c"...

ASFAI, #include "../usb/peak_usb/pcan_ucan.h" is not the proper way to 
do this, isn't it?

So, first of all, I would propose to push some patch(es) in order to 
make things cleaner:

1/ move file "pcan_ucan.h" from "drivers/net/can/usb/peak_usb" to the 
(newly created) "drivers/net/can/ucan"

2/ add the corresponding CFLAGS def into 
"drivers/net/can/usb/peak_usb/makefile":

+CFLAGS_pcan_usb_fd.o        += -Idrivers/net/can/ucan

is this the best approach, please?

Thanks for your help.

Stéphane


--
PEAK-System Technik GmbH
Sitz der Gesellschaft Darmstadt - HRB 9183 
Geschaeftsfuehrung: A.Gach, U.Wilhelm
--

             reply	other threads:[~2016-10-17  9:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-17  9:42 Stephane Grosjean [this message]
2016-10-18  7:15 ` About adding a new CAN-FD driver Oliver Hartkopp
2016-10-25  7:01   ` Stephane Grosjean
2016-10-25  8:44     ` Oliver Hartkopp
2016-11-17 10:22       ` Stephane Grosjean
2016-11-17 20:20         ` Oliver Hartkopp
2016-11-18  9:13           ` Stephane Grosjean

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=d88756ae-0eb8-705d-e6a5-0e4532a8e28c@peak-system.com \
    --to=s.grosjean@peak-system.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox