From: Marc Zyngier <maz@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
Jonathan Corbet <corbet@lwn.net>,
Bartosz Golaszewski <bgolaszewski@baylibre.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH v2 1/5] irqdomain: Introduce irq_domain_create_simple() API
Date: Thu, 04 Mar 2021 18:29:32 +0000 [thread overview]
Message-ID: <87lfb2zsab.wl-maz@kernel.org> (raw)
In-Reply-To: <20210304150215.80652-2-andriy.shevchenko@linux.intel.com>
Andy,
On Thu, 04 Mar 2021 15:02:11 +0000,
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
>
> Linus Walleij pointed out that ird_domain_add_simple() gained
> additional functionality and can't be anymore replaced with
> a simple conditional. In preparation to upgrade GPIO library
> to use fwnode, introduce irq_domain_create_simple() API which is
> functional equivalent to the existing irq_domain_add_simple(),
> but takes a pointer to the struct fwnode_handle as a parameter.
>
> While at it, amend documentation to mention irq_domain_create_*()
> functions where it makes sense.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[...]
> diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
> index 42d196805f58..1d4a8e7c5d5f 100644
> --- a/include/linux/irqdomain.h
> +++ b/include/linux/irqdomain.h
> @@ -265,6 +265,11 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
> unsigned int first_irq,
> const struct irq_domain_ops *ops,
> void *host_data);
> +struct irq_domain *irq_domain_create_simple(struct fwnode_handle *fwnode,
> + unsigned int size,
> + unsigned int first_irq,
> + const struct irq_domain_ops *ops,
> + void *host_data);
> struct irq_domain *irq_domain_add_legacy(struct device_node *of_node,
> unsigned int size,
> unsigned int first_irq,
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index 288151393a06..418548ea13cf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -317,10 +317,20 @@ struct irq_domain *irq_domain_add_simple(struct device_node *of_node,
> unsigned int first_irq,
> const struct irq_domain_ops *ops,
> void *host_data)
> +{
> + return irq_domain_create_simple(of_node_to_fwnode(of_node), size, first_irq, ops, host_data);
> +}
> +EXPORT_SYMBOL_GPL(irq_domain_add_simple);
Please move this as an inline helper in linux/irqdomain.h, so that we
can drop this export altogether.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2021-03-04 18:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 15:02 [PATCH v2 0/5] gpiolib: switch to fwnode in the core Andy Shevchenko
2021-03-04 15:02 ` [PATCH v2 1/5] irqdomain: Introduce irq_domain_create_simple() API Andy Shevchenko
2021-03-04 18:29 ` Marc Zyngier [this message]
2021-03-04 20:13 ` Andy Shevchenko
2021-03-04 15:02 ` [PATCH v2 2/5] gpiolib: Unify the checks on fwnode type Andy Shevchenko
2021-03-04 15:47 ` Andy Shevchenko
2021-03-04 15:02 ` [PATCH v2 3/5] gpiolib: Move of_node operations to gpiolib-of and correct fwnode use Andy Shevchenko
2021-03-04 15:02 ` [PATCH v2 4/5] gpiolib: Introduce acpi_gpio_dev_init() and call it from core Andy Shevchenko
2021-03-04 15:02 ` [PATCH v2 5/5] gpiolib: Reuse device's fwnode to create IRQ domain Andy Shevchenko
2021-03-08 18:32 ` Rafael J. Wysocki
2021-03-08 18:52 ` Andy Shevchenko
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=87lfb2zsab.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=corbet@lwn.net \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael@kernel.org \
--cc=tglx@linutronix.de \
/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.