mbox series

[RFC,0/3] M_CAN Framework rework

Message ID 20181010142055.25271-1-dmurphy@ti.com
Headers show
Series M_CAN Framework rework | expand

Message

Dan Murphy Oct. 10, 2018, 2:20 p.m. UTC
All

This patch series creates a m_can core framework that devices can register
to.  The m_can core manages the Bosch IP and CAN frames.  Each device that
is registered is responsible for managing device specific functions.

This rewrite was suggested in a device driver submission for the TCAN4x5x
device
Reference upstream post:
https://lore.kernel.org/patchwork/patch/984163/

For instance the TCAN device is a SPI device that uses a specific data payload to
determine writes and reads.  In addition the device has a reset input as well
as a wakeup pin.  The register offset of the m_can registers differs and must
be set by the device attached to the core.

The m_can core will use iomapped writes and reads as the default mechanism for
writing and reading.  The device driver can provide over rides for this.

This patch series is not complete as it does not handle the CAN interrupts
nor can perform a CAN write.  If this patch series is deemed acceptable I will
finish debugging the driver and post a non RFC series.

Finally I did attempt to reduce the first patch with various git format patch
directives but none seemed to reduce the patch.

Dan

Dan Murphy (3):
  can: m_can: Create m_can core to leverage common code
  dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver
  can: tcan4x5x: Add tcan4x5x driver to the kernel

 .../devicetree/bindings/net/can/tcan4x5x.txt  |   34 +
 drivers/net/can/m_can/Kconfig                 |   18 +
 drivers/net/can/m_can/Makefile                |    4 +-
 drivers/net/can/m_can/m_can.c                 | 1683 +----------------
 .../net/can/m_can/{m_can.c => m_can_core.c}   |  479 +++--
 drivers/net/can/m_can/m_can_core.h            |  100 +
 drivers/net/can/m_can/tcan4x5x.c              |  321 ++++
 7 files changed, 722 insertions(+), 1917 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt
 copy drivers/net/can/m_can/{m_can.c => m_can_core.c} (83%)
 create mode 100644 drivers/net/can/m_can/m_can_core.h
 create mode 100644 drivers/net/can/m_can/tcan4x5x.c

-- 
2.19.0

Comments

Dan Murphy Oct. 17, 2018, 8:21 p.m. UTC | #1
Bump

On 10/10/2018 09:20 AM, Dan Murphy wrote:
> All

> 

> This patch series creates a m_can core framework that devices can register

> to.  The m_can core manages the Bosch IP and CAN frames.  Each device that

> is registered is responsible for managing device specific functions.

> 

> This rewrite was suggested in a device driver submission for the TCAN4x5x

> device

> Reference upstream post:

> https://lore.kernel.org/patchwork/patch/984163/

> 

> For instance the TCAN device is a SPI device that uses a specific data payload to

> determine writes and reads.  In addition the device has a reset input as well

> as a wakeup pin.  The register offset of the m_can registers differs and must

> be set by the device attached to the core.

> 

> The m_can core will use iomapped writes and reads as the default mechanism for

> writing and reading.  The device driver can provide over rides for this.

> 

> This patch series is not complete as it does not handle the CAN interrupts

> nor can perform a CAN write.  If this patch series is deemed acceptable I will

> finish debugging the driver and post a non RFC series.

> 

> Finally I did attempt to reduce the first patch with various git format patch

> directives but none seemed to reduce the patch.

> 

> Dan

> 

> Dan Murphy (3):

>   can: m_can: Create m_can core to leverage common code

>   dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver

>   can: tcan4x5x: Add tcan4x5x driver to the kernel

> 

>  .../devicetree/bindings/net/can/tcan4x5x.txt  |   34 +

>  drivers/net/can/m_can/Kconfig                 |   18 +

>  drivers/net/can/m_can/Makefile                |    4 +-

>  drivers/net/can/m_can/m_can.c                 | 1683 +----------------

>  .../net/can/m_can/{m_can.c => m_can_core.c}   |  479 +++--

>  drivers/net/can/m_can/m_can_core.h            |  100 +

>  drivers/net/can/m_can/tcan4x5x.c              |  321 ++++

>  7 files changed, 722 insertions(+), 1917 deletions(-)

>  create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt

>  copy drivers/net/can/m_can/{m_can.c => m_can_core.c} (83%)

>  create mode 100644 drivers/net/can/m_can/m_can_core.h

>  create mode 100644 drivers/net/can/m_can/tcan4x5x.c

> 



-- 
------------------
Dan Murphy
Faiz Abbas Oct. 24, 2018, 7:33 a.m. UTC | #2
Hi Dan,

On Thursday 18 October 2018 01:51 AM, Dan Murphy wrote:
> Bump

> 

> On 10/10/2018 09:20 AM, Dan Murphy wrote:

>> All

>>

>> This patch series creates a m_can core framework that devices can register

>> to.  The m_can core manages the Bosch IP and CAN frames.  Each device that

>> is registered is responsible for managing device specific functions.

>>

>> This rewrite was suggested in a device driver submission for the TCAN4x5x

>> device

>> Reference upstream post:

>> https://lore.kernel.org/patchwork/patch/984163/

>>

>> For instance the TCAN device is a SPI device that uses a specific data payload to

>> determine writes and reads.  In addition the device has a reset input as well

>> as a wakeup pin.  The register offset of the m_can registers differs and must

>> be set by the device attached to the core.

>>

>> The m_can core will use iomapped writes and reads as the default mechanism for

>> writing and reading.  The device driver can provide over rides for this.

>>

>> This patch series is not complete as it does not handle the CAN interrupts

>> nor can perform a CAN write.  If this patch series is deemed acceptable I will

>> finish debugging the driver and post a non RFC series.

>>

>> Finally I did attempt to reduce the first patch with various git format patch

>> directives but none seemed to reduce the patch.

>>

>> Dan

>>

>> Dan Murphy (3):

>>   can: m_can: Create m_can core to leverage common code

>>   dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver

>>   can: tcan4x5x: Add tcan4x5x driver to the kernel

>>

>>  .../devicetree/bindings/net/can/tcan4x5x.txt  |   34 +

>>  drivers/net/can/m_can/Kconfig                 |   18 +

>>  drivers/net/can/m_can/Makefile                |    4 +-

>>  drivers/net/can/m_can/m_can.c                 | 1683 +----------------

>>  .../net/can/m_can/{m_can.c => m_can_core.c}   |  479 +++--

>>  drivers/net/can/m_can/m_can_core.h            |  100 +

>>  drivers/net/can/m_can/tcan4x5x.c              |  321 ++++

>>  7 files changed, 722 insertions(+), 1917 deletions(-)

>>  create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt

>>  copy drivers/net/can/m_can/{m_can.c => m_can_core.c} (83%)

>>  create mode 100644 drivers/net/can/m_can/m_can_core.h

>>  create mode 100644 drivers/net/can/m_can/tcan4x5x.c

>>


Patch 1/3 never arrived for me. Its not there on lkml either.
https://lkml.org/lkml/2018/10/10/611

Can you resend the complete series?

Thanks,
Faiz
Wolfgang Grandegger Oct. 24, 2018, 7:43 a.m. UTC | #3
Hallo Dan,

I will have a closer look later this week. Unfortunately you already
renamed file names and structs making the patch almost unreadable. More
soon..

Thanks for you patience,

Wolfgang.

Am 17.10.2018 um 22:21 schrieb Dan Murphy:
> Bump

> 

> On 10/10/2018 09:20 AM, Dan Murphy wrote:

>> All

>>

>> This patch series creates a m_can core framework that devices can register

>> to.  The m_can core manages the Bosch IP and CAN frames.  Each device that

>> is registered is responsible for managing device specific functions.

>>

>> This rewrite was suggested in a device driver submission for the TCAN4x5x

>> device

>> Reference upstream post:

>> https://lore.kernel.org/patchwork/patch/984163/

>>

>> For instance the TCAN device is a SPI device that uses a specific data payload to

>> determine writes and reads.  In addition the device has a reset input as well

>> as a wakeup pin.  The register offset of the m_can registers differs and must

>> be set by the device attached to the core.

>>

>> The m_can core will use iomapped writes and reads as the default mechanism for

>> writing and reading.  The device driver can provide over rides for this.

>>

>> This patch series is not complete as it does not handle the CAN interrupts

>> nor can perform a CAN write.  If this patch series is deemed acceptable I will

>> finish debugging the driver and post a non RFC series.

>>

>> Finally I did attempt to reduce the first patch with various git format patch

>> directives but none seemed to reduce the patch.

>>

>> Dan

>>

>> Dan Murphy (3):

>>   can: m_can: Create m_can core to leverage common code

>>   dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver

>>   can: tcan4x5x: Add tcan4x5x driver to the kernel

>>

>>  .../devicetree/bindings/net/can/tcan4x5x.txt  |   34 +

>>  drivers/net/can/m_can/Kconfig                 |   18 +

>>  drivers/net/can/m_can/Makefile                |    4 +-

>>  drivers/net/can/m_can/m_can.c                 | 1683 +----------------

>>  .../net/can/m_can/{m_can.c => m_can_core.c}   |  479 +++--

>>  drivers/net/can/m_can/m_can_core.h            |  100 +

>>  drivers/net/can/m_can/tcan4x5x.c              |  321 ++++

>>  7 files changed, 722 insertions(+), 1917 deletions(-)

>>  create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt

>>  copy drivers/net/can/m_can/{m_can.c => m_can_core.c} (83%)

>>  create mode 100644 drivers/net/can/m_can/m_can_core.h

>>  create mode 100644 drivers/net/can/m_can/tcan4x5x.c

>>

> 

>
Dan Murphy Oct. 24, 2018, 11:36 a.m. UTC | #4
Wolfgang

On 10/24/2018 02:43 AM, Wolfgang Grandegger wrote:
> Hallo Dan,

> 

> I will have a closer look later this week. Unfortunately you already

> renamed file names and structs making the patch almost unreadable. More

> soon..

> 


I tried to format the patch to eliminate the massive change but format patch kept 
giving me the same result.

It is a massive change regardless not sure how else to make is smaller.

I guess this is why I opt'd to just create the dedicated TCAN driver.

Dan


> Thanks for you patience,

> 

> Wolfgang.

> 

> Am 17.10.2018 um 22:21 schrieb Dan Murphy:

>> Bump

>>

>> On 10/10/2018 09:20 AM, Dan Murphy wrote:

>>> All

>>>

>>> This patch series creates a m_can core framework that devices can register

>>> to.  The m_can core manages the Bosch IP and CAN frames.  Each device that

>>> is registered is responsible for managing device specific functions.

>>>

>>> This rewrite was suggested in a device driver submission for the TCAN4x5x

>>> device

>>> Reference upstream post:

>>> https://lore.kernel.org/patchwork/patch/984163/

>>>

>>> For instance the TCAN device is a SPI device that uses a specific data payload to

>>> determine writes and reads.  In addition the device has a reset input as well

>>> as a wakeup pin.  The register offset of the m_can registers differs and must

>>> be set by the device attached to the core.

>>>

>>> The m_can core will use iomapped writes and reads as the default mechanism for

>>> writing and reading.  The device driver can provide over rides for this.

>>>

>>> This patch series is not complete as it does not handle the CAN interrupts

>>> nor can perform a CAN write.  If this patch series is deemed acceptable I will

>>> finish debugging the driver and post a non RFC series.

>>>

>>> Finally I did attempt to reduce the first patch with various git format patch

>>> directives but none seemed to reduce the patch.

>>>

>>> Dan

>>>

>>> Dan Murphy (3):

>>>   can: m_can: Create m_can core to leverage common code

>>>   dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver

>>>   can: tcan4x5x: Add tcan4x5x driver to the kernel

>>>

>>>  .../devicetree/bindings/net/can/tcan4x5x.txt  |   34 +

>>>  drivers/net/can/m_can/Kconfig                 |   18 +

>>>  drivers/net/can/m_can/Makefile                |    4 +-

>>>  drivers/net/can/m_can/m_can.c                 | 1683 +----------------

>>>  .../net/can/m_can/{m_can.c => m_can_core.c}   |  479 +++--

>>>  drivers/net/can/m_can/m_can_core.h            |  100 +

>>>  drivers/net/can/m_can/tcan4x5x.c              |  321 ++++

>>>  7 files changed, 722 insertions(+), 1917 deletions(-)

>>>  create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt

>>>  copy drivers/net/can/m_can/{m_can.c => m_can_core.c} (83%)

>>>  create mode 100644 drivers/net/can/m_can/m_can_core.h

>>>  create mode 100644 drivers/net/can/m_can/tcan4x5x.c

>>>

>>

>>



-- 
------------------
Dan Murphy
Dan Murphy Oct. 24, 2018, 11:39 a.m. UTC | #5
On 10/24/2018 02:33 AM, Faiz Abbas wrote:
> Hi Dan,

> 

> On Thursday 18 October 2018 01:51 AM, Dan Murphy wrote:

>> Bump

>>

>> On 10/10/2018 09:20 AM, Dan Murphy wrote:

>>> All

>>>

>>> This patch series creates a m_can core framework that devices can register

>>> to.  The m_can core manages the Bosch IP and CAN frames.  Each device that

>>> is registered is responsible for managing device specific functions.

>>>

>>> This rewrite was suggested in a device driver submission for the TCAN4x5x

>>> device

>>> Reference upstream post:

>>> https://lore.kernel.org/patchwork/patch/984163/

>>>

>>> For instance the TCAN device is a SPI device that uses a specific data payload to

>>> determine writes and reads.  In addition the device has a reset input as well

>>> as a wakeup pin.  The register offset of the m_can registers differs and must

>>> be set by the device attached to the core.

>>>

>>> The m_can core will use iomapped writes and reads as the default mechanism for

>>> writing and reading.  The device driver can provide over rides for this.

>>>

>>> This patch series is not complete as it does not handle the CAN interrupts

>>> nor can perform a CAN write.  If this patch series is deemed acceptable I will

>>> finish debugging the driver and post a non RFC series.

>>>

>>> Finally I did attempt to reduce the first patch with various git format patch

>>> directives but none seemed to reduce the patch.

>>>

>>> Dan

>>>

>>> Dan Murphy (3):

>>>   can: m_can: Create m_can core to leverage common code

>>>   dt-bindings: can: tcan4x5x: Add DT bindings for TCAN4x5X driver

>>>   can: tcan4x5x: Add tcan4x5x driver to the kernel

>>>

>>>  .../devicetree/bindings/net/can/tcan4x5x.txt  |   34 +

>>>  drivers/net/can/m_can/Kconfig                 |   18 +

>>>  drivers/net/can/m_can/Makefile                |    4 +-

>>>  drivers/net/can/m_can/m_can.c                 | 1683 +----------------

>>>  .../net/can/m_can/{m_can.c => m_can_core.c}   |  479 +++--

>>>  drivers/net/can/m_can/m_can_core.h            |  100 +

>>>  drivers/net/can/m_can/tcan4x5x.c              |  321 ++++

>>>  7 files changed, 722 insertions(+), 1917 deletions(-)

>>>  create mode 100644 Documentation/devicetree/bindings/net/can/tcan4x5x.txt

>>>  copy drivers/net/can/m_can/{m_can.c => m_can_core.c} (83%)

>>>  create mode 100644 drivers/net/can/m_can/m_can_core.h

>>>  create mode 100644 drivers/net/can/m_can/tcan4x5x.c

>>>

> 

> Patch 1/3 never arrived for me. Its not there on lkml either.

> https://lkml.org/lkml/2018/10/10/611

> 


LKML seems to have issue with 1/3.  Here they were posted.
Maybe the patch is to large but I received all 3 + the cover letter.

https://lore.kernel.org/patchwork/patch/998019/
https://lore.kernel.org/patchwork/patch/998017/
https://lore.kernel.org/patchwork/patch/998020/

> Can you resend the complete series?

> 

> Thanks,

> Faiz

> 



-- 
------------------
Dan Murphy