Linux-ARM-Kernel Archive on
 help / color / Atom feed
From: Linus Walleij <>
To: Thomas Petazzoni <>
Cc: Bartosz Golaszewski <>,
	"" <>,
	Michal Simek <>,
	Linux ARM <>,
	"open list:GPIO SUBSYSTEM" <>
Subject: Re: [PATCH] gpio: zynq: properly support runtime PM for GPIO used as interrupts
Date: Wed, 13 Feb 2019 10:37:55 +0100
Message-ID: <> (raw)
In-Reply-To: <>

On Fri, Feb 8, 2019 at 11:40 AM Thomas Petazzoni
<> wrote:

> The Zynq GPIO driver currently implements runtime PM by:
>  - Enabling runtime PM support in ->probe() and letting the runtime PM
>    reference counter drop to zero at the end of ->probe().
>  - Increasing the runtime PM reference counter in ->request() and
>    decreasing it in ->free().
> However, the latter is not sufficient: when a GPIO is used as an
> interrupt, ->request() and ->free() are not called. Due to this, the
> runtime PM counter remains to zero when the only GPIOs in use are used
> as interrupts, causing them to simply not work.
> To address this problem, this commit implement the
> ->irq_request_resources() and ->irq_release_resources() hooks,
> ensuring that the runtime PM counter is properly
> incremented/decremented. Since we override the default hooks, we keep
> the existing behavior by making sure they call gpiochip_reqres_irq() /
> gpiochip_relres_irq() respectively.
> Signed-off-by: Thomas Petazzoni <>

Patch applied with Shubhrajyoti's review tag.

Linus Walleij

linux-arm-kernel mailing list

      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 10:40 Thomas Petazzoni
2019-02-11 13:36 ` Shubhrajyoti Datta
2019-02-13  9:37 ` Linus Walleij [this message]

Reply instructions:

You may reply publically 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:

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

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-ARM-Kernel Archive on

Archives are clonable:
	git clone --mirror linux-arm-kernel/git/0.git
	git clone --mirror linux-arm-kernel/git/1.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-arm-kernel linux-arm-kernel/ \
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone