linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neeraj Upadhyay <neeraju@codeaurora.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Timur Tabi <timur@codeaurora.org>,
	MSM <linux-arm-msm@vger.kernel.org>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Srinivas Ramana <sramana@codeaurora.org>
Subject: Re: [PATCH v2] pinctrl: qcom: Add irq_enable callback for msm gpio
Date: Tue, 25 Jun 2019 15:59:13 +0530	[thread overview]
Message-ID: <c9eb6bfc-a8d1-75df-159b-3f2304fdb8ea@codeaurora.org> (raw)
In-Reply-To: <CACRpkdZ4BoZzX7pVw4HYBzSMvhnyu_oVNoiiLk3ME05nnG1T3Q@mail.gmail.com>


On 6/25/19 2:28 PM, Linus Walleij wrote:
> On Mon, Jun 17, 2019 at 11:35 AM Neeraj Upadhyay <neeraju@codeaurora.org> wrote:
>
>> From: Srinivas Ramana <sramana@codeaurora.org>
>>
>> Introduce the irq_enable callback which will be same as irq_unmask
>> except that it will also clear the status bit before unmask.
>>
>> This will help in clearing any erroneous interrupts that would
>> have got latched when the interrupt is not in use.
>>
>> There may be devices like UART which can use the same gpio line
>> for data rx as well as a wakeup gpio when in suspend. The data that
>> was flowing on the line may latch the interrupt and when we enable
>> the interrupt before going to suspend, this would trigger the
>> unexpected interrupt. This change helps clearing the interrupt
>> so that these unexpected interrupts gets cleared.
>>
>> Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
>> Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
> Overall this looks good to me, waiting for Bjorn's review.
>
>> Changes since v1:
>> - Extracted common code into __msm_gpio_irq_unmask().
> Please don't name functions __like __that.
>
>> -static void msm_gpio_irq_unmask(struct irq_data *d)
>> +static void __msm_gpio_irq_unmask(struct irq_data *d, bool status_clear)
> Instead of __unclear __underscore __semantic use something
> really descriptive like
>
> static void msm_gpio_irq_clear_irq()
>
> That is what it does, right?

Is below ok? as it clears (if status_clear set) and then unmasks irq

static void msm_gpio_irq_clear_unmask()

>
> Other than that it looks fine.
>
> Yours,
> Linus Walleij

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


  reply	other threads:[~2019-06-25 10:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17  9:34 [PATCH v2] pinctrl: qcom: Add irq_enable callback for msm gpio Neeraj Upadhyay
2019-06-25  8:58 ` Linus Walleij
2019-06-25 10:29   ` Neeraj Upadhyay [this message]
2019-06-25 12:18     ` Linus Walleij

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=c9eb6bfc-a8d1-75df-159b-3f2304fdb8ea@codeaurora.org \
    --to=neeraju@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --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=sboyd@codeaurora.org \
    --cc=sramana@codeaurora.org \
    --cc=timur@codeaurora.org \
    /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 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).