* [PATCH v4] serial: samsung: change to platform_get_irq_optional [not found] <CGME20210621044400epcas5p40368077e77d2da219db8f890dfd69f7c@epcas5p4.samsung.com> @ 2021-06-21 4:47 ` Tamseel Shams 2021-06-21 5:26 ` M Tamseel Shams 0 siblings, 1 reply; 4+ messages in thread From: Tamseel Shams @ 2021-06-21 4:47 UTC (permalink / raw) To: kgene, krzk, gregkh, jslaby Cc: linux-arm-kernel, linux-samsung-soc, linux-serial, linux-kernel, alim.akhtar, ajaykumar.rs, Tamseel Shams In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines. However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to this, "platform_get_irq(platdev, 1)" call in the driver gives the following false-positive error: "IRQ index 1 not found" on recent platforms. This patch replaces the platform_get_irq() call with platform_get_irq_optional() and hence avoiding the false-positive error. Signed-off-by: Tamseel Shams <m.shams@samsung.com> --- Commit message is changed. Addressed Krzysztof's previous comment. drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 6ef614d8648c..c44582011b9b 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1911,7 +1911,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport->tx_irq = ret + 1; } - ret = platform_get_irq(platdev, 1); + ret = platform_get_irq_optional(platdev, 1); if (ret > 0) ourport->tx_irq = ret; /* -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: [PATCH v4] serial: samsung: change to platform_get_irq_optional 2021-06-21 4:47 ` [PATCH v4] serial: samsung: change to platform_get_irq_optional Tamseel Shams @ 2021-06-21 5:26 ` M Tamseel Shams 0 siblings, 0 replies; 4+ messages in thread From: M Tamseel Shams @ 2021-06-21 5:26 UTC (permalink / raw) To: kgene, krzk, gregkh, jslaby Cc: linux-arm-kernel, linux-samsung-soc, linux-serial, linux-kernel, alim.akhtar, ajaykumar.rs > -----Original Message----- > From: Tamseel Shams <m.shams@samsung.com> > Sent: Monday, June 21, 2021 10:18 AM > To: kgene@kernel.org; krzk@kernel.org; gregkh@linuxfoundation.org; > jslaby@suse.com > Cc: linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; > linux-serial@vger.kernel.org; linux-kernel@vger.kernel.org; > alim.akhtar@samsung.com; ajaykumar.rs@samsung.com; Tamseel Shams > <m.shams@samsung.com> > Subject: [PATCH v4] serial: samsung: change to platform_get_irq_optional > > In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having > 2 interrupt lines. > However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 > UART is having only 1 interrupt line. Due to this, "platform_get_irq(platdev, 1)" > call in the driver gives the following false-positive error: > "IRQ index 1 not found" on recent platforms. > > This patch replaces the platform_get_irq() call with > platform_get_irq_optional() and hence avoiding the false-positive error. > > Signed-off-by: Tamseel Shams <m.shams@samsung.com> > --- > Commit message is changed. > Addressed Krzysztof's previous comment. > > drivers/tty/serial/samsung_tty.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c > index 6ef614d8648c..c44582011b9b 100644 > --- a/drivers/tty/serial/samsung_tty.c > +++ b/drivers/tty/serial/samsung_tty.c > @@ -1911,7 +1911,7 @@ static int s3c24xx_serial_init_port(struct > s3c24xx_uart_port *ourport, > ourport->tx_irq = ret + 1; > } > > - ret = platform_get_irq(platdev, 1); > + ret = platform_get_irq_optional(platdev, 1); > if (ret > 0) > ourport->tx_irq = ret; > /* > -- > Please ignore this patch. Sorry for the spam. Thanks & Regards, Tamseel Shams ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <CGME20200713141655epcas5p2cdd83477e4fc024457a2b08d8ebfbad0@epcas5p2.samsung.com>]
* [PATCH v4] serial: samsung: change to platform_get_irq_optional [not found] <CGME20200713141655epcas5p2cdd83477e4fc024457a2b08d8ebfbad0@epcas5p2.samsung.com> @ 2020-07-13 13:55 ` Tamseel Shams 2020-07-21 8:04 ` Krzysztof Kozlowski 0 siblings, 1 reply; 4+ messages in thread From: Tamseel Shams @ 2020-07-13 13:55 UTC (permalink / raw) To: kgene, krzk, gregkh, jslaby Cc: linux-arm-kernel, linux-samsung-soc, linux-serial, linux-kernel, alim.akhtar, Tamseel Shams In few older Samsung SoCs like s3c2410, s3c2412 and s3c2440, UART IP is having 2 interrupt lines. However, in other SoCs like s3c6400, s5pv210, exynos5433, and exynos4210 UART is having only 1 interrupt line. Due to this, "platform_get_irq(platdev, 1)" call in the driver gives the following false-positive error: "IRQ index 1 not found" on recent platforms. This patch replaces the platform_get_irq() call with platform_get_irq_optional() and hence avoiding the false-positive error. Signed-off-by: Tamseel Shams <m.shams@samsung.com> --- Commit message is changed. Addressed Krzysztof's previous comment. drivers/tty/serial/samsung_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/samsung_tty.c b/drivers/tty/serial/samsung_tty.c index 6ef614d8648c..c44582011b9b 100644 --- a/drivers/tty/serial/samsung_tty.c +++ b/drivers/tty/serial/samsung_tty.c @@ -1911,7 +1911,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport, ourport->tx_irq = ret + 1; } - ret = platform_get_irq(platdev, 1); + ret = platform_get_irq_optional(platdev, 1); if (ret > 0) ourport->tx_irq = ret; /* -- 2.17.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4] serial: samsung: change to platform_get_irq_optional 2020-07-13 13:55 ` Tamseel Shams @ 2020-07-21 8:04 ` Krzysztof Kozlowski 0 siblings, 0 replies; 4+ messages in thread From: Krzysztof Kozlowski @ 2020-07-21 8:04 UTC (permalink / raw) To: Tamseel Shams Cc: kgene, gregkh, jslaby, linux-arm-kernel, linux-samsung-soc, linux-serial, linux-kernel, alim.akhtar On Mon, Jul 13, 2020 at 07:25:31PM +0530, Tamseel Shams wrote: > In few older Samsung SoCs like s3c2410, s3c2412 > and s3c2440, UART IP is having 2 interrupt lines. > However, in other SoCs like s3c6400, s5pv210, > exynos5433, and exynos4210 UART is having only 1 > interrupt line. Due to this, "platform_get_irq(platdev, 1)" > call in the driver gives the following false-positive error: > "IRQ index 1 not found" on recent platforms. > > This patch replaces the platform_get_irq() call with > platform_get_irq_optional() and hence avoiding the > false-positive error. The error is not a false positive on S3C platforms, but a real error. The existing code did not handle missing TX IRQ but at least printed a message. Your change hides the message. The real problem here is a missing error handling for TX interrupt. Solving this one, would solve also false-positive error message on newer SoCs. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-06-21 5:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20210621044400epcas5p40368077e77d2da219db8f890dfd69f7c@epcas5p4.samsung.com> 2021-06-21 4:47 ` [PATCH v4] serial: samsung: change to platform_get_irq_optional Tamseel Shams 2021-06-21 5:26 ` M Tamseel Shams [not found] <CGME20200713141655epcas5p2cdd83477e4fc024457a2b08d8ebfbad0@epcas5p2.samsung.com> 2020-07-13 13:55 ` Tamseel Shams 2020-07-21 8:04 ` Krzysztof Kozlowski
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).