From: Lina Iyer <ilina@codeaurora.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>,
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>,
Brian Masney <masneyb@onstation.org>,
Thierry Reding <treding@nvidia.com>
Subject: Re: [PATCH 1/4 v1] gpio: Add support for hierarchical IRQ domains
Date: Thu, 27 Jun 2019 14:44:31 -0600 [thread overview]
Message-ID: <20190627204431.GA24030@codeaurora.org> (raw)
In-Reply-To: <20190624132531.6184-1-linus.walleij@linaro.org>
On Mon, Jun 24 2019 at 07:29 -0600, Linus Walleij wrote:
>+static const struct irq_domain_ops gpiochip_hierarchy_domain_ops = {
>+ .activate = gpiochip_irq_domain_activate,
>+ .deactivate = gpiochip_irq_domain_deactivate,
>+ .translate = gpiochip_hierarchy_irq_domain_translate,
>+ .alloc = gpiochip_hierarchy_irq_domain_alloc,
>+ .free = irq_domain_free_irqs_common,
>+};
>+
>+static int gpiochip_hierarchy_add_domain(struct gpio_chip *gc)
>+{
>+ if (!gc->irq.parent_domain) {
>+ chip_err(gc, "missing parent irqdomain\n");
>+ return -EINVAL;
>+ }
>+
>+ if (!gc->irq.parent_domain ||
>+ !gc->irq.child_to_parent_hwirq ||
>+ !gc->irq.fwnode) {
>+ chip_err(gc, "missing irqdomain vital data\n");
>+ return -EINVAL;
>+ }
>+
>+ gc->irq.domain = irq_domain_create_hierarchy(
>+ gc->irq.parent_domain,
>+ IRQ_DOMAIN_FLAG_HIERARCHY,
>+ gc->ngpio,
>+ gc->irq.fwnode,
>+ &gpiochip_hierarchy_domain_ops,
This should probably be used only if gc->irq.domain_ops is not set.
>+ gc);
>+
>+ if (!gc->irq.domain) {
>+ chip_err(gc, "failed to add hierarchical domain\n");
>+ return -EINVAL;
>+ }
>+
>+ gpiochip_set_hierarchical_irqchip(gc, gc->irq.chip);
>+
>+ chip_info(gc, "set up hierarchical irqdomain\n");
>+
>+ return 0;
>+}
>+
Thanks,
Lina
next prev parent reply other threads:[~2019-06-27 20:44 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 [this message]
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
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=20190627204431.GA24030@codeaurora.org \
--to=ilina@codeaurora.org \
--cc=bbiswas@nvidia.com \
--cc=bgolaszewski@baylibre.com \
--cc=david.daney@cavium.com \
--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=masneyb@onstation.org \
--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.