linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andy@kernel.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Kane Chen <kane.chen@intel.com>
Subject: Re: [PATCH v1 1/1] pinctrl: intel: Fix a glitch when updating IRQ flags on a preconfigured line
Date: Mon, 24 Jan 2022 15:36:55 +0200	[thread overview]
Message-ID: <Ye6rd3UzmLoMWq7S@smile.fi.intel.com> (raw)
In-Reply-To: <YekS9O5Xhl6VL9GM@lahna>

On Thu, Jan 20, 2022 at 09:44:52AM +0200, Mika Westerberg wrote:
> On Wed, Jan 19, 2022 at 08:19:15PM +0200, Andy Shevchenko wrote:
> > The commit af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer
> > when switching to GPIO") hadn't taken into account an update of the IRQ
> > flags scenario.
> > 
> > When updating the IRQ flags on the preconfigured line the ->irq_set_type()
> > is called again. In such case the sequential Rx buffer configuration
> > changes may trigger a falling or rising edge interrupt that may lead,
> > on some platforms, to an undesired event.
> > 
> > This may happen because each of intel_gpio_set_gpio_mode() and
> > __intel_gpio_set_direction() updates the pad configuration with a different
> > value of the GPIORXDIS bit. Notable, that the intel_gpio_set_gpio_mode() is
> > called only for the pads that are configured as an input. Due to this fact,
> > integrate the logic of __intel_gpio_set_direction() call into the
> > intel_gpio_set_gpio_mode() so that the Rx buffer won't be disabled and
> > immediately re-enabled.
> > 
> > Fixes: af7e3eeb84e2 ("pinctrl: intel: Disable input and output buffer when switching to GPIO")
> > Reported-by: Kane Chen <kane.chen@intel.com>
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
> 
> Please mark this for stable too.

Pushed to my review and testing queue with the Grace Kao's tag, thanks!

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2022-01-24 13:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 18:19 [PATCH v1 1/1] pinctrl: intel: Fix a glitch when updating IRQ flags on a preconfigured line Andy Shevchenko
2022-01-20  7:44 ` Mika Westerberg
2022-01-24 13:36   ` Andy Shevchenko [this message]

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=Ye6rd3UzmLoMWq7S@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=kane.chen@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mika.westerberg@linux.intel.com \
    /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).