linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Ciocaltea <cristian.ciocaltea@gmail.com>
To: Marc Zyngier <maz@kernel.org>
Cc: "Rob Herring" <robh@kernel.org>,
	"Jason Cooper" <jason@lakedaemon.net>,
	devicetree@vger.kernel.org, linux-actions@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Andreas Färber" <afaerber@suse.de>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v5 1/3] dt-bindings: interrupt-controller: Add Actions SIRQ controller binding
Date: Thu, 27 Aug 2020 21:54:56 +0300	[thread overview]
Message-ID: <20200827185456.GA2475396@BV030612LT> (raw)
In-Reply-To: <7de137f820d5a3b7921bda0751509f85@kernel.org>

On Thu, Aug 27, 2020 at 04:42:04PM +0100, Marc Zyngier wrote:
> Cristian,
> 
> On 2020-08-27 16:24, Cristian Ciocaltea wrote:
> > Hi Marc,
> > 
> > On Thu, Aug 27, 2020 at 11:35:06AM +0100, Marc Zyngier wrote:
> > > On 2020-08-27 11:06, Cristian Ciocaltea wrote:
> > > > On Wed, Aug 26, 2020 at 04:48:38PM -0600, Rob Herring wrote:
> > > > > On Wed, Aug 26, 2020 at 3:42 PM Cristian Ciocaltea
> > > > > <cristian.ciocaltea@gmail.com> wrote:
> > > 
> > > [...]
> > > 
> > > > > Ultimately the GIC trigger type has to be
> > > > > something. Is it fixed or passed thru? If the latter, just use 0
> > > > > (IRQ_TYPE_NONE) if the GIC trigger mode is not fixed. Having some sort
> > > > > of translation of the trigger is pretty common.
> > > >
> > > > Yes, as explained above, the SIRQ controller performs indeed the
> > > > translation of the incoming signal. So if I understand correctly, your
> > > > suggestion would be to use the following inside the sirq node:
> > > >
> > > > interrupts = <GIC_SPI 13 IRQ_TYPE_NONE>, /* SIRQ0 */
> > > >              [...]
> > > 
> > > Please don't. If you are describing a GIC interrupt, use a
> > > trigger that actually exists. Given that you have a 1:1
> > > mapping between input and output, just encode the output
> > > trigger that matches the input.
> > 
> > Understood, the only remark here is that internally, the driver will
> > not use this information and instead will continue to rely on the input
> > to properly set the trigger type for the output.
> 
> It's fine. The binding has to be consistent on its own, but
> doesn't dictate the way the driver does thing.
> 
> > The question is if the driver should also emit a warning (or error?)
> > when the trigger type supplied via DT doesn't match the expected value.
> 
> Rob will tell you that the kernel isn't a validation tool for broken
> DTs. Shout if you want, but you are allowed to simply ignore the
> output trigger for example
> 
> > If yes, we should also clarify what the user is supposed to provide in
> > the controller node: the trigger type before the conversion (the input)
> > or the one after the conversion (the output).
> 
> The output of a SIRQ should be compatible with the GIC input it is
> attached to. You can have:
> 
>         device (LEVEL_LOW) -> SIRQ (LEVEL_HIGH) -> GIC
> 
> but you can't have:
> 
>         device (LEVEL_LOW) -> SIRQ (EDGE_RISING) -> GIC
> 
> because that's not an acceptable transformation for the SIRQ,
> nor can you have:
> 
>         device (EDGE_FALLING) -> SIRQ (EDGE_FALLING) -> GIC
> 
> because EDGE_FALLING isn't a valid input for the GIC.
> 
> In both of the invalid cases, you would be free to apply
> which ever transformation actually makes sense, and shout
> at the user if you want to help them debugging their turf.
> The later part is definitely optional.
> 
> Hope this helps,

This certainly helps a lot, now I have a clear understanding of what is
to be done next.

>         M.
> -- 
> Jazz is not dead. It just smells funny...

Many thanks for the detailed explanations,
Cristi

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-08-27 18:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-19 16:37 [PATCH v5 0/3] Add Actions Semi Owl family sirq support Cristian Ciocaltea
2020-08-19 16:37 ` [PATCH v5 1/3] dt-bindings: interrupt-controller: Add Actions SIRQ controller binding Cristian Ciocaltea
2020-08-25 22:09   ` Rob Herring
2020-08-26 21:42     ` Cristian Ciocaltea
2020-08-26 22:48       ` Rob Herring
2020-08-27 10:06         ` Cristian Ciocaltea
2020-08-27 10:35           ` Marc Zyngier
2020-08-27 15:24             ` Cristian Ciocaltea
2020-08-27 15:42               ` Marc Zyngier
2020-08-27 18:54                 ` Cristian Ciocaltea [this message]
2020-08-19 16:37 ` [PATCH v5 2/3] irqchip: Add Actions Semi Owl SIRQ controller Cristian Ciocaltea
2020-08-19 16:37 ` [PATCH v5 3/3] MAINTAINERS: Add entries for " Cristian Ciocaltea
2020-08-22 13:17 ` [PATCH v5 0/3] Add Actions Semi Owl family sirq support Manivannan Sadhasivam
2020-08-22 23:05   ` Cristian Ciocaltea
2020-08-25  2:09     ` Manivannan Sadhasivam
2020-08-25  9:44       ` Cristian Ciocaltea

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=20200827185456.GA2475396@BV030612LT \
    --to=cristian.ciocaltea@gmail.com \
    --cc=afaerber@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=jason@lakedaemon.net \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=maz@kernel.org \
    --cc=robh@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 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).