public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Christian Marangi <ansuelsmth@gmail.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-pm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, upstream@airoha.com
Subject: Re: [PATCH v7 2/2] cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver
Date: Fri, 20 Dec 2024 11:36:19 +0100	[thread overview]
Message-ID: <676548a3.df0a0220.16c730.268c@mx.google.com> (raw)
In-Reply-To: <CAPDyKFq7c607_NtiEF=4HinL5HABv7+fW9EGi1xfwpOpUPO6Bg@mail.gmail.com>

On Thu, Dec 19, 2024 at 04:23:52PM +0100, Ulf Hansson wrote:
> On Fri, 13 Dec 2024 at 23:35, Christian Marangi <ansuelsmth@gmail.com> wrote:
> >
> > On Fri, Dec 13, 2024 at 09:30:01AM +0530, Viresh Kumar wrote:
> > > On 12-12-24, 13:01, Ulf Hansson wrote:
> > > > On Fri, 6 Dec 2024 at 22:16, Christian Marangi <ansuelsmth@gmail.com> wrote:
> > > > Hmm, it looks like this needs to be moved and possibly split up.
> > > >
> > > > The provider part (for the clock and power-domain) belongs in
> > > > /drivers/pmdomain/*, along with the other power-domain providers.
> > > >
> > > > Other than that, I was really expecting the cpufreq-dt to take care of the rest.
> > > >
> > > > To me, the above code belongs in a power-domain provider driver. While
> > > > the below should be taken care of in cpufreq-dt, except for the device
> > > > registration of the cpufreq-dt device, I guess.
> > > >
> > > > Viresh, what's your view on this?
> > >
> > > Sure, no issues.. These are all cpufreq related, but don't necessarily belong in
> > > the cpufreq directory.
> > >
> >
> > Problem is really DT schema... I wonder if it's acceptable to push a
> > name-only driver in pmdomain just do detach from cpufreq. The cpufreq
> > driver would manually probe the pmdomain. Is it acceptable?
> >
> > Or do you have alternative solution for this?
> 
> The power-domain provider driver should use the compatible
> "airoha,en7581-cpufreq". This driver should be responsible for
> registering the genpd and the clock.

Is it ok to have clk provider in power-domain driver?

> 
> Potentially, the power-domain provider driver could also register the
> "cpufreq-dt" platform-device. To make this work, we also need to
> extend the cpufreq-dt driver (maybe extend its platform-data too?) to
> be capable of attaching the corresponding cpu-devices to their
> power(perf)-domains. For the moment, this isn't supported, but I think
> it would be nice if it could. Another option, would be to use an
> additional separate name-based cpufreq-driver, as in the
> qcom-cpufreq-nvmem.c, that then becomes responsible for registering
> the cpufreq-dt device.

Well a simple init/exit driver should be ok, we still need to have the
custom function for opp so a specific driver in cpufreq is needed
anyway.

> 
> Viresh, do you have a better approach in mind?
>

If both are ok with this approach I will:
- move pm domain and clock to pmdomain driver directory
- rework the cpufreq driver to an init/exit implementation (no
  compatible) and just register cpufreq-dt with the custom opp
  OPs.

This should work and make everything well organized.

-- 
	Ansuel

  parent reply	other threads:[~2024-12-20 10:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 21:11 [PATCH v7 1/2] dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq Christian Marangi
2024-12-06 21:11 ` [PATCH v7 2/2] cpufreq: airoha: Add EN7581 CPUFreq SMCCC driver Christian Marangi
2024-12-12 12:01   ` Ulf Hansson
2024-12-12 12:25     ` Ulf Hansson
2024-12-13  4:00     ` Viresh Kumar
2024-12-13 22:35       ` Christian Marangi
2024-12-18  7:41         ` Christian Marangi
2024-12-18  7:43           ` Viresh Kumar
2024-12-19 15:23         ` Ulf Hansson
2024-12-20  5:19           ` Viresh Kumar
2024-12-20 10:36           ` Christian Marangi [this message]
2024-12-20 14:19   ` Sudeep Holla
2024-12-11 16:37 ` [PATCH v7 1/2] dt-bindings: cpufreq: Document support for Airoha EN7581 CPUFreq Rob Herring (Arm)
2024-12-12  7:15 ` Viresh Kumar

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=676548a3.df0a0220.16c730.268c@mx.google.com \
    --to=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=upstream@airoha.com \
    --cc=viresh.kumar@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