linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: at91-usart: do not use compatible to register child devices
@ 2020-11-03  9:32 Codrin Ciubotariu
  2020-11-11 16:26 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Codrin Ciubotariu @ 2020-11-03  9:32 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel
  Cc: radu_nicolae.pirea, lee.jones, nicolas.ferre, alexandre.belloni,
	ludovic.desroches, Codrin Ciubotariu

There are no separate serial/SPI devices under the at91-usart MFD, but
actually the MFD is used as a serial or a SPI device. There are no DT
sub-nodes for the MFD children, so we should use platform device API to
register the drivers.

Suggested-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
---
 drivers/mfd/at91-usart.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/at91-usart.c b/drivers/mfd/at91-usart.c
index 6a8351a4588e..7f08cb60c58b 100644
--- a/drivers/mfd/at91-usart.c
+++ b/drivers/mfd/at91-usart.c
@@ -15,15 +15,11 @@
 #include <linux/of.h>
 #include <linux/property.h>
 
-static const struct mfd_cell at91_usart_spi_subdev = {
-	.name = "at91_usart_spi",
-	.of_compatible = "microchip,at91sam9g45-usart-spi",
-};
+static const struct mfd_cell at91_usart_spi_subdev =
+	MFD_CELL_NAME("at91_usart_spi");
 
-static const struct mfd_cell at91_usart_serial_subdev = {
-	.name = "atmel_usart_serial",
-	.of_compatible = "atmel,at91rm9200-usart-serial",
-};
+static const struct mfd_cell at91_usart_serial_subdev =
+	MFD_CELL_NAME("atmel_usart_serial");
 
 static int at91_usart_mode_probe(struct platform_device *pdev)
 {
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mfd: at91-usart: do not use compatible to register child devices
  2020-11-03  9:32 [PATCH] mfd: at91-usart: do not use compatible to register child devices Codrin Ciubotariu
@ 2020-11-11 16:26 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2020-11-11 16:26 UTC (permalink / raw)
  To: Codrin Ciubotariu
  Cc: linux-kernel, linux-arm-kernel, radu_nicolae.pirea, nicolas.ferre,
	alexandre.belloni, ludovic.desroches

On Tue, 03 Nov 2020, Codrin Ciubotariu wrote:

> There are no separate serial/SPI devices under the at91-usart MFD, but
> actually the MFD is used as a serial or a SPI device. There are no DT
> sub-nodes for the MFD children, so we should use platform device API to
> register the drivers.
> 
> Suggested-by: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Codrin Ciubotariu <codrin.ciubotariu@microchip.com>
> ---
>  drivers/mfd/at91-usart.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)

Applied, thanks.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-11-11 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-03  9:32 [PATCH] mfd: at91-usart: do not use compatible to register child devices Codrin Ciubotariu
2020-11-11 16:26 ` Lee Jones

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).