linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Alexandre Courbot <acourbot@nvidia.com>,
	Lars Poeschel <poeschel@lemonage.de>,
	Octavian Purdila <octavian.purdila@intel.com>,
	Daniel Baluta <daniel.baluta@intel.com>,
	Bin Gao <bin.gao@linux.intel.com>,
	Ajay Thomas <ajay.thomas.david.rajamanickam@intel.com>,
	Semen Protsenko <semen.protsenko@globallogic.com>,
	Alexander Stein <alexander.stein@systec-electronic.com>,
	Phil Reid <preid@electromag.com.au>,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Patrice Chotard <patrice.chotard@st.com>
Subject: Re: [PATCH 1/2] gpio: simplify adding threaded interrupts
Date: Fri, 25 Nov 2016 16:33:37 +0200	[thread overview]
Message-ID: <20161125143337.GO1476@lahna.fi.intel.com> (raw)
In-Reply-To: <1479991133-24153-1-git-send-email-linus.walleij@linaro.org>

On Thu, Nov 24, 2016 at 01:38:53PM +0100, Linus Walleij wrote:
> This tries to simplify the use of CONFIG_GPIOLIB_IRQCHIP when
> using threaded interrupts: add a new call
> gpiochip_irqchip_add_nested() to indicate that we're dealing
> with a nested rather than a chained irqchip, then create a
> separate gpiochip_set_nested_irqchip() to mirror
> the gpiochip_set_chained_irqchip() call to connect the
> parent and child interrupts.
> 
> In the nested case gpiochip_set_nested_irqchip() does nothing
> more than call irq_set_parent() on each valid child interrupt,
> which has little semantic effect in the kernel, but this is
> probably still formally correct.
> 
> Update all drivers using nested interrupts to use
> gpiochip_irqchip_add_nested() so we can now see clearly
> which these users are.
> 
> The DLN2 driver can drop its specific hack with
> .irq_not_threaded as we now recognize whether a chip is
> threaded or not from its use of gpiochip_irqchip_add_nested()
> signature rather than from inspecting .can_sleep.
> 
> We rename the .irq_parent to .irq_chained_parent since this
> parent IRQ is only really kept around for the chained
> interrupt handlers.
> 
> Cc: Lars Poeschel <poeschel@lemonage.de>
> Cc: Octavian Purdila <octavian.purdila@intel.com>
> Cc: Daniel Baluta <daniel.baluta@intel.com>
> Cc: Bin Gao <bin.gao@linux.intel.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

I like this change because now you can immediately see from a driver
which kind of interrupt we are dealing with.

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

  reply	other threads:[~2016-11-25 14:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-24 12:38 [PATCH 1/2] gpio: simplify adding threaded interrupts Linus Walleij
2016-11-25 14:33 ` Mika Westerberg [this message]
2016-11-30 14:20 ` Alexander Stein
2016-11-30 21:22   ` Linus Walleij
2017-01-05 20:36   ` Grygorii Strashko

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=20161125143337.GO1476@lahna.fi.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=acourbot@nvidia.com \
    --cc=ajay.thomas.david.rajamanickam@intel.com \
    --cc=alexander.stein@systec-electronic.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=bin.gao@linux.intel.com \
    --cc=daniel.baluta@intel.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=octavian.purdila@intel.com \
    --cc=patrice.chotard@st.com \
    --cc=poeschel@lemonage.de \
    --cc=preid@electromag.com.au \
    --cc=semen.protsenko@globallogic.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).