All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maulik Shah <mkshah@codeaurora.org>
To: Stephen Boyd <swboyd@chromium.org>,
	bjorn.andersson@linaro.org, evgreen@chromium.org,
	linus.walleij@linaro.org, maz@kernel.org, mka@chromium.org
Cc: linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-gpio@vger.kernel.org, agross@kernel.org,
	tglx@linutronix.de, jason@lakedaemon.net, dianders@chromium.org,
	rnayak@codeaurora.org, ilina@codeaurora.org,
	lsrao@codeaurora.org
Subject: Re: [PATCH v2 3/4] pinctrl: qcom: Add msmgpio irqchip flags
Date: Wed, 27 May 2020 18:00:57 +0530	[thread overview]
Message-ID: <65c86165-5956-5340-1f40-6426c6aec743@codeaurora.org> (raw)
In-Reply-To: <159057285160.88029.12486371130122290394@swboyd.mtv.corp.google.com>

Hi,

On 5/27/2020 3:17 PM, Stephen Boyd wrote:
> Quoting Maulik Shah (2020-05-23 10:11:12)
>> Add irqchip specific flags for msmgpio irqchip to mask non wakeirqs
>> during suspend and mask before setting irq type.
> Why do we need to mask before setting irq type? Does something go wrong?
> Can you explain in the commit text?

i don't think anything goes wrong but there might be a case where some 
driver changing type at runtime,

masking before changing type should make sure any spurious interrupt is 
not detected during this operation.

>
>> Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
> Does this need a Fixes tag?
Thanks i will add.
>
>> ---
>>   drivers/pinctrl/qcom/pinctrl-msm.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/pinctrl/qcom/pinctrl-msm.c b/drivers/pinctrl/qcom/pinctrl-msm.c
>> index 2419023..b909ffe 100644
>> --- a/drivers/pinctrl/qcom/pinctrl-msm.c
>> +++ b/drivers/pinctrl/qcom/pinctrl-msm.c
>> @@ -1143,6 +1143,8 @@ static int msm_gpio_init(struct msm_pinctrl *pctrl)
>>          pctrl->irq_chip.irq_release_resources = msm_gpio_irq_relres;
>>          pctrl->irq_chip.irq_set_affinity = msm_gpio_irq_set_affinity;
>>          pctrl->irq_chip.irq_set_vcpu_affinity = msm_gpio_irq_set_vcpu_affinity;
>> +       pctrl->irq_chip.flags = IRQCHIP_MASK_ON_SUSPEND
> This is sort of sad. We have to set the IRQCHIP_MASK_ON_SUSPEND flag
> here so that genirq can call the mask op during suspend for the parent
> irqchip (pdc)?
During suspend, suspend_device_irq() will check this flag in msmgpio 
irqchip and then call it to mask if its not marked for wakeup.

in this case, setting this flag will call first invoke gpiolib's 
callback  (we override in first patch of this series), then it goes to 
msmgpio chip's mask callback,

this call will then get forwarded to its parent PDC and then to PDC's 
parent GIC.

This seems the way hierarchical irqchip works. i don't see any issue 
with this.
> Is there some way to not need to do that and instead let
> genirq do mask on suspend at the chip level instead of the irq level?
>
>> +                               | IRQCHIP_SET_TYPE_MASKED;
>>   
>>          np = of_parse_phandle(pctrl->dev->of_node, "wakeup-parent", 0);
>>          if (np) {

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


  reply	other threads:[~2020-05-27 12:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23 17:11 [PATCH v2 0/4] irqchip: qcom: pdc: Introduce irq_set_wake call Maulik Shah
2020-05-23 17:11 ` [PATCH v2 1/4] gpio: gpiolib: Allow GPIO IRQs to lazy disable Maulik Shah
2020-05-25 11:55   ` Linus Walleij
2020-05-25 12:22     ` Hans Verkuil
2020-05-26  4:45       ` Maulik Shah
2020-05-27 10:38     ` Hans Verkuil
2020-05-27 13:56       ` Linus Walleij
2020-05-27 14:15         ` Russell King - ARM Linux admin
2020-05-27  9:44   ` Stephen Boyd
2020-05-27 11:26     ` Maulik Shah
2020-05-28  1:08       ` Stephen Boyd
2020-05-28 13:11         ` Maulik Shah
2020-05-28 22:22           ` Stephen Boyd
2020-05-29  9:57             ` Maulik Shah
2020-05-28 21:33   ` Linus Walleij
     [not found]     ` <159070486671.69627.662167272601689396@swboyd.mtv.corp.google.com>
2020-06-03 12:28       ` Linus Walleij
2020-05-23 17:11 ` [PATCH v2 2/4] pinctrl: qcom: Remove irq_disable callback from msmgpio irqchip Maulik Shah
2020-05-23 17:11 ` [PATCH v2 3/4] pinctrl: qcom: Add msmgpio irqchip flags Maulik Shah
2020-05-27  9:47   ` Stephen Boyd
2020-05-27 12:30     ` Maulik Shah [this message]
2020-05-23 17:11 ` [PATCH v2 4/4] irqchip: qcom-pdc: Introduce irq_set_wake call Maulik Shah
2020-05-27 10:15   ` Stephen Boyd
2020-05-29  9:20     ` Maulik Shah
2020-05-30 19:26       ` Stephen Boyd
2020-06-01 11:38         ` Maulik Shah
2020-06-16 11:57           ` Stephen Boyd
2020-06-18 10:03             ` Maulik Shah
2020-06-19  9:26               ` Stephen Boyd
2020-06-22  9:19                 ` Maulik Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65c86165-5956-5340-1f40-6426c6aec743@codeaurora.org \
    --to=mkshah@codeaurora.org \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=evgreen@chromium.org \
    --cc=ilina@codeaurora.org \
    --cc=jason@lakedaemon.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lsrao@codeaurora.org \
    --cc=maz@kernel.org \
    --cc=mka@chromium.org \
    --cc=rnayak@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.