All of lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <masneyb@onstation.org>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org,
	Bartosz Golaszewski <bgolaszewski@baylibre.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <marc.zyngier@arm.com>,
	Lina Iyer <ilina@codeaurora.org>,
	Jon Hunter <jonathanh@nvidia.com>,
	Sowjanya Komatineni <skomatineni@nvidia.com>,
	Bitan Biswas <bbiswas@nvidia.com>,
	linux-tegra@vger.kernel.org, David Daney <david.daney@cavium.com>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH 1/4 v1] gpio: Add support for hierarchical IRQ domains
Date: Mon, 8 Jul 2019 22:37:31 -0400	[thread overview]
Message-ID: <20190709023731.GA7401@onstation.org> (raw)
In-Reply-To: <20190624132531.6184-1-linus.walleij@linaro.org>

Hi Linus,

On Mon, Jun 24, 2019 at 03:25:28PM +0200, Linus Walleij wrote:
> +associated irqdomain and resource allocation callbacks. These are activated
> +by selecting the Kconfig symbol GPIOLIB_IRQCHIP. If the symbol
> +IRQ_DOMAIN_HIERARCHY is also selected, hierarchical helpers will also be
> +provided. A big portion of overhead code will be managed by gpiolib,
> +under the assumption that your interrupts are 1-to-1-mapped to the
> +GPIO line index:
> +
> +  GPIO line offset   Hardware IRQ
> +  0                  0
> +  1                  1
> +  2                  2
> +  ...                ...
> +  ngpio-1            ngpio-1
> +
> +If some GPIO lines do not have corresponding IRQs, the bitmask valid_mask
> +and the flag need_valid_mask in gpio_irq_chip can be used to mask off some
> +lines as invalid for associating with IRQs.

I forgot to call out in my patch series that the GPIOs are numbered
1..ngpio on Qualcomm and the existing to_irq and translate callbacks
in mainline take care of adding and subtracting one to / from the
offset.

I was under the (false?) assumption that GPIO numbering on all platforms
start at one. Is that not the case?

Brian

  parent reply	other threads:[~2019-07-09  2:37 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-24 13:25 [PATCH 1/4 v1] gpio: Add support for hierarchical IRQ domains Linus Walleij
2019-06-24 13:25 ` [PATCH 2/4 v1] gpio: ixp4xx: Convert to hieararchical GPIOLIB_IRQCHIP Linus Walleij
2019-06-24 13:25 ` [PATCH 3/4 v1] RFT: gpio: thunderx: Switch to GPIOLIB_IRQCHIP Linus Walleij
2019-06-24 13:25 ` [PATCH 4/4 v1] RFT: gpio: uniphier: " Linus Walleij
2019-07-18 11:09   ` Masahiro Yamada
2019-08-08 11:57     ` Linus Walleij
2019-06-26 21:09 ` [PATCH 1/4 v1] gpio: Add support for hierarchical IRQ domains Lina Iyer
2019-06-28  9:14   ` Linus Walleij
2019-06-28 15:58     ` Lina Iyer
2019-07-03  6:33       ` Linus Walleij
2019-06-27 20:44 ` Lina Iyer
2019-06-28 10:43 ` Brian Masney
2019-06-28 11:11   ` Linus Walleij
2019-07-03  9:22 ` Brian Masney
2019-07-03 12:39   ` Linus Walleij
2019-07-07  1:46 ` Brian Masney
2019-07-07  8:09   ` Linus Walleij
2019-07-09  2:37 ` Brian Masney [this message]
2019-07-18 11:12 ` Masahiro Yamada
2019-08-07 14:43   ` Linus Walleij
2019-08-07 15:00     ` Marc Zyngier

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=20190709023731.GA7401@onstation.org \
    --to=masneyb@onstation.org \
    --cc=bbiswas@nvidia.com \
    --cc=bgolaszewski@baylibre.com \
    --cc=david.daney@cavium.com \
    --cc=ilina@codeaurora.org \
    --cc=jonathanh@nvidia.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --cc=skomatineni@nvidia.com \
    --cc=tglx@linutronix.de \
    --cc=treding@nvidia.com \
    --cc=yamada.masahiro@socionext.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 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.