linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt
@ 2021-12-15 22:48 Rob Herring
  2021-12-15 23:37 ` Alexandre Belloni
  2022-01-04 14:57 ` Richard Genoud
  0 siblings, 2 replies; 4+ messages in thread
From: Rob Herring @ 2021-12-15 22:48 UTC (permalink / raw)
  To: Richard Genoud, Greg Kroah-Hartman, Jiri Slaby, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches
  Cc: Lad Prabhakar, linux-serial, linux-arm-kernel, linux-kernel

Accessing platform device resources directly has long been deprecated for
DT as IRQ resources may not be available at device creation time. Drivers
continuing to use static IRQ resources is blocking removing the static setup
from the DT core code.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 drivers/tty/serial/atmel_serial.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 2c99a47a2535..9e57bfe523cf 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2479,7 +2479,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port,
 	port->fifosize		= 1;
 	port->dev		= &pdev->dev;
 	port->mapbase		= mpdev->resource[0].start;
-	port->irq		= mpdev->resource[1].start;
+	port->irq		= platform_get_irq(mpdev, 0);
 	port->rs485_config	= atmel_config_rs485;
 	port->iso7816_config	= atmel_config_iso7816;
 	port->membase		= NULL;
-- 
2.32.0


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

* Re: [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt
  2021-12-15 22:48 [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt Rob Herring
@ 2021-12-15 23:37 ` Alexandre Belloni
  2021-12-16 21:22   ` Rob Herring
  2022-01-04 14:57 ` Richard Genoud
  1 sibling, 1 reply; 4+ messages in thread
From: Alexandre Belloni @ 2021-12-15 23:37 UTC (permalink / raw)
  To: Rob Herring
  Cc: Richard Genoud, Greg Kroah-Hartman, Jiri Slaby, Nicolas Ferre,
	Ludovic Desroches, Lad Prabhakar, linux-serial, linux-arm-kernel,
	linux-kernel

Hello Rob,

On 15/12/2021 16:48:31-0600, Rob Herring wrote:
> Accessing platform device resources directly has long been deprecated for
> DT as IRQ resources may not be available at device creation time. Drivers
> continuing to use static IRQ resources is blocking removing the static setup
> from the DT core code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  drivers/tty/serial/atmel_serial.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2c99a47a2535..9e57bfe523cf 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2479,7 +2479,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port,
>  	port->fifosize		= 1;
>  	port->dev		= &pdev->dev;
>  	port->mapbase		= mpdev->resource[0].start;

Shouldn't you fix that one at the same time?

> -	port->irq		= mpdev->resource[1].start;
> +	port->irq		= platform_get_irq(mpdev, 0);
>  	port->rs485_config	= atmel_config_rs485;
>  	port->iso7816_config	= atmel_config_iso7816;
>  	port->membase		= NULL;
> -- 
> 2.32.0
> 

-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* Re: [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt
  2021-12-15 23:37 ` Alexandre Belloni
@ 2021-12-16 21:22   ` Rob Herring
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2021-12-16 21:22 UTC (permalink / raw)
  To: Alexandre Belloni
  Cc: Richard Genoud, Greg Kroah-Hartman, Jiri Slaby, Nicolas Ferre,
	Ludovic Desroches, Lad Prabhakar, open list:SERIAL DRIVERS,
	linux-arm-kernel, linux-kernel

On Wed, Dec 15, 2021 at 5:37 PM Alexandre Belloni
<alexandre.belloni@bootlin.com> wrote:
>
> Hello Rob,
>
> On 15/12/2021 16:48:31-0600, Rob Herring wrote:
> > Accessing platform device resources directly has long been deprecated for
> > DT as IRQ resources may not be available at device creation time. Drivers
> > continuing to use static IRQ resources is blocking removing the static setup
> > from the DT core code.
> >
> > Signed-off-by: Rob Herring <robh@kernel.org>
> > ---
> >  drivers/tty/serial/atmel_serial.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> > index 2c99a47a2535..9e57bfe523cf 100644
> > --- a/drivers/tty/serial/atmel_serial.c
> > +++ b/drivers/tty/serial/atmel_serial.c
> > @@ -2479,7 +2479,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port,
> >       port->fifosize          = 1;
> >       port->dev               = &pdev->dev;
> >       port->mapbase           = mpdev->resource[0].start;
>
> Shouldn't you fix that one at the same time?

Sure, I'll make a 2nd patch as it has little to do with $subject.

>
> > -     port->irq               = mpdev->resource[1].start;
> > +     port->irq               = platform_get_irq(mpdev, 0);
> >       port->rs485_config      = atmel_config_rs485;
> >       port->iso7816_config    = atmel_config_iso7816;
> >       port->membase           = NULL;
> > --
> > 2.32.0
> >
>
> --
> Alexandre Belloni, co-owner and COO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com

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

* Re: [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt
  2021-12-15 22:48 [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt Rob Herring
  2021-12-15 23:37 ` Alexandre Belloni
@ 2022-01-04 14:57 ` Richard Genoud
  1 sibling, 0 replies; 4+ messages in thread
From: Richard Genoud @ 2022-01-04 14:57 UTC (permalink / raw)
  To: Rob Herring, Greg Kroah-Hartman, Jiri Slaby, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches
  Cc: Lad Prabhakar, linux-serial, linux-arm-kernel, linux-kernel


Le 15/12/2021 à 23:48, Rob Herring a écrit :
> Accessing platform device resources directly has long been deprecated for
> DT as IRQ resources may not be available at device creation time. Drivers
> continuing to use static IRQ resources is blocking removing the static setup
> from the DT core code.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Richard Genoud <richard.genoud@gmail.com>

> ---
>   drivers/tty/serial/atmel_serial.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
> index 2c99a47a2535..9e57bfe523cf 100644
> --- a/drivers/tty/serial/atmel_serial.c
> +++ b/drivers/tty/serial/atmel_serial.c
> @@ -2479,7 +2479,7 @@ static int atmel_init_port(struct atmel_uart_port *atmel_port,
>   	port->fifosize		= 1;
>   	port->dev		= &pdev->dev;
>   	port->mapbase		= mpdev->resource[0].start;
> -	port->irq		= mpdev->resource[1].start;
> +	port->irq		= platform_get_irq(mpdev, 0);
>   	port->rs485_config	= atmel_config_rs485;
>   	port->iso7816_config	= atmel_config_iso7816;
>   	port->membase		= NULL;

Thanks !

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

end of thread, other threads:[~2022-01-04 15:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-15 22:48 [PATCH] serial: atmel: Use platform_get_irq() to get the interrupt Rob Herring
2021-12-15 23:37 ` Alexandre Belloni
2021-12-16 21:22   ` Rob Herring
2022-01-04 14:57 ` Richard Genoud

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