Linux Renesas SOC kernel development
 help / color / mirror / Atom feed
From: Lee Jones <lee@kernel.org>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Chris Paterson <Chris.Paterson2@renesas.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"linux-renesas-soc@vger.kernel.org" 
	<linux-renesas-soc@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	William Breathitt Gray <william.gray@linaro.org>
Subject: Re: [PATCH v11 2/6] clocksource/drivers: Add Renesas RZ/G2L MTU3a core driver
Date: Thu, 26 Jan 2023 16:33:53 +0000	[thread overview]
Message-ID: <Y9Krcd6tPI2jdYfd@google.com> (raw)
In-Reply-To: <OS0PR01MB5922046617C1C9461DEAA7A786CF9@OS0PR01MB5922.jpnprd01.prod.outlook.com>

On Thu, 26 Jan 2023, Biju Das wrote:

> Hi Lee Jones,
> 
> Thanks for the feedback.
> 
> > -----Original Message-----
> > From: Lee Jones <lee@kernel.org>
> > Sent: Thursday, January 26, 2023 2:52 PM
> > To: Biju Das <biju.das.jz@bp.renesas.com>
> > Cc: Daniel Lezcano <daniel.lezcano@linaro.org>; Philipp Zabel
> > <p.zabel@pengutronix.de>; Thomas Gleixner <tglx@linutronix.de>; Geert
> > Uytterhoeven <geert+renesas@glider.be>; Chris Paterson
> > <Chris.Paterson2@renesas.com>; Prabhakar Mahadev Lad <prabhakar.mahadev-
> > lad.rj@bp.renesas.com>; linux-renesas-soc@vger.kernel.org; Rob Herring
> > <robh+dt@kernel.org>; Krzysztof Kozlowski
> > <krzysztof.kozlowski+dt@linaro.org>
> > Subject: Re: [PATCH v11 2/6] clocksource/drivers: Add Renesas RZ/G2L MTU3a
> > core driver
> > 
> > On Thu, 26 Jan 2023, Biju Das wrote:
> > 
> > > Hi Daniel,
> > >
> > > + Rob and Krzysztof Kozlowski
> > >
> > > > -----Original Message-----
> > > > From: Daniel Lezcano <daniel.lezcano@linaro.org>
> > > > Sent: Thursday, January 26, 2023 10:53 AM
> > > > To: Biju Das <biju.das.jz@bp.renesas.com>; Philipp Zabel
> > > > <p.zabel@pengutronix.de>
> > > > Cc: Thomas Gleixner <tglx@linutronix.de>; Geert Uytterhoeven
> > > > <geert+renesas@glider.be>; Chris Paterson
> > > > <Chris.Paterson2@renesas.com>; Prabhakar Mahadev Lad
> > > > <prabhakar.mahadev-lad.rj@bp.renesas.com>; linux-
> > > > renesas-soc@vger.kernel.org; Lee Jones <lee@kernel.org>
> > > > Subject: Re: [PATCH v11 2/6] clocksource/drivers: Add Renesas RZ/G2L
> > > > MTU3a core driver
> > > >
> > > > On 13/01/2023 17:17, Biju Das wrote:
> > > >
> > > > [ ... ]
> > > >
> > > > > +config RZ_MTU3
> > > > > +	bool "Renesas RZ/G2L MTU3a core driver"
> > > > > +	select MFD_CORE
> > > > > +	depends on (ARCH_RZG2L && OF) || COMPILE_TEST
> > > > > +	help
> > > > > +	  Select this option to enable Renesas RZ/G2L MTU3a core
> > driver for
> > > > > +	  the Multi-Function Timer Pulse Unit 3 (MTU3a) hardware
> > available
> > > > > +	  on SoCs from Renesas. The core driver shares the clk and
> > channel
> > > > > +	  register access for the other child devices like Counter,
> > PWM,
> > > > > +	  Clock Source, and Clock event.
> > > >
> > > > Do you really want to have this option manually selectable? Usually
> > > > we try to avoid that and keep a silent option which is selected by
> > > > the platform config.
> > >
> > > For critical drivers like CPG, Pinctrl we enable it by default by silent
> > option in platform config.
> > > For the others we add it to defconfig, once the device tree support is
> > available.
> > >
> > >
> > > >
> > > > [ ... ]
> > > >
> > > > > +
> > > > > +	ret = mfd_add_devices(&pdev->dev, 0, rz_mtu3_devs,
> > > > > +			      ARRAY_SIZE(rz_mtu3_devs), NULL, 0, NULL);
> > > > > +	if (ret < 0)
> > > > > +		goto err_assert;
> > > > > +
> > > > > +	return devm_add_action_or_reset(&pdev->dev,
> > rz_mtu3_reset_assert,
> > > > > +					&pdev->dev);
> > > > > +
> > > > > +err_assert:
> > > > > +	reset_control_assert(ddata->rstc);
> > > > > +	return ret;
> > > > > +}
> > > >
> > > > I'm not sure this driver falls under the clocksource umbrella but
> > > > under mfd [cc'ed Lee Jones]
> > > >
> > >
> > >
> > > Please find [1],
> > >
> > > After a long discussion with dt maintainers, counter maintainer, MFD
> > > maintainer and PWM maintainer, it is concluded to Add the core driver to
> > timer subsystem.
> > 
> > Which is fine.  However, you cannot then use the MFD API.
> 
> Is it ok to keep the bindings in timer subsystem and move the core driver to MFD
> as it is using MFD api's?

Sounds reasonable.

I guess we'll have to see what that looks like.

> > > [1]
> > > https://jpn01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatc
> > > hwork.kernel.org%2Fproject%2Flinux-renesas-soc%2Fpatch%2F2022101014522
> > > 2.1047748-2-biju.das.jz%40bp.renesas.com%2F&data=05%7C01%7Cbiju.das.jz
> > > %40bp.renesas.com%7C4c5896d8c0064d5e261808dafface390%7C53d82571da1947e
> > > 49cb4625a166a4a2a%7C0%7C0%7C638103415256934306%7CUnknown%7CTWFpbGZsb3d
> > > 8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C
> > > 3000%7C%7C%7C&sdata=2TkN2%2FEWCvC9yAeiR4fW0ix84AfiD41BIuHMuKMDGnw%3D&r
> > > eserved=0
> > 
> >   "The TL;DR is: if you're not using the MFD Core (and including
> >   mfd/core.h), it's not an MFD.  You *could* split this up into its
> >   component parts, place them into their own subsystems and use an MFD
> >   core driver to register them all, but as Thierry says, this is not a
> >   hard requirement either."
> 
> 

-- 
Lee Jones [李琼斯]

  reply	other threads:[~2023-01-26 16:34 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 16:17 [PATCH v11 0/6] Add RZ/G2L MTU3a Core, Counter and pwm driver Biju Das
2023-01-13 16:17 ` [PATCH v11 1/6] dt-bindings: timer: Document RZ/G2L MTU3a bindings Biju Das
2023-01-13 16:17 ` [PATCH v11 2/6] clocksource/drivers: Add Renesas RZ/G2L MTU3a core driver Biju Das
2023-01-26 10:53   ` Daniel Lezcano
2023-01-26 11:14     ` Biju Das
2023-01-26 14:51       ` Lee Jones
2023-01-26 15:11         ` Biju Das
2023-01-26 16:33           ` Lee Jones [this message]
2023-01-26 16:56             ` Biju Das
2023-01-26 20:35               ` Biju Das
2023-02-02 16:22             ` Biju Das
2023-01-26 14:41     ` Lee Jones
2023-01-13 16:17 ` [PATCH v11 3/6] Documentation: ABI: sysfs-bus-counter: add cascade_counts_enable and external_input_phase_clock_select Biju Das
2023-01-13 16:17 ` [PATCH v11 4/6] counter: Add Renesas RZ/G2L MTU3a counter driver Biju Das
2023-01-13 16:17 ` [PATCH v11 5/6] MAINTAINERS: Add entries for " Biju Das
2023-01-13 16:17 ` [PATCH v11 6/6] pwm: Add Renesas RZ/G2L MTU3a PWM driver Biju Das
2023-01-25 19:48 ` [PATCH v11 0/6] Add RZ/G2L MTU3a Core, Counter and pwm driver Biju Das
2023-01-26 10:44   ` Daniel Lezcano

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=Y9Krcd6tPI2jdYfd@google.com \
    --to=lee@kernel.org \
    --cc=Chris.Paterson2@renesas.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=geert+renesas@glider.be \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh+dt@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=thierry.reding@gmail.com \
    --cc=william.gray@linaro.org \
    /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