Skip to contentSkip to conversation

Driver for at91 usart in spi mode

PATCH Superseded Radu Pirea 5 participants 21 messages Jul 13, 2018 – Sep 11, 2018

Subsystems (8)
lore
Share & tools
lore

Radu Pirea

author
#0 lore raw

v11 cover Driver for at91 usart in spi mode

Hello,

This is the second version of driver. I added a mfd driver which by default probes atmel_serial driver and if in dt is specified to probe the spi driver, then the spi-at91-usart driver will be probed. The compatible for atmel_serial is now the compatible for at91-usart mfd driver and compatilbe for atmel_serial driver was changed in order to keep the bindings for serial as they are.

@Lee, could you take this patch series into your tree? I addressed all Mark remarks.

Changes in v11:
- removed "depends on HAS_DMA" from drivers/spi/Kconfig because the driver has no dma support
- changed "selects MFD_AT91_USART" to "depends on MFD_AT91_USART" in drivers/spi/Kconfig
- changed comment style in spi-at91-usart.c

Changes in v10:
-fixed kbuild test robot warning

Changes in v9:
- minor changes
- rebased on top of broonie/for-4.19

Changes in v8:
- fixed passing an empty mfd cell if "atmel,usart-mode" value is invalid

Changes in v7:
- synced up SPDIX license with module license
- numbering of usart modes starts from 0 insteand of 1

Changes in v6:
- removed unused compatible strings from serial and spi drivers

Changes in v5:
- fixed usage of stdout-path property with atmel_serial driver

Changes in v4:
- modified the spi driver to use cs gpio support form spi subsystem
- fixed dma transfers for serial driver
- squashed binding for spi and serial and moved them to mfd/atmel-usart.txt

Changes in v3:
- fixed spi slaves probing

Changes in v2:
- added at91-usart mfd driver
- modified spi-at91-usart driver to work as mfd driver child
- modified atmel_serial driver to work as mfd driver child

Changes in v1:
- added spi-at91-usart driver

Radu Pirea (6):
MAINTAINERS: add at91 usart mfd driver
dt-bindings: add binding for atmel-usart in SPI mode
mfd: at91-usart: added mfd driver for usart
MAINTAINERS: add at91 usart spi driver
spi: at91-usart: add driver for at91-usart as spi tty/serial: atmel: change the driver to work under at91-usart mfd

 .../bindings/{serial => mfd}/atmel-usart.txt  |  25 +-
 MAINTAINERS                                   |  16 +
 drivers/mfd/Kconfig                           |   9 +
 drivers/mfd/Makefile                          |   1 +
 drivers/mfd/at91-usart.c                      |  71 +++
 drivers/spi/Kconfig                           |   8 +
 drivers/spi/Makefile                          |   1 +
 drivers/spi/spi-at91-usart.c                  | 432 ++++++++++++++++++
 drivers/tty/serial/Kconfig                    |   1 +
 drivers/tty/serial/atmel_serial.c             |  42 +-
 include/dt-bindings/mfd/at91-usart.h          |  17 +
 11 files changed, 606 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%)
 create mode 100644 drivers/mfd/at91-usart.c
 create mode 100644 drivers/spi/spi-at91-usart.c
 create mode 100644 include/dt-bindings/mfd/at91-usart.h
Signature · 1 line
2.18.0
author
#1 lore raw

PATCH v11 1/6 MAINTAINERS: add at91 usart mfd driver

Added entry for at91 usart mfd driver.

---
 MAINTAINERS | 9 +++++++++
 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
index 9d5eeff51b5f..7ac6e6af5292 100644
@@ -9321,6 +9321,7 @@ M:	Richard Genoud <[email protected]>
 S:	Maintained
 F:	drivers/tty/serial/atmel_serial.c
 F:	drivers/tty/serial/atmel_serial.h
+F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt
 
 MICROCHIP / ATMEL DMA DRIVER
 M:	Ludovic Desroches <[email protected]>
@@ -9353,6 +9354,14 @@ S:	Supported
 F:	drivers/mtd/nand/raw/atmel/*
 F:	Documentation/devicetree/bindings/mtd/atmel-nand.txt
 
+MICROCHIP AT91 USART MFD DRIVER
+M:	Radu Pirea <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	drivers/mfd/at91-usart.c
+F:	include/dt-bindings/mfd/at91-usart.h
+F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt
+
 MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
 M:	Woojung Huh <[email protected]>
 M:	Microchip Linux Driver Support <[email protected]>
Signature · 1 line
2.18.0
author
#2 lore raw

PATCH v11 2/6 dt-bindings: add binding for atmel-usart in SPI mode

In reply to Radu Pirea

This patch moves the bindings for serial from serial/atmel-usart.txt to mfd/atmel-usart.txt and adds bindings for USART in SPI mode.

---
 .../bindings/{serial => mfd}/atmel-usart.txt  | 25 +++++++++++++++++--
 include/dt-bindings/mfd/at91-usart.h          | 17 +++++++++++++
 2 files changed, 40 insertions(+), 2 deletions(-)
 rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%)
 create mode 100644 include/dt-bindings/mfd/at91-usart.h
Documentation/devicetree/bindings/mfd/atmel-usart.txt renamed from Documentation/devicetree/bindings/serial/atmel-usart.txt +23 -2
similarity index 76%
rename from Documentation/devicetree/bindings/serial/atmel-usart.txt
rename to Documentation/devicetree/bindings/mfd/atmel-usart.txt
index 7c0d6b2f53e4..0348fef0f497 100644
@@ -1,6 +1,6 @@
 * Atmel Universal Synchronous Asynchronous Receiver/Transmitter (USART)
 
-Required properties:
+Required properties for USART:
 - compatible: Should be "atmel,<chip>-usart" or "atmel,<chip>-dbgu"
   The compatible <chip> indicated will be the first SoC to support an
   additional mode or an USART new feature.
@@ -11,7 +11,13 @@ Required properties:
 	Required elements: "usart"
 - clocks: phandles to input clocks.
 
-Optional properties:
+Required properties for USART in SPI mode:
+- #size-cells      : Must be <0>
+- #address-cells   : Must be <1>
+- cs-gpios: chipselects (internal cs not supported)
+- atmel,usart-mode : Must be <AT91_USART_MODE_SPI> (found in dt-bindings/mfd/at91-usart.h)
+
+Optional properties in serial mode:
 - atmel,use-dma-rx: use of PDC or DMA for receiving data
 - atmel,use-dma-tx: use of PDC or DMA for transmitting data
 - {rts,cts,dtr,dsr,rng,dcd}-gpios: specify a GPIO for RTS/CTS/DTR/DSR/RI/DCD line respectively.
@@ -62,3 +68,18 @@ Example:
 		dma-names = "tx", "rx";
 		atmel,fifo-size = <32>;
 	};
+
+- SPI mode:
+	#include <dt-bindings/mfd/at91-usart.h>
+
+	spi0: spi@f001c000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "atmel,at91rm9200-usart", "atmel,at91sam9260-usart";
+		atmel,usart-mode = <AT91_USART_MODE_SPI>;
+		reg = <0xf001c000 0x100>;
+		interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&usart0_clk>;
+		clock-names = "usart";
+		cs-gpios = <&pioB 3 0>;
+	};
include/dt-bindings/mfd/at91-usart.h new file +17 -0
new file mode 100644
index 000000000000..2de5bc312e1e
@@ -0,0 +1,17 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * This header provides macros for AT91 USART DT bindings.
+ *
+ * Copyright (C) 2018 Microchip Technology
+ *
+ * Author: Radu Pirea <[email protected]>
+ *
+ */
+
+#ifndef __DT_BINDINGS_AT91_USART_H__
+#define __DT_BINDINGS_AT91_USART_H__
+
+#define AT91_USART_MODE_SERIAL	0
+#define AT91_USART_MODE_SPI	1
+
+#endif /* __DT_BINDINGS_AT91_USART_H__ */
Signature · 1 line
2.18.0
author
#3 lore raw

PATCH v11 3/6 mfd: at91-usart: added mfd driver for usart

In reply to Radu Pirea

This mfd driver is just a wrapper over atmel_serial driver and spi-at91-usart driver. Selection of one of the drivers is based on a property from device tree. If the property is not specified, the default driver is atmel_serial.

---
 drivers/mfd/Kconfig      |  9 +++++
 drivers/mfd/Makefile     |  1 +
 drivers/mfd/at91-usart.c | 71 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 81 insertions(+)
 create mode 100644 drivers/mfd/at91-usart.c
drivers/mfd/Kconfig +9 -0
index b860eb5aa194..a886672b960d 100644
@@ -99,6 +99,15 @@ config MFD_AAT2870_CORE
 	  additional drivers must be enabled in order to use the
 	  functionality of the device.
 
+config MFD_AT91_USART
+	tristate "AT91 USART Driver"
+	select MFD_CORE
+	help
+	  Select this to get support for AT91 USART IP. This is a wrapper
+	  over at91-usart-serial driver and usart-spi-driver. Only one function
+	  can be used at a time. The choice is done at boot time by the probe
+	  function of this MFD driver according to a device tree property.
+
 config MFD_ATMEL_FLEXCOM
 	tristate "Atmel Flexcom (Flexible Serial Communication Unit)"
 	select MFD_CORE
drivers/mfd/Makefile +1 -0
index e9fd20dba18d..c7e66928abb9 100644
@@ -184,6 +184,7 @@ obj-$(CONFIG_MFD_SPMI_PMIC)	+= qcom-spmi-pmic.o
 obj-$(CONFIG_TPS65911_COMPARATOR)	+= tps65911-comparator.o
 obj-$(CONFIG_MFD_TPS65090)	+= tps65090.o
 obj-$(CONFIG_MFD_AAT2870_CORE)	+= aat2870-core.o
+obj-$(CONFIG_MFD_AT91_USART)	+= at91-usart.o
 obj-$(CONFIG_MFD_ATMEL_FLEXCOM)	+= atmel-flexcom.o
 obj-$(CONFIG_MFD_ATMEL_HLCDC)	+= atmel-hlcdc.o
 obj-$(CONFIG_MFD_ATMEL_SMC)	+= atmel-smc.o
drivers/mfd/at91-usart.c new file +71 -0

71 lines not on this page · raw message

Signature · 1 line
2.18.0
author
#4 lore raw

PATCH v11 4/6 MAINTAINERS: add at91 usart spi driver

In reply to Radu Pirea

Added entry for at91 usart mfd driver.

---
 MAINTAINERS | 7 +++++++
 1 file changed, 7 insertions(+)
MAINTAINERS +7 -0
index 7ac6e6af5292..f849cc4acbf6 100644
@@ -9362,6 +9362,13 @@ F:	drivers/mfd/at91-usart.c
 F:	include/dt-bindings/mfd/at91-usart.h
 F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt
 
+MICROCHIP AT91 USART SPI DRIVER
+M:	Radu Pirea <[email protected]>
+L:	[email protected]
+S:	Supported
+F:	drivers/spi/spi-at91-usart.c
+F:	Documentation/devicetree/bindings/mfd/atmel-usart.txt
+
 MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
 M:	Woojung Huh <[email protected]>
 M:	Microchip Linux Driver Support <[email protected]>
Signature · 1 line
2.18.0
author
#5 lore raw

PATCH v11 5/6 spi: at91-usart: add driver for at91-usart as spi

In reply to Radu Pirea

This is the driver for at91-usart in spi mode. The USART IP can be configured to work in many modes and one of them is SPI.

The driver was tested on sama5d3-xplained and sama5d4-xplained boards with enc28j60 ethernet controller as slave.

---
 drivers/spi/Kconfig          |   8 +
 drivers/spi/Makefile         |   1 +
 drivers/spi/spi-at91-usart.c | 432 +++++++++++++++++++++++++++++++++++
 3 files changed, 441 insertions(+)
 create mode 100644 drivers/spi/spi-at91-usart.c
drivers/spi/Kconfig +8 -0
index ad5d68e1dab7..6d9e309fab67 100644
@@ -83,6 +83,14 @@ config SPI_ATMEL
 	  This selects a driver for the Atmel SPI Controller, present on
 	  many AT91 ARM chips.
 
+config SPI_AT91_USART
+	tristate "Atmel USART Controller SPI driver"
+	depends on (ARCH_AT91 || COMPILE_TEST)
+	depends on MFD_AT91_USART
+	help
+	  This selects a driver for the AT91 USART Controller as SPI Master,
+	  present on AT91 and SAMA5 SoC series.
+
 config SPI_AU1550
 	tristate "Au1550/Au1200/Au1300 SPI Controller"
 	depends on MIPS_ALCHEMY
drivers/spi/Makefile +1 -0
index cb1f4378b87c..901ff606e6e5 100644
@@ -16,6 +16,7 @@ obj-$(CONFIG_SPI_LOOPBACK_TEST)		+= spi-loopback-test.o
 obj-$(CONFIG_SPI_ALTERA)		+= spi-altera.o
 obj-$(CONFIG_SPI_ARMADA_3700)		+= spi-armada-3700.o
 obj-$(CONFIG_SPI_ATMEL)			+= spi-atmel.o
+obj-$(CONFIG_SPI_AT91_USART)		+= spi-at91-usart.o
 obj-$(CONFIG_SPI_ATH79)			+= spi-ath79.o
 obj-$(CONFIG_SPI_AU1550)		+= spi-au1550.o
 obj-$(CONFIG_SPI_AXI_SPI_ENGINE)	+= spi-axi-spi-engine.o
drivers/spi/spi-at91-usart.c new file +432 -0

432 lines not on this page · raw message

Signature · 1 line
2.18.0
author
#6 lore raw

PATCH v11 6/6 tty/serial: atmel: change the driver to work under at91-usart mfd

In reply to Radu Pirea

This patch modifies the place where resources and device tree properties are searched.

---
 drivers/tty/serial/Kconfig        |  1 +
 drivers/tty/serial/atmel_serial.c | 42 ++++++++++++++++++++-----------
 2 files changed, 28 insertions(+), 15 deletions(-)
drivers/tty/serial/Kconfig +1 -0
index df8bd0c7b97d..32886c304641 100644
@@ -118,6 +118,7 @@ config SERIAL_ATMEL
 	depends on ARCH_AT91 || COMPILE_TEST
 	select SERIAL_CORE
 	select SERIAL_MCTRL_GPIO if GPIOLIB
+	select MFD_AT91_USART
 	help
 	  This enables the driver for the on-chip UARTs of the Atmel
 	  AT91 processors.
drivers/tty/serial/atmel_serial.c +27 -15

130 lines not on this page · raw message

Signature · 1 line
2.18.0
maintainer Acked-by on v11 6/6
#7 lore raw

Re: [PATCH v11 6/6] tty/serial: atmel: change the driver to work under at91-usart mfd

Quoted 7 lines · Radu Pirea

This patch modifies the place where resources and device tree properties are searched.

author
#8 lore raw
In reply to Radu Pirea

Hi Lee,

I saw that the patches were not applied to your tree for this kernel version. After the discussion with Nicolas, I remember that you said that you will take the patches in your tree. I addressed Mark comments related to the last version of patches. Is there something that must be reworked in order to take the patches?

Quoted 80 lines · On 7/13/18 7:47 PM, Radu Pirea - M19893 wrote:

Hello,

This is the second version of driver. I added a mfd driver which by default probes atmel_serial driver and if in dt is specified to probe the spi driver, then the spi-at91-usart driver will be probed. The compatible for atmel_serial is now the compatible for at91-usart mfd driver and compatilbe for atmel_serial driver was changed in order to keep the bindings for serial as they are.

@Lee, could you take this patch series into your tree? I addressed all Mark remarks.

Changes in v11:
- removed "depends on HAS_DMA" from drivers/spi/Kconfig because the driver has no dma support
- changed "selects MFD_AT91_USART" to "depends on MFD_AT91_USART" in drivers/spi/Kconfig
- changed comment style in spi-at91-usart.c

Changes in v10:
-fixed kbuild test robot warning

Changes in v9:
- minor changes
- rebased on top of broonie/for-4.19

Changes in v8:
- fixed passing an empty mfd cell if "atmel,usart-mode" value is invalid

Changes in v7:
- synced up SPDIX license with module license
- numbering of usart modes starts from 0 insteand of 1

Changes in v6:
- removed unused compatible strings from serial and spi drivers

Changes in v5:
- fixed usage of stdout-path property with atmel_serial driver

Changes in v4:
- modified the spi driver to use cs gpio support form spi subsystem
- fixed dma transfers for serial driver
- squashed binding for spi and serial and moved them to mfd/atmel-usart.txt

Changes in v3:
- fixed spi slaves probing

Changes in v2:
- added at91-usart mfd driver
- modified spi-at91-usart driver to work as mfd driver child
- modified atmel_serial driver to work as mfd driver child

Changes in v1:
- added spi-at91-usart driver

Radu Pirea (6):
MAINTAINERS: add at91 usart mfd driver
dt-bindings: add binding for atmel-usart in SPI mode
mfd: at91-usart: added mfd driver for usart
MAINTAINERS: add at91 usart spi driver
spi: at91-usart: add driver for at91-usart as spi tty/serial: atmel: change the driver to work under at91-usart mfd

  .../bindings/{serial => mfd}/atmel-usart.txt  |  25 +-
  MAINTAINERS                                   |  16 +
  drivers/mfd/Kconfig                           |   9 +
  drivers/mfd/Makefile                          |   1 +
  drivers/mfd/at91-usart.c                      |  71 +++
  drivers/spi/Kconfig                           |   8 +
  drivers/spi/Makefile                          |   1 +
  drivers/spi/spi-at91-usart.c                  | 432 ++++++++++++++++++
  drivers/tty/serial/Kconfig                    |   1 +
  drivers/tty/serial/atmel_serial.c             |  42 +-
  include/dt-bindings/mfd/at91-usart.h          |  17 +
  11 files changed, 606 insertions(+), 17 deletions(-)

rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%) create mode 100644 drivers/mfd/at91-usart.c
create mode 100644 drivers/spi/spi-at91-usart.c
create mode 100644 include/dt-bindings/mfd/at91-usart.h

#9 lore raw
Quoted 5 lines · Radu Pirea

I saw that the patches were not applied to your tree for this kernel version. After the discussion with Nicolas, I remember that you said that you will take the patches in your tree. I addressed Mark comments related to the last version of patches. Is there something that must be reworked in order to take the patches?

I don't remember back this far, so can't provide you with any good reasons as to why the set wasn't applied. There doesn't appear to be anything wrong or wanting from the set, although it was submitted late in the release cycle.

Just to let you and other readers know; since email is almost exclusively used for submitting, reviewing and tracking patches, and my setup (mbsync/mutt) can be a little temperamental at times, there are instances, albeit rare ones when patches/sets fall by the wayside. In these instances, my suggestion is always for the submitter to resubmit with a RESEND in order to regain attention to the set.

Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#10 lore raw

[GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

In reply to Radu Pirea

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

----------------------------------------------------------------
Radu Pirea (6):
MAINTAINERS: Add AT91 USART MFD entry
dt-bindings: Add binding for atmel-usart in SPI mode
mfd: at91-usart: Add MFD driver for USART
MAINTAINERS: Add AT91 USART SPI entry
spi: at91-usart: Add driver for at91-usart as SPI tty/serial: atmel: Change the driver to work under at91-usart MFD

 .../bindings/{serial => mfd}/atmel-usart.txt       |  25 +-
 MAINTAINERS                                        |  16 +
 drivers/mfd/Kconfig                                |   9 +
 drivers/mfd/Makefile                               |   1 +
 drivers/mfd/at91-usart.c                           |  71 ++++
 drivers/spi/Kconfig                                |   8 +
 drivers/spi/Makefile                               |   1 +
 drivers/spi/spi-at91-usart.c                       | 432 +++++++++++++++++++++
 drivers/tty/serial/Kconfig                         |   1 +
 drivers/tty/serial/atmel_serial.c                  |  42 +-
 include/dt-bindings/mfd/at91-usart.h               |  17 +
 11 files changed, 606 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%)
 create mode 100644 drivers/mfd/at91-usart.c
 create mode 100644 drivers/spi/spi-at91-usart.c
 create mode 100644 include/dt-bindings/mfd/at91-usart.h
Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#11 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 6 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

Quoted 7 lines

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

thanks for this. I'll suck it into my tty-next branch to make it easier for any future at91 serial driver changes to be simpler to merge.

greg k-h

#12 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

In reply to Lee Jones

Hi Lee,

Thank you for taking the patch series, but you didn't take the latest version(v12) :)

Quoted 51 lines · Lee Jones

Enjoy!

The following changes since commit
5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-
mfd-spi-tty-v4.20

for you to fetch changes up to
c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

tty/serial: atmel: Change the driver to work under at91-usart MFD
(2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

----------------------------------------------------------------
Radu Pirea (6):
MAINTAINERS: Add AT91 USART MFD entry
dt-bindings: Add binding for atmel-usart in SPI mode
mfd: at91-usart: Add MFD driver for USART
MAINTAINERS: Add AT91 USART SPI entry
spi: at91-usart: Add driver for at91-usart as SPI tty/serial: atmel: Change the driver to work under at91-usart
MFD

 .../bindings/{serial => mfd}/atmel-usart.txt       |  25 +-
 MAINTAINERS                                        |  16 +
 drivers/mfd/Kconfig                                |   9 +
 drivers/mfd/Makefile                               |   1 +
 drivers/mfd/at91-usart.c                           |  71 ++++
 drivers/spi/Kconfig                                |   8 +
 drivers/spi/Makefile                               |   1 +
 drivers/spi/spi-at91-usart.c                       | 432
+++++++++++++++++++++
 drivers/tty/serial/Kconfig                         |   1 +
 drivers/tty/serial/atmel_serial.c                  |  42 +-
 include/dt-bindings/mfd/at91-usart.h               |  17 +
 11 files changed, 606 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{serial => mfd}/atmel-
usart.txt (76%)
 create mode 100644 drivers/mfd/at91-usart.c
 create mode 100644 drivers/spi/spi-at91-usart.c
 create mode 100644 include/dt-bindings/mfd/at91-usart.h
#13 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 4 lines · Radu Nicolae Pirea

Hi Lee,

Thank you for taking the patch series, but you didn't take the latest version(v12) :)

Both were marked for merging in my inbox, and since I am working though my (300+) post-vacation emails chronologically v11 was handled first.

It appears as though there is an issue in the way 'struct of_device_id' was declared too. The header file in which it was declared used to be included by proxy, however a separation has recently been made causing build errors.

I will fix both issues and re-submit the PR.

Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#14 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

In reply to Lee Jones
Quoted 8 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

Quoted 8 lines

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Due to a comedy of errors, I'm voiding this pull-request.

Please stand-by for a follow-up.

Quoted 25 lines

Radu Pirea (6):
MAINTAINERS: Add AT91 USART MFD entry
dt-bindings: Add binding for atmel-usart in SPI mode
mfd: at91-usart: Add MFD driver for USART
MAINTAINERS: Add AT91 USART SPI entry
spi: at91-usart: Add driver for at91-usart as SPI tty/serial: atmel: Change the driver to work under at91-usart MFD

 .../bindings/{serial => mfd}/atmel-usart.txt       |  25 +-
 MAINTAINERS                                        |  16 +
 drivers/mfd/Kconfig                                |   9 +
 drivers/mfd/Makefile                               |   1 +
 drivers/mfd/at91-usart.c                           |  71 ++++
 drivers/spi/Kconfig                                |   8 +
 drivers/spi/Makefile                               |   1 +
 drivers/spi/spi-at91-usart.c                       | 432 +++++++++++++++++++++
 drivers/tty/serial/Kconfig                         |   1 +
 drivers/tty/serial/atmel_serial.c                  |  42 +-
 include/dt-bindings/mfd/at91-usart.h               |  17 +
 11 files changed, 606 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%)
 create mode 100644 drivers/mfd/at91-usart.c
 create mode 100644 drivers/spi/spi-at91-usart.c
 create mode 100644 include/dt-bindings/mfd/at91-usart.h
Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#15 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 12 lines · Lee Jones
Quoted 10 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

Quoted 8 lines
Quoted 6 lines

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Due to a comedy of errors, I'm voiding this pull-request.

Um, I can't do that as my tree can not be rebased :(

I can take follow-on patches, so I will go apply the patch posted so that my tree builds again. I recommend you just apply it as well.

thanks,

greg k-h

#16 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 15 lines · Greg KH
Quoted 14 lines · Lee Jones
Quoted 12 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Due to a comedy of errors, I'm voiding this pull-request.

Um, I can't do that as my tree can not be rebased :(

Oh dear. :(

Quoted 2 lines

I can take follow-on patches, so I will go apply the patch posted so that my tree builds again. I recommend you just apply it as well.

What a pickle. As per my last email, it looks as though this set was applied under false pretences. The MFD patch which was carrying my Ack was doing so incorrectly. The author mistakenly applied it to the wrong patch. After re-review (actually initial review) I wish to NACK the implementation.

My suggestion would be to sit tight, rather than do anything rash and see how this plays out. After which we can fix your tree.

Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#17 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 28 lines · Lee Jones
Quoted 15 lines · Greg KH
Quoted 14 lines · Lee Jones
Quoted 12 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

   Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Due to a comedy of errors, I'm voiding this pull-request.

Um, I can't do that as my tree can not be rebased :(

Oh dear. :(

Quoted 8 lines
Quoted 2 lines

I can take follow-on patches, so I will go apply the patch posted so that my tree builds again. I recommend you just apply it as well.

What a pickle. As per my last email, it looks as though this set was applied under false pretences. The MFD patch which was carrying my Ack was doing so incorrectly. The author mistakenly applied it to the wrong patch. After re-review (actually initial review) I wish to NACK the implementation.

What? We discussed this to the bone!

Radu followed all the recommendations, collected all the feedback from major subsystems SPI and USART, resent the series again.

It was then forgotten. Wrong series was finally applied (which could trigger 0-day reports, I warn you)... and now we are discussing about the implementation of *v2* (we're at v12)!

Quoted 2 lines

My suggestion would be to sit tight, rather than do anything rash and see how this plays out. After which we can fix your tree.

Come on, Greg's tree is fixed now. We can catch-up with v11..v12 changes with patches and cleanup the mess together.

Just one misalignment with one patch merged for v4.19-rc1, fixed the same day, cannot generate such a reaction after months of development.

Best regards,

Signature · 1 line
Nicolas Ferre
maintainer
#18 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 47 lines · Nicolas Ferre
Quoted 28 lines · Lee Jones
Quoted 15 lines · Greg KH
Quoted 14 lines · Lee Jones
Quoted 12 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

   Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Due to a comedy of errors, I'm voiding this pull-request.

Um, I can't do that as my tree can not be rebased :(

Oh dear. :(

Quoted 8 lines
Quoted 2 lines

I can take follow-on patches, so I will go apply the patch posted so that my tree builds again. I recommend you just apply it as well.

What a pickle. As per my last email, it looks as though this set was applied under false pretences. The MFD patch which was carrying my Ack was doing so incorrectly. The author mistakenly applied it to the wrong patch. After re-review (actually initial review) I wish to NACK the implementation.

What? We discussed this to the bone!

Radu followed all the recommendations, collected all the feedback from major subsystems SPI and USART, resent the series again.

It was then forgotten. Wrong series was finally applied (which could trigger 0-day reports, I warn you)... and now we are discussing about the implementation of *v2* (we're at v12)!

Quoted 8 lines
Quoted 2 lines

My suggestion would be to sit tight, rather than do anything rash and see how this plays out. After which we can fix your tree.

Come on, Greg's tree is fixed now. We can catch-up with v11..v12 changes with patches and cleanup the mess together.

Just one misalignment with one patch merged for v4.19-rc1, fixed the same day, cannot generate such a reaction after months of development.

I agree, my tree is now fixed, no harm done. Just apply the same patch to whomever also pulled it into their trees and all is good.

thanks,

greg k-h

#19 lore raw

Re: [GIT PULL] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Quoted 39 lines · Greg KH
Quoted 38 lines · Nicolas Ferre
Quoted 36 lines · Lee Jones
Quoted 15 lines · Greg KH
Quoted 14 lines · Lee Jones
Quoted 12 lines · Lee Jones

Enjoy!

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

   Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20

for you to fetch changes up to c24d25317a7c6bb3053d4c193b3cf57d1e9a3e4b:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

tty/serial: atmel: Change the driver to work under at91-usart MFD (2018-09-10 16:12:43 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

Due to a comedy of errors, I'm voiding this pull-request.

Um, I can't do that as my tree can not be rebased :(

Oh dear. :(

Quoted 2 lines

I can take follow-on patches, so I will go apply the patch posted so that my tree builds again. I recommend you just apply it as well.

What a pickle. As per my last email, it looks as though this set was applied under false pretences. The MFD patch which was carrying my Ack was doing so incorrectly. The author mistakenly applied it to the wrong patch. After re-review (actually initial review) I wish to NACK the implementation.

Quoted 8 lines
Quoted 8 lines

What? We discussed this to the bone!

Radu followed all the recommendations, collected all the feedback from major subsystems SPI and USART, resent the series again.

It was then forgotten. Wrong series was finally applied (which could trigger 0-day reports, I warn you)... and now we are discussing about the implementation of *v2* (we're at v12)!

This situation is frustrating. The reason I was not part of the discussion can be attributed to an erroneous application of my Ack earlier in the review process.

Anyway ... since Greg has applied the pull-request I do agree that the path of least friction would be just to apply the set. :(

Quoted 11 lines
Quoted 8 lines
Quoted 2 lines

My suggestion would be to sit tight, rather than do anything rash and see how this plays out. After which we can fix your tree.

Come on, Greg's tree is fixed now. We can catch-up with v11..v12 changes with patches and cleanup the mess together.

Just one misalignment with one patch merged for v4.19-rc1, fixed the same day, cannot generate such a reaction after months of development.

I agree, my tree is now fixed, no harm done. Just apply the same patch to whomever also pulled it into their trees and all is good.

Have you applied Nicolas' patch already? Without discussion? :((

Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#20 lore raw

[GIT PULL v2] Immutable branch between MFD, SPI and TTY due for the v4.20 merge window

In reply to Lee Jones

This new pull-request contains the following changes since v1:

- Uplift the submission version from v11 to v12
- Include fix for build breakage due to missing Device Tree include file

Since it is based on the original pull-request, it can be pulled in either directly on top of it or as a pull in its own right.

The following changes since commit 5b394b2ddf0347bef56e50c69a58773c94343ff3:

Linux 4.19-rc1 (2018-08-26 14:11:59 -0700)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git tags/ib-mfd-spi-tty-v4.20-1

for you to fetch changes up to 65b80dfffeabd4eb253b93d07eadde4d89c18511:

mfd: at91-usart: Include Device Tree header (2018-09-11 11:44:56 +0100)

----------------------------------------------------------------
Immutable branch between MFD, SPI and TTY due for the v4.20 merge window (v2)

----------------------------------------------------------------
Lee Jones (4):
dt-bindings: mfd: atmel-usart: Correct interrupts property to include IRQ number
MAINTAINERS: Change Radu's email address
spi: at91-usart: Make local functions static
mfd: at91-usart: Include Device Tree header

Radu Pirea (6):
MAINTAINERS: Add AT91 USART MFD entry
dt-bindings: Add binding for atmel-usart in SPI mode
mfd: at91-usart: Add MFD driver for USART
MAINTAINERS: Add AT91 USART SPI entry
spi: at91-usart: Add driver for at91-usart as SPI tty/serial: atmel: Change the driver to work under at91-usart MFD

 .../bindings/{serial => mfd}/atmel-usart.txt       |  25 +-
 MAINTAINERS                                        |  16 +
 drivers/mfd/Kconfig                                |   9 +
 drivers/mfd/Makefile                               |   1 +
 drivers/mfd/at91-usart.c                           |  72 ++++
 drivers/spi/Kconfig                                |   8 +
 drivers/spi/Makefile                               |   1 +
 drivers/spi/spi-at91-usart.c                       | 432 +++++++++++++++++++++
 drivers/tty/serial/Kconfig                         |   1 +
 drivers/tty/serial/atmel_serial.c                  |  42 +-
 include/dt-bindings/mfd/at91-usart.h               |  17 +
 11 files changed, 607 insertions(+), 17 deletions(-)
 rename Documentation/devicetree/bindings/{serial => mfd}/atmel-usart.txt (76%)
 create mode 100644 drivers/mfd/at91-usart.c
 create mode 100644 drivers/spi/spi-at91-usart.c
 create mode 100644 include/dt-bindings/mfd/at91-usart.h
Signature · 4 lines
Lee Jones [???]
Linaro Services Technical Lead
Linaro.org ? Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog