All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Boris Brezillon <boris.brezillon@free-electrons.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-pwm@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v3] ARM: at91: Document new TCB bindings
Date: Mon, 4 Jul 2016 14:11:27 +0200	[thread overview]
Message-ID: <20160704121127.GG20045@piout.net> (raw)
In-Reply-To: <20160704140358.53ea7ad7@bbrezillon>

On 04/07/2016 at 14:03:58 +0200, Boris Brezillon wrote :
> On Mon, 4 Jul 2016 12:36:31 +0200
> Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:
> 
> > On 04/07/2016 at 12:24:52 +0200, Boris Brezillon wrote :
> > > On Fri,  1 Jul 2016 23:52:05 +0200
> > > Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:  
> > > > +One interrupt per TC block:
> > > > +	tcb0: timer@fff7c000 {
> > > > +		compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
> > > > +		#address-cells = <1>;
> > > > +		#size-cells = <0>;
> > > > +		reg = <0xfff7c000 0x100>;
> > > > +		interrupts = <18 4>;
> > > > +		clocks = <&tcb0_clk>, <&clk32k>;
> > > > +		clock-names = "t0_clk", "slow_clk";
> > > > +
> > > > +		timer@0 {
> > > > +			compatible = "atmel,tcb-timer";
> > > > +			reg = <0>, <1>;
> > > > +		};
> > > > +
> > > > +		timer@2 {
> > > > +			compatible = "atmel,tcb-timer";
> > > > +			reg = <2>;
> > > > +		};  
> > > 
> > > And how can you differentiate the clocksource from the clkevent?
> > >   
> > 
> > It doesn't really matter actually, I'll do the selection in the driver,
> > as suggested by Rob.
> > 
> 
> Yes, I've read Rob's review, but then what's the point of defining 2
> timer nodes, just do the detection based on the number of channels
> you've reserved for the timer and define a single node.

I agree this is a really hypothetical use case but one may want to have
the clocksource on one TCB and the clockevent on another. This would
allow to have for example a quadrature decoder and the clocksource on
one TCB and another quadrature decoder and the clockevent device on
another TCB.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: alexandre.belloni@free-electrons.com (Alexandre Belloni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ARM: at91: Document new TCB bindings
Date: Mon, 4 Jul 2016 14:11:27 +0200	[thread overview]
Message-ID: <20160704121127.GG20045@piout.net> (raw)
In-Reply-To: <20160704140358.53ea7ad7@bbrezillon>

On 04/07/2016 at 14:03:58 +0200, Boris Brezillon wrote :
> On Mon, 4 Jul 2016 12:36:31 +0200
> Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:
> 
> > On 04/07/2016 at 12:24:52 +0200, Boris Brezillon wrote :
> > > On Fri,  1 Jul 2016 23:52:05 +0200
> > > Alexandre Belloni <alexandre.belloni@free-electrons.com> wrote:  
> > > > +One interrupt per TC block:
> > > > +	tcb0: timer at fff7c000 {
> > > > +		compatible = "atmel,at91rm9200-tcb", "simple-mfd", "syscon";
> > > > +		#address-cells = <1>;
> > > > +		#size-cells = <0>;
> > > > +		reg = <0xfff7c000 0x100>;
> > > > +		interrupts = <18 4>;
> > > > +		clocks = <&tcb0_clk>, <&clk32k>;
> > > > +		clock-names = "t0_clk", "slow_clk";
> > > > +
> > > > +		timer at 0 {
> > > > +			compatible = "atmel,tcb-timer";
> > > > +			reg = <0>, <1>;
> > > > +		};
> > > > +
> > > > +		timer at 2 {
> > > > +			compatible = "atmel,tcb-timer";
> > > > +			reg = <2>;
> > > > +		};  
> > > 
> > > And how can you differentiate the clocksource from the clkevent?
> > >   
> > 
> > It doesn't really matter actually, I'll do the selection in the driver,
> > as suggested by Rob.
> > 
> 
> Yes, I've read Rob's review, but then what's the point of defining 2
> timer nodes, just do the detection based on the number of channels
> you've reserved for the timer and define a single node.

I agree this is a really hypothetical use case but one may want to have
the clocksource on one TCB and the clockevent on another. This would
allow to have for example a quadrature decoder and the clocksource on
one TCB and another quadrature decoder and the clockevent device on
another TCB.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2016-07-04 12:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-01 21:52 [PATCH v3] ARM: at91: Document new TCB bindings Alexandre Belloni
2016-07-01 21:52 ` Alexandre Belloni
2016-07-04 10:24 ` Boris Brezillon
2016-07-04 10:24   ` Boris Brezillon
2016-07-04 10:36   ` Alexandre Belloni
2016-07-04 10:36     ` Alexandre Belloni
2016-07-04 12:03     ` Boris Brezillon
2016-07-04 12:03       ` Boris Brezillon
2016-07-04 12:11       ` Alexandre Belloni [this message]
2016-07-04 12:11         ` Alexandre Belloni
2016-07-04 12:17         ` Boris Brezillon
2016-07-04 12:17           ` Boris Brezillon

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=20160704121127.GG20045@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=boris.brezillon@free-electrons.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.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.