diff mbox

[V1,11/15] spmi: spmi-pmic-arb: enable the SPMI interrupt as a wakeup source

Message ID 1496147943-25822-12-git-send-email-kgunda@codeaurora.org (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show

Commit Message

Kiran Gunda May 30, 2017, 12:38 p.m. UTC
Currently the SPMI interrupt will not wake the device. Enable this
interrupt as a wakeup source.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
---
 drivers/spmi/spmi-pmic-arb.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Stephen Boyd May 31, 2017, 5:13 p.m. UTC | #1
On 05/30, Kiran Gunda wrote:
> Currently the SPMI interrupt will not wake the device. Enable this
> interrupt as a wakeup source.
> 
> Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
> ---
>  drivers/spmi/spmi-pmic-arb.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
> index 0deac33..2afe359 100644
> --- a/drivers/spmi/spmi-pmic-arb.c
> +++ b/drivers/spmi/spmi-pmic-arb.c
> @@ -1140,6 +1140,7 @@ static int spmi_pmic_arb_probe(struct platform_device *pdev)
>  	}
>  
>  	irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa);
> +	enable_irq_wake(pa->irq);

Why don't we do this through an irq_set_wake callback in the
irqchip? That way, we don't mark this irq as wakeup if any child
irqs aren't marked as wakeup.
Kiran Gunda June 8, 2017, 11:30 a.m. UTC | #2
On 2017-05-31 22:43, Stephen Boyd wrote:
> On 05/30, Kiran Gunda wrote:
>> Currently the SPMI interrupt will not wake the device. Enable this
>> interrupt as a wakeup source.
>> 
>> Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
>> Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
>> ---
>>  drivers/spmi/spmi-pmic-arb.c | 1 +
>>  1 file changed, 1 insertion(+)
>> 
>> diff --git a/drivers/spmi/spmi-pmic-arb.c 
>> b/drivers/spmi/spmi-pmic-arb.c
>> index 0deac33..2afe359 100644
>> --- a/drivers/spmi/spmi-pmic-arb.c
>> +++ b/drivers/spmi/spmi-pmic-arb.c
>> @@ -1140,6 +1140,7 @@ static int spmi_pmic_arb_probe(struct 
>> platform_device *pdev)
>>  	}
>> 
>>  	irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa);
>> +	enable_irq_wake(pa->irq);
> 
> Why don't we do this through an irq_set_wake callback in the
> irqchip? That way, we don't mark this irq as wakeup if any child
> irqs aren't marked as wakeup.
Yes. This looks cleaner. Will change it in the subsequent patch.
--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index 0deac33..2afe359 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -1140,6 +1140,7 @@  static int spmi_pmic_arb_probe(struct platform_device *pdev)
 	}
 
 	irq_set_chained_handler_and_data(pa->irq, pmic_arb_chained_irq, pa);
+	enable_irq_wake(pa->irq);
 
 	err = spmi_controller_add(ctrl);
 	if (err)