Skip to contentSkip to conversation

dm: at91: Add driver model support for the spi driver

PATCH New Wenyou Yang 3 participants 4 messages Oct 28, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v11 1/1 dm: at91: Add driver model support for the spi driver

Add driver model support while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not.

---

Changes in v11:
- Set cs_gpio direction to output and active.
- Use wait_for_bit() to replace do {} while ().
- Add more description for help of ATMEL_SPI.

Changes in v10:
- Add Acked-by tag.

Changes in v9:
- Due to the peripheral clock driver improvement, remove the unneccessary clock calling.

Changes in v8:
- Fix compile error for AVR32.

Changes in v7:
- Move gpio_request_list_by_name() to _probe(), remove *_ofdata_to_platdata().

Changes in v6:
- Remove the two flash related options.

Changes in v5:
- Change clk_client.h -> clk.h to adapt to clk API conversion.

Changes in v4:
- Collect Reviewed-by tag.
- Update the clk API based on [PATCH] clk: convert API to match reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
- Remove check on dev_get_parent() return.
- Fixed the return value, -ENODEV->-EINVAL.
- Retain #include <asm/arch/clk.h> line.

Changes in v3:
- Remove redundant log print.

Changes in v2:
- Add clock support.

 drivers/spi/Kconfig     |   8 ++
 drivers/spi/atmel_spi.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 296 insertions(+)
drivers/spi/Kconfig +8 -0
index 8724f87..0f51b3a 100644
@@ -32,6 +32,14 @@ config ATH79_SPI
 	  uses driver model and requires a device tree binding to operate.
 	  please refer to doc/device-tree-bindings/spi/spi-ath79.txt.
 
+config ATMEL_SPI
+	bool "Atmel SPI driver"
+	depends on ARCH_AT91
+	help
+	  This enables driver for the Atmel SPI Controller, present on
+	  many AT32 (AVR32) and AT91 (ARM) chips. This driver can be
+	  used to access the SPI Flash, such as AT25DF321.
+
 config CADENCE_QSPI
 	bool "Cadence QSPI driver"
 	help
drivers/spi/atmel_spi.c +288 -0

307 lines not on this page · raw message

Signature · 1 line
2.7.4
#1 lore raw

PATCH v11 1/1 dm: at91: Add driver model support for the spi driver

Dear Wenyou Yang,

Quoted 45 lines · Wenyou Yang

Add driver model support while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not.

---

Changes in v11:
- Set cs_gpio direction to output and active.
- Use wait_for_bit() to replace do {} while ().
- Add more description for help of ATMEL_SPI.

Changes in v10:
- Add Acked-by tag.

Changes in v9:
- Due to the peripheral clock driver improvement, remove the unneccessary clock calling.

Changes in v8:
- Fix compile error for AVR32.

Changes in v7:
- Move gpio_request_list_by_name() to _probe(), remove *_ofdata_to_platdata().

Changes in v6:
- Remove the two flash related options.

Changes in v5:
- Change clk_client.h -> clk.h to adapt to clk API conversion.

Changes in v4:
- Collect Reviewed-by tag.
- Update the clk API based on [PATCH] clk: convert API to match reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
- Remove check on dev_get_parent() return.
- Fixed the return value, -ENODEV->-EINVAL.
- Retain #include <asm/arch/clk.h> line.

Changes in v3:
- Remove redundant log print.

Quoted 6 lines

Changes in v2:
- Add clock support.

drivers/spi/Kconfig | 8 ++
drivers/spi/atmel_spi.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++

2 files changed, 296 insertions(+)

applied to u-boot-atmel/master, thanks!

Best regards,
Andreas Bie?mann

#2 lore raw

PATCH v11 1/1 dm: at91: Add driver model support for the spi driver

Quoted 48 lines · Andreas Bie?mann

Dear Wenyou Yang,

Quoted 45 lines · Wenyou Yang

Add driver model support while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not.

---

Changes in v11:
- Set cs_gpio direction to output and active.
- Use wait_for_bit() to replace do {} while ().
- Add more description for help of ATMEL_SPI.

Changes in v10:
- Add Acked-by tag.

Changes in v9:
- Due to the peripheral clock driver improvement, remove the unneccessary clock calling.

Changes in v8:
- Fix compile error for AVR32.

Changes in v7:
- Move gpio_request_list_by_name() to _probe(), remove *_ofdata_to_platdata().

Changes in v6:
- Remove the two flash related options.

Changes in v5:
- Change clk_client.h -> clk.h to adapt to clk API conversion.

Changes in v4:
- Collect Reviewed-by tag.
- Update the clk API based on [PATCH] clk: convert API to match reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
- Remove check on dev_get_parent() return.
- Fixed the return value, -ENODEV->-EINVAL.
- Retain #include <asm/arch/clk.h> line.

Changes in v3:
- Remove redundant log print.

Quoted 8 lines
Quoted 6 lines

Changes in v2:
- Add clock support.

drivers/spi/Kconfig | 8 ++
drivers/spi/atmel_spi.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++

2 files changed, 296 insertions(+)

applied to u-boot-atmel/master, thanks!

Sorry, don't know how come this is applied w/o any Ack/Review tag from the maintainer?

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#3 lore raw

PATCH v11 1/1 dm: at91: Add driver model support for the spi driver

Hi Jagan,

Quoted 53 lines · Jagan Teki
Quoted 51 lines · Andreas Bie?mann

Dear Wenyou Yang,

Quoted 48 lines · Wenyou Yang

Add driver model support while retaining the existing legacy code. This allows the driver to support boards that have converted to driver model as well as those that have not.

---

Changes in v11:
- Set cs_gpio direction to output and active.
- Use wait_for_bit() to replace do {} while ().
- Add more description for help of ATMEL_SPI.

Changes in v10:
- Add Acked-by tag.

Changes in v9:
- Due to the peripheral clock driver improvement, remove the unneccessary clock calling.

Changes in v8:
- Fix compile error for AVR32.

Changes in v7:
- Move gpio_request_list_by_name() to _probe(), remove *_ofdata_to_platdata().

Changes in v6:
- Remove the two flash related options.

Changes in v5:
- Change clk_client.h -> clk.h to adapt to clk API conversion.

Changes in v4:
- Collect Reviewed-by tag.
- Update the clk API based on [PATCH] clk: convert API to match reset/mailbox fstyle (http://patchwork.ozlabs.org/patch/625342/).
- Remove check on dev_get_parent() return.
- Fixed the return value, -ENODEV->-EINVAL.
- Retain #include <asm/arch/clk.h> line.

Changes in v3:
- Remove redundant log print.

Changes in v2:
- Add clock support.

Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

drivers/spi/Kconfig | 8 ++
drivers/spi/atmel_spi.c | 288 ++++++++++++++++++++++++++++++++++++++++++++++++

2 files changed, 296 insertions(+)

applied to u-boot-atmel/master, thanks!

Sorry, don't know how come this is applied w/o any Ack/Review tag from the maintainer?

This patch is now in v11 and posted first in April this year, it was most times delegated to me [1]. Sorry, when adding it today I did not think of asking for your reviewed/acked-by. I try to respect this in future.

With your comment here I started a retrospective on this patch and figured out it was once delegated to you (v7) and got a reviewed-by from you which did not make it into the patch.
Do you have any objections? Should I remove this patch from the pull request?

Andreas

[1]
http://patchwork.ozlabs.org/project/uboot/list/?submitter=&state=*&q=dm%3A+at91%3A+Add+driver+model+support+for+the+spi+driver&archive=&delegate=