linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@grandegger.com>
To: Dan Murphy <dmurphy@ti.com>, mkl@pengutronix.de, davem@davemloft.net
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] can: tcan4x5x: Add tcan4x5x driver to the kernel
Date: Wed, 26 Sep 2018 20:34:47 +0200	[thread overview]
Message-ID: <f7bde33a-894b-9b27-6475-d69aaf19df1a@grandegger.com> (raw)
In-Reply-To: <4c9396a4-4028-f013-b22b-a181ef4278c7@ti.com>

Hello Dan,

Am 26.09.2018 um 20:00 schrieb Dan Murphy:
> Wolfgang
> 
> On 09/26/2018 12:54 PM, Wolfgang Grandegger wrote:
>> Hello,
>>
>> I wonder why you do not extend the existing MCAN driver by implementing
>> an interface to access the hardware. Would that be feasible?
>>
> 
> That did cross my mind. The issue is I have no way of testing the existing
> driver to make sure I did not break anything.

Yes, I can imagine, but we should try to avoid duplicated code in the
first place. I personally do not have a MCAN device at hand either, but
we should be able to manage that.

> My thought was to create a basic MCAN framework and attach the devices to it.
> So, like in this case, if there is a special way to talk to the device it can 
> be handled in the device driver.

Basically, that's what I have in mind. The "mcan" driver uses it's own
directory with just one file in it. Maybe the idea behind that was to
extend it sooner than later like the "c_can" driver.

> If thats what is needed then I will have to re-write the driver.

Let's have a closer look first. If it's just about accessing one
register at a time, like with memory mapped io, the interface should be
trivial but with SPI we may want to read/write a bulk of data to speed
up the register accesses, use a work queue or thread, etc.

Wolfgang

  reply	other threads:[~2018-09-26 18:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-10 20:12 [PATCH 1/2] dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver Dan Murphy
2018-09-10 20:12 ` [PATCH 2/2] can: tcan4x5x: Add tcan4x5x driver to the kernel Dan Murphy
2018-09-26 17:40   ` Dan Murphy
2018-09-26 17:54     ` Wolfgang Grandegger
2018-09-26 18:00       ` Dan Murphy
2018-09-26 18:34         ` Wolfgang Grandegger [this message]
2018-10-04 20:26       ` Dan Murphy
2018-10-05  5:56         ` Wolfgang Grandegger
2018-10-05 11:45           ` Dan Murphy
2018-09-26 17:40 ` [PATCH 1/2] dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver Dan Murphy

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=f7bde33a-894b-9b27-6475-d69aaf19df1a@grandegger.com \
    --to=wg@grandegger.com \
    --cc=davem@davemloft.net \
    --cc=dmurphy@ti.com \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@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).