lkml.org 
[lkml]   [2018]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 2/2] can: tcan4x5x: Add tcan4x5x driver to the kernel
From
Date
Hello Dan,

Am 04.10.2018 um 22:26 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?
>>
>
> I have created a m_can_core code base that can be used by other hardware that
> have special needs.
>
> So I have created the m_can_core, m_can and the tcan4x5x drivers.

Great, I still think it's a good idea to have just one "m_can" driver.

> I can RFC the code to see if this is what is expected.
> It is not 100% working but it is close enough for a directional call.

That would be nice! Most of the SPI accesses are pure register accesses.
A few read/write more bytes at a time (for data, etc.) but that could be
handled by appropriate interface functions. One general problem is that
SPI accesses are not possible from interrupt context requiring threads
or work queues. Also NAPI is usually not used.

Other opinions?

Wolfgang.

PS: I have added Mario to the CC. Maybe he could test a common driver on
his M_CAN hardware.

\
 
 \ /
  Last update: 2018-10-05 07:57    [W:0.512 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site