All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Conor Dooley <conor@kernel.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Yoshinori Sato <ysato@users.sourceforge.jp>,
	devicetree@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	linux-sh@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: timer: renesas,tmu: Document input capture interrupt
Date: Mon, 15 Jan 2024 19:08:07 +0200	[thread overview]
Message-ID: <20240115170807.GJ5869@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAMuHMdWY3D45NGHvGXSZRLZz4TyCRgRCQLZV6CzYs=mSFcherw@mail.gmail.com>

On Mon, Jan 15, 2024 at 05:48:18PM +0100, Geert Uytterhoeven wrote:
> Hi Conor,
> 
> On Mon, Jan 15, 2024 at 5:13 PM Conor Dooley <conor@kernel.org> wrote:
> > On Mon, Jan 15, 2024 at 02:45:39PM +0100, Geert Uytterhoeven wrote:
> > > Some Timer Unit (TMU) instances with 3 channels support a fourth
> > > interrupt: an input capture interrupt for the third channel.
> > >
> > > While at it, document the meaning of the four interrupts, and add
> > > "interrupt-names" for clarity.
> > >
> > > Update the example to match reality.
> > >
> > > Inspired by a patch by Yoshinori Sato for SH.
> > >
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> 
> > > --- a/Documentation/devicetree/bindings/timer/renesas,tmu.yaml
> > > +++ b/Documentation/devicetree/bindings/timer/renesas,tmu.yaml
> > > @@ -46,7 +46,19 @@ properties:
> > >
> > >    interrupts:
> > >      minItems: 2
> > > -    maxItems: 3
> > > +    items:
> > > +      - description: Underflow interrupt 0
> > > +      - description: Underflow interrupt 1
> > > +      - description: Underflow interrupt 2
> > > +      - description: Input capture interrupt 2
> >
> > Seeing "input capture interrupt 2" makes me wonder, are there two (or
> > more!) other input capture interrupts that are still out there,
> > undocumented, and looking for a home?

Maybe writing this as

      - description: Underflow interrupt, channel 0
      - description: Underflow interrupt, channel 1
      - description: Underflow interrupt, channel 2
      - description: Input capture interrupt, channel 2

would make it clearer ?

I'm also wondering if we really need to add interrupt-names. Drivers
can't depend on the names due to backward compatibility, what benefit
does it bring to add them to the bindings ?

> SoCs can have multiple TMU instances.
> Each TMU instance has 2 or 3 timer channels.
> Each timer channel has an underflow interrupt.
> Only the third channel may have an optional input capture interrupt
> (which is not supported yet by the Linux driver).
> Hence each instance can have 2, 3, or 4 interrupts.
> 
> See "RZ/G Series, 2nd Generation User's Manual: Hardware"[1],
> Section 69 ("Timer Unit (TMU)":
>   - Figure 69.2: Block Diagram of TMU,
>   - Section 69: Interrupt
> 
> Note that the documentation uses a monotonic increasing numbering
> of the channels, across all instances.
> 
> [1] https://www.renesas.com/us/en/products/microcontrollers-microprocessors/rz-mpus/rzg2h-ultra-high-performance-microprocessors-quad-core-arm-cortex-a57-and-quad-core-arm-cortex-a53-cpus-3d

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2024-01-15 17:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 13:45 [PATCH] dt-bindings: timer: renesas,tmu: Document input capture interrupt Geert Uytterhoeven
2024-01-15 16:13 ` Conor Dooley
2024-01-15 16:48   ` Geert Uytterhoeven
2024-01-15 17:08     ` Laurent Pinchart [this message]
2024-01-16 17:34       ` Conor Dooley
2024-01-16 19:17         ` Geert Uytterhoeven
2024-01-17 14:08         ` Wolfram Sang

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=20240115170807.GJ5869@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=ysato@users.sourceforge.jp \
    /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.