All of lore.kernel.org
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: "Lee Jones" <lee.jones@linaro.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"linux-pwm@vger.kernel.org" <linux-pwm@vger.kernel.org>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Chris Paterson" <Chris.Paterson2@renesas.com>,
	"Biju Das" <biju.das@bp.renesas.com>,
	"Prabhakar Mahadev Lad" <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>
Subject: RE: [PATCH v7 2/2] pwm: Add support for RZ/G2L GPT
Date: Tue, 11 Oct 2022 11:53:45 +0000	[thread overview]
Message-ID: <OS0PR01MB59223A0E69AAEAB350B609BA86239@OS0PR01MB5922.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <YzVp1t7fMRBv9ISK@orome>

Hi Thierry,

> 
> > > > +	mutex_init(&rzg2l_gpt->lock);
> > > > +
> > > > +	rzg2l_gpt->chip.dev = &pdev->dev;
> > > > +	rzg2l_gpt->chip.ops = &rzg2l_gpt_ops;
> > > > +	rzg2l_gpt->chip.npwm = 2;
> > >
> > > The changelog above mentions that you use a shared reset because
> the
> > > reset is shared between 8 channels, but here you only expose 2.
> > > What's going on there?
> >
> > Each hwchannel has 2 IOs. Each IO is modelled as separate channel.
> > Basically, we have 8 hwchannels * 2 IO's  = 16 pwm channels in
> total.
> >
> > Please correct me if anything wrong here.
> 
> I'm asking because I recently came across a similar driver but where
> the mistake was made to describe the hardware as 4 separate devices
> with 2 channels (or, depending on SoC generation, 1 channel) per
> device.
> Looking at the device tree it's pretty obvious that in that case this
> was really a single device with 8 (or 4, depending) channels. Most of
> the time this doesn't matter and everything works, but then on some HW
> generations all of a sudden you have a shared interrupt for all 8
> channels, and now this becomes really difficult to describe because
> the interrupt needs to be shared between 4 devices, or an extra layer
> is needed to slot in the interrupt somehow.
> 
> So I'm just trying to avoid another such situation. Looking at the DTS
> example from the binding in patch 1, you have gpt4 at 0x10048400 with
> 0x100 bytes. Does gpt3 sit at 0x10048300 with 0x100 bytes? If so, it's
> likely that this is really a single large IP block that you're
> artificially subdividing and that could turn into a similar issue as
> above.

OK, I have modelled as single PWM device with 16 channels
and test results are looks ok.

I will be sending next version soon.

Cheers,
Biju 

  parent reply	other threads:[~2022-10-11 11:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-21 14:57 [PATCH v7 0/2] Add support for RZ/G2L GPT Biju Das
2022-09-21 14:57 ` [PATCH v7 1/2] dt-bindings: pwm: Add RZ/G2L GPT binding Biju Das
2022-09-21 14:57 ` [PATCH v7 2/2] pwm: Add support for RZ/G2L GPT Biju Das
2022-09-28 13:50   ` Thierry Reding
2022-09-28 14:09     ` Geert Uytterhoeven
2022-09-28 17:34     ` Biju Das
2022-09-28 18:07       ` Geert Uytterhoeven
2022-09-28 19:21         ` Biju Das
2022-09-29  9:48       ` Thierry Reding
2022-10-01 14:10         ` Biju Das
2022-10-11 11:53         ` Biju Das [this message]
2022-09-29 17:36   ` Biju Das
2022-09-30  6:34     ` Uwe Kleine-König
2022-09-30  6:51       ` Biju Das
2022-09-30  7:03         ` Uwe Kleine-König
2022-09-30  7:43           ` Biju Das

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=OS0PR01MB59223A0E69AAEAB350B609BA86239@OS0PR01MB5922.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das@bp.renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=lee.jones@linaro.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=thierry.reding@gmail.com \
    --cc=u.kleine-koenig@pengutronix.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.