From: Stefano Babic <sbabic@denx.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>,
Stefano Babic <sbabic@denx.de>,
linux-can@vger.kernel.org
Cc: Marc Kleine-Budde <mkl@pengutronix.de>,
Wolfgang Grandegger <wg@grandegger.com>
Subject: Re: [PATCH v1 2/3] CAN: CAN driver to support multiple CAN bus on SPI interface
Date: Sun, 23 Mar 2014 13:01:31 +0100 [thread overview]
Message-ID: <532ECD1B.5010500@denx.de> (raw)
In-Reply-To: <532CB238.9000909@hartkopp.net>
Hi Oliver,
On 21/03/2014 22:42, Oliver Hartkopp wrote:
> Hello Stephano,
>
> I definitely like this driver as it implements a full featured CAN netdev over
> SPI with all the SocketCAN specific configuration stuff :-)
>
Thanks !
> First some general comments:
>
> There's a mixup of the driver name:
>
> spican
> spi_can
> #define DRV_NAME "imxhcscan"
>
>> drivers/net/can/Kconfig | 11 +
>> drivers/net/can/Makefile | 1 +
>> drivers/net/can/spi_can.c | 1533 +++++++++++++++++++++++++++++++++++
>> include/linux/can/platform/spican.h | 36 +
>
> I would first suggest to create a new directory
>
> linux/drivers/net/can/spi
Understood - I'll do for V2.
>
> and move the mcp251x there (including the Kconfig stuff which is only entered
> when SPI is enabled similar to the CAN USB adapter configs).
>
> As the driver and it's communication concept is not very specific for the
> hcs12 or imx35 (or should no be very specific) I would tend to name it
>
> spi_can
>
> and rename the 'hcs12' or 'imx' named functions to something more generic,
> e.g. spi_slave, spi_can or something better.
Right.
>
> Maybe when there is really imx35 or hcs12 specific stuff to handle, this
> should be made clear, e.g. with a imx_spi_can driver which uses the spi_can
> driver?!?
There is nothing really specific to these two processors. I will check
all names to be consistent.
>
> And then there has to be a Kconfig option which depends on IMX35/ARM.
>
>
>> +#ifndef __CAN_PLATFORM_SPICAN_H__
>> +#define __CAN_PLATFORM_SPICAN_H__
>> +
>> +#include <linux/spi/spi.h>
>> +
>> +/*
>> + * struct hcs12_imx_platform_data - i.MX to HCS12 CAN controller platform data
>> + */
>> +
>> +struct hcs12_imx_platform_data {
>> + unsigned int can_channels;
>> + unsigned int gpio;
>> + unsigned int active;
>> + unsigned int slow_freq;
>> +};
>> +
>> +#endif
>>
>
> Is this really i.MX or HCS12 specific??
It is neither i.MX35 nor HCS12 specific. I will drop both names in next
version.
Thanks for reviewing,
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic@denx.de
=====================================================================
next prev parent reply other threads:[~2014-03-23 12:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 12:25 [PATCH v1 0/3] Adding support for CAN busses via SPI interface Stefano Babic
2014-03-21 12:25 ` [PATCH v1 1/3] Add documentation for SPI to CAN driver Stefano Babic
2014-11-24 10:50 ` Nicola
2014-03-21 12:25 ` [PATCH v1 2/3] CAN: CAN driver to support multiple CAN bus on SPI interface Stefano Babic
2014-03-21 21:42 ` Oliver Hartkopp
2014-03-23 12:01 ` Stefano Babic [this message]
2014-03-21 12:25 ` [PATCH v1 3/3] Introduce can_get_echo_skb_ni() when TX is not in interrupt Stefano Babic
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=532ECD1B.5010500@denx.de \
--to=sbabic@denx.de \
--cc=linux-can@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=socketcan@hartkopp.net \
--cc=wg@grandegger.com \
/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).