Linux-Watchdog Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq
@ 2019-12-13  6:49 Sai Prakash Ranjan
  2019-12-13  7:15 ` Bjorn Andersson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sai Prakash Ranjan @ 2019-12-13  6:49 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Guenter Roeck, Stephen Boyd,
	Jorge Ramirez-Ortiz
  Cc: Douglas Anderson, linux-watchdog, Matthias Kaehlcke,
	linux-arm-kernel, linux-kernel, linux-arm-msm,
	Sai Prakash Ranjan

platform_get_irq() prints an error message when the interrupt
is not available. So on platforms where bark interrupt is
not specified, following error message is observed on SDM845.

[    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found

This is also seen on SC7180, SM8150 SoCs as well.
Fix this by using platform_get_irq_optional() instead.

Fixes: 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
---
 drivers/watchdog/qcom-wdt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
index a494543d3ae1..eb47fe5ed280 100644
--- a/drivers/watchdog/qcom-wdt.c
+++ b/drivers/watchdog/qcom-wdt.c
@@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
 	}
 
 	/* check if there is pretimeout support */
-	irq = platform_get_irq(pdev, 0);
+	irq = platform_get_irq_optional(pdev, 0);
 	if (irq > 0) {
 		ret = devm_request_irq(dev, irq, qcom_wdt_isr,
 				       IRQF_TRIGGER_RISING,
-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
of Code Aurora Forum, hosted by The Linux Foundation

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

* Re: [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq
  2019-12-13  6:49 [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq Sai Prakash Ranjan
@ 2019-12-13  7:15 ` Bjorn Andersson
  2019-12-13 13:51 ` Guenter Roeck
  2019-12-16 16:48 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2019-12-13  7:15 UTC (permalink / raw)
  To: Sai Prakash Ranjan
  Cc: Andy Gross, Guenter Roeck, Stephen Boyd, Jorge Ramirez-Ortiz,
	Douglas Anderson, linux-watchdog, Matthias Kaehlcke,
	linux-arm-kernel, linux-kernel, linux-arm-msm

On Thu 12 Dec 22:49 PST 2019, Sai Prakash Ranjan wrote:

> platform_get_irq() prints an error message when the interrupt
> is not available. So on platforms where bark interrupt is
> not specified, following error message is observed on SDM845.
> 
> [    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found
> 
> This is also seen on SC7180, SM8150 SoCs as well.
> Fix this by using platform_get_irq_optional() instead.
> 
> Fixes: 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

> ---
>  drivers/watchdog/qcom-wdt.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
> index a494543d3ae1..eb47fe5ed280 100644
> --- a/drivers/watchdog/qcom-wdt.c
> +++ b/drivers/watchdog/qcom-wdt.c
> @@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
>  	}
>  
>  	/* check if there is pretimeout support */
> -	irq = platform_get_irq(pdev, 0);
> +	irq = platform_get_irq_optional(pdev, 0);
>  	if (irq > 0) {
>  		ret = devm_request_irq(dev, irq, qcom_wdt_isr,
>  				       IRQF_TRIGGER_RISING,
> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation

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

* Re: [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq
  2019-12-13  6:49 [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq Sai Prakash Ranjan
  2019-12-13  7:15 ` Bjorn Andersson
@ 2019-12-13 13:51 ` Guenter Roeck
  2019-12-16 16:48 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Guenter Roeck @ 2019-12-13 13:51 UTC (permalink / raw)
  To: Sai Prakash Ranjan, Andy Gross, Bjorn Andersson, Stephen Boyd,
	Jorge Ramirez-Ortiz
  Cc: Douglas Anderson, linux-watchdog, Matthias Kaehlcke,
	linux-arm-kernel, linux-kernel, linux-arm-msm

On 12/12/19 10:49 PM, Sai Prakash Ranjan wrote:
> platform_get_irq() prints an error message when the interrupt
> is not available. So on platforms where bark interrupt is
> not specified, following error message is observed on SDM845.
> 
> [    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found
> 
> This is also seen on SC7180, SM8150 SoCs as well.
> Fix this by using platform_get_irq_optional() instead.
> 
> Fixes: 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>   drivers/watchdog/qcom-wdt.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/watchdog/qcom-wdt.c b/drivers/watchdog/qcom-wdt.c
> index a494543d3ae1..eb47fe5ed280 100644
> --- a/drivers/watchdog/qcom-wdt.c
> +++ b/drivers/watchdog/qcom-wdt.c
> @@ -246,7 +246,7 @@ static int qcom_wdt_probe(struct platform_device *pdev)
>   	}
>   
>   	/* check if there is pretimeout support */
> -	irq = platform_get_irq(pdev, 0);
> +	irq = platform_get_irq_optional(pdev, 0);
>   	if (irq > 0) {
>   		ret = devm_request_irq(dev, irq, qcom_wdt_isr,
>   				       IRQF_TRIGGER_RISING,
> 


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

* Re: [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq
  2019-12-13  6:49 [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq Sai Prakash Ranjan
  2019-12-13  7:15 ` Bjorn Andersson
  2019-12-13 13:51 ` Guenter Roeck
@ 2019-12-16 16:48 ` Stephen Boyd
  2 siblings, 0 replies; 4+ messages in thread
From: Stephen Boyd @ 2019-12-16 16:48 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Guenter Roeck, Jorge Ramirez-Ortiz,
	Sai Prakash Ranjan
  Cc: Douglas Anderson, linux-watchdog, Matthias Kaehlcke,
	linux-arm-kernel, linux-kernel, linux-arm-msm,
	Sai Prakash Ranjan

Quoting Sai Prakash Ranjan (2019-12-12 22:49:34)
> platform_get_irq() prints an error message when the interrupt
> is not available. So on platforms where bark interrupt is
> not specified, following error message is observed on SDM845.
> 
> [    2.975888] qcom_wdt 17980000.watchdog: IRQ index 0 not found
> 
> This is also seen on SC7180, SM8150 SoCs as well.
> Fix this by using platform_get_irq_optional() instead.
> 
> Fixes: 36375491a4395654 ("watchdog: qcom: support pre-timeout when the bark irq is available")
> Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
> ---

Reviewed-by: Stephen Boyd <swboyd@chromium.org>


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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-13  6:49 [PATCH] watchdog: qcom: Use platform_get_irq_optional() for bark irq Sai Prakash Ranjan
2019-12-13  7:15 ` Bjorn Andersson
2019-12-13 13:51 ` Guenter Roeck
2019-12-16 16:48 ` Stephen Boyd

Linux-Watchdog Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-watchdog/0 linux-watchdog/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-watchdog linux-watchdog/ https://lore.kernel.org/linux-watchdog \
		linux-watchdog@vger.kernel.org
	public-inbox-index linux-watchdog

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-watchdog


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git