public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: AKASHI Takahiro <takahiro.akashi@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de, etienne.carriere@st.com,
	michal.simek@amd.com, linus.walleij@linaro.org,
	Oleksii_Moisieiev@epam.com
Subject: Re: [RFC 3/6] pinctrl: add scmi driver
Date: Mon, 11 Sep 2023 14:14:54 +0900	[thread overview]
Message-ID: <ZP6iTtWaq2EoUi8s@octopus> (raw)
In-Reply-To: <CAPnjgZ00tEakxn4qq+o5W2Ks-bq+YW=JngJhE-zoqJYtjBFwtA@mail.gmail.com>

Hi Simon,

On Sun, Sep 10, 2023 at 01:13:27PM -0600, Simon Glass wrote:
> Hi AKASHI,
> 
> On Tue, 5 Sept 2023 at 20:41, AKASHI Takahiro
> <takahiro.akashi@linaro.org> wrote:
> >
> > This DM-compliant driver deals with SCMI pinctrl protocol and presents
> > pinctrl devices exposed by SCMI firmware (server).
> >
> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> > ---
> >  drivers/pinctrl/Kconfig        |  11 +
> >  drivers/pinctrl/Makefile       |   1 +
> >  drivers/pinctrl/pinctrl-scmi.c | 537 +++++++++++++++++++++++++++++++++
> >  3 files changed, 549 insertions(+)
> >  create mode 100644 drivers/pinctrl/pinctrl-scmi.c
> 
> 
> [..]
> 
> +
> > +U_BOOT_DRIVER(scmi_pinctrl) = {
> > +       .name = "scmi_pinctrl",
> > +       .id = UCLASS_PINCTRL,
> > +       .ops = &scmi_pinctrl_ops,
> > +       .probe = scmi_pinctrl_probe,
> > +       .priv_auto      = sizeof(struct scmi_pinctrl_priv),
> > +};
> > --
> > 2.34.1
> >
> 
> Where is the compatible string for this driver?

Nothing defined.

As I mentioned in the cover letter, pinctrl driver consists of
two layers:
- helper functions which directly manipulate protocol interfaces.
- DM-compliant (that you doubt about :) pinctrl driver.

All the SCMI-based drivers (existing ones, clock, reset and voltage domain,
except base) follow this scheme.

According to the DT bindings for SCMI protocols, they are sub-nodes
of scmi node and identified by "reg" properties. When the *bind* takes
place, scmi_bind_protocols() will enumerate all the sub-nodes and
try to bind associated protocol drivers (pinctrl in my patch) based
on "reg" value.

So there is no need to have a "compatible" property for each protocol.
Do you think it is ugly?
I suppose the corresponding kernel code, scmi_probe() in
drivers/firmware/arm_scmi/driver.c, has a similar logic although
it seems a bit more complicated.

-Takahiro Akashi

> 
> Regards,
> Simon

  reply	other threads:[~2023-09-11  5:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06  2:40 [RFC 0/6] firmware: scmi: add SCMI pinctrl protocol support AKASHI Takahiro
2023-09-06  2:40 ` [RFC 1/6] firmware: scmi: fix protocol enumeration logic AKASHI Takahiro
2023-09-10 19:13   ` Simon Glass
2023-09-11  4:58     ` AKASHI Takahiro
2023-09-06  2:40 ` [RFC 2/6] firmware: scmi: add pinctrl protocol support AKASHI Takahiro
2023-09-06  2:40 ` [RFC 3/6] pinctrl: add scmi driver AKASHI Takahiro
2023-09-10 19:13   ` Simon Glass
2023-09-11  5:14     ` AKASHI Takahiro [this message]
2023-09-06  2:40 ` [RFC 4/6] gpio: add scmi driver based on pinctrl AKASHI Takahiro
2023-09-06 14:56   ` Michal Simek
2023-09-06 23:37     ` AKASHI Takahiro
2023-09-07 12:23   ` Simon Glass
2023-09-08  4:32     ` AKASHI Takahiro
2023-09-10 19:13       ` Simon Glass
2023-09-11  5:38         ` AKASHI Takahiro
2023-09-06  2:40 ` [RFC 5/6] firmware: scmi: add pseudo pinctrl protocol support on sandbox AKASHI Takahiro
2023-09-10 19:13   ` Simon Glass
2023-09-11  5:23     ` AKASHI Takahiro
2023-09-06  2:40 ` [RFC 6/6] test: dm: add SCMI pinctrl test AKASHI Takahiro
2023-09-10 19:13   ` Simon Glass
2023-09-11  5:47     ` AKASHI Takahiro
2023-09-22 18:27       ` Simon Glass
2023-09-06  3:09 ` [RFC 0/6] firmware: scmi: add SCMI pinctrl protocol support Fabio Estevam
2023-09-07  9:58   ` AKASHI Takahiro
2023-09-08 12:14     ` Peng Fan

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=ZP6iTtWaq2EoUi8s@octopus \
    --to=takahiro.akashi@linaro.org \
    --cc=Oleksii_Moisieiev@epam.com \
    --cc=etienne.carriere@st.com \
    --cc=linus.walleij@linaro.org \
    --cc=michal.simek@amd.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox