All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Magnus Damm <magnus.damm@gmail.com>,
	linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH/RFC] drivers/irqchip: add irq-inverter
Date: Thu, 30 Dec 2021 11:25:46 +0000	[thread overview]
Message-ID: <87czlez64l.wl-maz@kernel.org> (raw)
In-Reply-To: <9df5e85b-79e6-b796-e5ce-bc47d2cbed67@cogentembedded.com>

On Thu, 30 Dec 2021 10:53:30 +0000,
Nikita Yushchenko <nikita.yoush@cogentembedded.com> wrote:
> 
> >>>>> The right way to do it is to use the existing API by exposing the
> >>>>> inverter (there are existing examples in the tree, using the
> >>>>> hierarchical model)...
> >>> 
> >>> A much simpler version can be written in a few minutes, see below...
> >> 
> >> Can something like that be used if the parent domain is not
> >> hierarchical (i.e. does not provide alloc(), but provides map()
> >> instead)?
> > 
> > No. This definitely relies on the parent being hierarchical, as that's
> > exactly what it was designed for the first place.
> 
> Is supporting hierarchical API now mandatory for kernel irqchips?

It isn't. But you are definitely giving me some ideas now.

> 
> If yes, then perhaps you can at least document it somewhere?
> E.g. declare irq_domain.map() as deprecated?
> 
> If no, then I'd like to discuss a solution for irq_inverter that can
> work for non-hierarchical case.

You are still missing the point. Any active element on the interrupt
path that changes the signal without multiplexing must be described in
the hierarchical model. Anything else is wrong, and I am not
interested in reinventing that particular wheel (it was painful enough
to kill all these hacks years ago, and I'm not doing it again).

Moving these GPIO chips into the hierarchical model isn't rocket
science, as there is plenty of support for that already, and is the
right thing to do.

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2021-12-30 11:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 16:56 [PATCH/RFC] drivers/irqchip: add irq-inverter Nikita Yushchenko
2021-12-28 18:18 ` Marc Zyngier
2021-12-28 19:03   ` Nikita Yushchenko
2021-12-29 11:01     ` Marc Zyngier
2021-12-29 19:52       ` Nikita Yushchenko
2021-12-30 10:34         ` Marc Zyngier
2021-12-30 10:53           ` Nikita Yushchenko
2021-12-30 11:25             ` Marc Zyngier [this message]
2021-12-28 19:04 ` Geert Uytterhoeven
2021-12-28 20:00   ` Nikita Yushchenko

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=87czlez64l.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=magnus.damm@gmail.com \
    --cc=nikita.yoush@cogentembedded.com \
    --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.