From: Cristian Marussi <cristian.marussi@arm.com>
To: Saravana Kannan <saravanak@google.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Dan Carpenter <dan.carpenter@linaro.org>,
Peng Fan <peng.fan@oss.nxp.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Linus Walleij <linus.walleij@linaro.org>,
Dong Aisheng <aisheng.dong@nxp.com>,
Fabio Estevam <festevam@gmail.com>,
Shawn Guo <shawnguo@kernel.org>, Jacky Bai <ping.bai@nxp.com>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Sascha Hauer <s.hauer@pengutronix.de>,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org,
imx@lists.linux.dev, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH v2 1/4] firmware: arm_scmi: Bypass setting fwnode for scmi cpufreq
Date: Thu, 13 Feb 2025 13:08:19 +0000 [thread overview]
Message-ID: <Z63uttFGqXx4kqNr@pluto> (raw)
In-Reply-To: <CAGETcx8MXpLntMu4=9qECdZJzJLJbWa8ziH8XcW=yJNDAgD=Vw@mail.gmail.com>
On Thu, Feb 13, 2025 at 12:17:06AM -0800, Saravana Kannan wrote:
> On Thu, Feb 6, 2025 at 3:42 AM Cristian Marussi
> <cristian.marussi@arm.com> wrote:
> >
> > On Thu, Feb 06, 2025 at 02:31:19PM +0300, Dan Carpenter wrote:
> > > On Thu, Feb 06, 2025 at 06:52:20PM +0800, Peng Fan wrote:
> > > > On Wed, Feb 05, 2025 at 03:45:00PM +0300, Dan Carpenter wrote:
> > > > >On Mon, Jan 20, 2025 at 03:13:29PM +0800, Peng Fan (OSS) wrote:
> > > > >> diff --git a/drivers/firmware/arm_scmi/bus.c b/drivers/firmware/arm_scmi/bus.c
> > > > >> index 2c853c84b58f530898057e4ab274ba76070de05e..7850eb7710f499888d32aebf5d99df63db8bfa26 100644
> > > > >> --- a/drivers/firmware/arm_scmi/bus.c
> > > > >> +++ b/drivers/firmware/arm_scmi/bus.c
> > > > >> @@ -344,6 +344,21 @@ static void __scmi_device_destroy(struct scmi_device *scmi_dev)
> > > > >> device_unregister(&scmi_dev->dev);
> > > > >> }
> > > > >>
> > > > >> +static int
> > > > >> +__scmi_device_set_node(struct scmi_device *scmi_dev, struct device_node *np,
> > > > >> + int protocol, const char *name)
> > > > >> +{
> > > > >> + /* cpufreq device does not need to be supplier from devlink perspective */
> > > > >> + if ((protocol == SCMI_PROTOCOL_PERF) && !strcmp(name, "cpufreq")) {
> > > > >
> > > > >I don't love this... It seems like an hack. Could we put a flag
> > > > >somewhere instead? Perhaps in scmi_device? (I'm just saying that
> > > > >because that's what we're passing to this function).
> > > >
> > > > This means when creating scmi_device, a flag needs to be set which requires
> > > > to extend scmi_device_id to include a flag entry or else.
> > > >
> > > > As below in scmi-cpufreq.c
> > > > { SCMI_PROTOCOL_PERF, "cpufreq", SCMI_FWNODE_NO }
> > > >
> > >
> > > Yeah, I like that.
> > >
> > > - if ((protocol == SCMI_PROTOCOL_PERF) && !strcmp(name, "cpufreq")) {
> > > + if (scmi_dev->flags & SCMI_FWNODE_NO) {
> > >
> > > Or we could do something like "if (scmi_dev->no_fwnode) {"
> >
> > I proposed a flag a few review ago about this, it shoule come somehow
> > from the device_table above like Peng was proposing, so that a driver
> > can just declare that does NOT need fw_devlink.
>
> Sorry, looks I replied to v1 series. Can you take a look at that
> response please?
> https://lore.kernel.org/lkml/CAGETcx87Stfkru9gJrc1sf=PtFGLY7=jrfFaCzK5Z4hq+2TCzg@mail.gmail.com/
>
> If that suggestion I gave there would work, then that's the cleanest
> approach. This patch series is just kicking the can down the road (or
> down an inch).
Thanks for the reply, I will answer on that other thread.
Cristian
next prev parent reply other threads:[~2025-02-13 13:08 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-20 7:13 [PATCH v2 0/4] scmi: Bypass set fwnode and introduce allow/block list to address devlink issue Peng Fan (OSS)
2025-01-20 7:13 ` [PATCH v2 1/4] firmware: arm_scmi: Bypass setting fwnode for scmi cpufreq Peng Fan (OSS)
2025-02-05 12:45 ` Dan Carpenter
2025-02-06 10:52 ` Peng Fan
2025-02-06 11:31 ` Dan Carpenter
2025-02-06 11:42 ` Cristian Marussi
2025-02-06 11:49 ` Dan Carpenter
2025-02-13 8:17 ` Saravana Kannan
2025-02-13 13:08 ` Cristian Marussi [this message]
2025-01-20 7:13 ` [PATCH v2 2/4] firmware: arm_scmi: Add machine_allowlist and machine_blocklist Peng Fan (OSS)
2025-02-06 8:02 ` Dan Carpenter
2025-02-06 11:05 ` Peng Fan
2025-02-06 11:40 ` Dan Carpenter
2025-02-06 11:46 ` Dan Carpenter
2025-02-06 14:15 ` Peng Fan
2025-02-06 12:06 ` Cristian Marussi
2025-02-06 14:12 ` Peng Fan
2025-02-10 13:19 ` Peng Fan
2025-02-11 15:46 ` Sudeep Holla
2025-02-12 6:25 ` Peng Fan
2025-02-12 6:19 ` Peng Fan
2025-01-20 7:13 ` [PATCH v2 3/4] pinctrl: freescale: scmi: Switch to use machine_allowlist Peng Fan (OSS)
2025-02-13 8:13 ` Saravana Kannan
2025-01-20 7:13 ` [PATCH v2 4/4] pinctrl: scmi: Switch to use machine_blocklist Peng Fan (OSS)
2025-02-13 8:13 ` Saravana Kannan
2025-02-04 3:31 ` [PATCH v2 0/4] scmi: Bypass set fwnode and introduce allow/block list to address devlink issue Peng Fan
2025-02-06 9:07 ` Linus Walleij
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=Z63uttFGqXx4kqNr@pluto \
--to=cristian.marussi@arm.com \
--cc=aisheng.dong@nxp.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dan.carpenter@linaro.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=ping.bai@nxp.com \
--cc=s.hauer@pengutronix.de \
--cc=saravanak@google.com \
--cc=shawnguo@kernel.org \
--cc=sudeep.holla@arm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).