All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: Dario Binacchi <dariobin@libero.it>,
	Vladimir Zapolskiy <vz@mleia.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Drew Fustini <drew@beagleboard.org>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	"open list:GPIO SUBSYSTEM" <linux-gpio@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] pinctrl: core: configure pinmux from pins debug file
Date: Wed, 2 Jun 2021 08:03:51 +0300	[thread overview]
Message-ID: <YLcRN0KSCpvCS4ET@atomide.com> (raw)
In-Reply-To: <CACRpkdZb4WZS8cd=nFz_J0GrBc5HJ8SMYtniB2W_Jpq_vtPTYQ@mail.gmail.com>

* Linus Walleij <linus.walleij@linaro.org> [210528 09:08]:
> On Thu, May 27, 2021 at 10:33 PM Dario Binacchi <dariobin@libero.it> wrote:
> > > Il 27/05/2021 21:57 Vladimir Zapolskiy <vz@mleia.com> ha scritto:
> 
> > > Unfortunately you continue to cling to the broken interface, while I see no
> > > comments from you about asked to consider pin groups and pin group functions.
> >
> > Could you kindly explain to me, with some practical examples, what kind of interface
> > would you implement ?
> 
> I am not fully understanding this discussion.
> 
> I get the feeling that this is caused by the early architectural decisions with
> pinctrl-single to put all configuration of pin groups and functions per pin into
> the device tree.
>
> Tony specifically wanted this because what he gets from TI are some raw
> ASIC data dumps from the designers, that he could make a script to process
> into device tree rather than into .h files, and get this out of the kernel.
> (As I remember it, Tony correct me if I'm wrong.)

Yeah the idea was to avoid stuffing even more SoC specific data into the
kernel and rather use devicetree data only for the booted SoC.
 
> This makes it hard to align some concepts of the pin control subsystem such
> as functions and groups because pinctrl-single assume a 1-to-1 mapping
> between one pin and one group, which in turn has a 1-to-many mapping
> to functions.
> 
> Is the patch trying to debugfs around this somehow?
> 
> If this hack is only needed for pinctrl-single.c then it should be placed in
> that driver, so Tony can review it and maintain it as applicable in that
> driver's context only, not in the pinctrl core as it appears the general
> applicability for other drivers is not there.
> 
> Would this really be useful for other drivers than pinctrl-single.c?

I'd rather go with a generic interface. I think it should work if we only
allow enabling and disabling of unclaimed pingroups from sysfs. And then
we can also allow creating new pingroups for unclaimed pins if needed.

Regards,

Tony

  reply	other threads:[~2021-06-02  5:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-20 20:27 [PATCH v3 0/3] am335x: set pinmux registers from pins debug file Dario Binacchi
2021-05-20 20:27 ` Dario Binacchi
2021-05-20 20:27 ` [PATCH v3 1/3] docs/pinctrl: update `pins' description under debugfs Dario Binacchi
2021-05-20 20:27 ` [PATCH v3 2/3] pinctrl: core: configure pinmux from pins debug file Dario Binacchi
2021-05-21  6:44   ` Vladimir Zapolskiy
2021-05-24 17:28     ` Dario Binacchi
2021-05-24 18:52       ` Vladimir Zapolskiy
2021-05-25  5:15         ` Tony Lindgren
2021-05-27 19:23         ` Dario Binacchi
2021-05-27 19:57           ` Vladimir Zapolskiy
2021-05-27 20:33             ` Dario Binacchi
2021-05-28  8:34               ` Vladimir Zapolskiy
2021-05-28  9:07               ` Linus Walleij
2021-06-02  5:03                 ` Tony Lindgren [this message]
2021-06-11  8:29                   ` Dario Binacchi
2021-05-20 20:27 ` [PATCH v3 3/3] pinctrl: single: set " Dario Binacchi
2021-05-20 20:27   ` Dario Binacchi
2021-05-21  6:44   ` Vladimir Zapolskiy
2021-05-21  6:44     ` Vladimir Zapolskiy
2021-05-25  0:18 ` [PATCH v3 0/3] am335x: set pinmux registers " Linus Walleij
2021-05-25  0:18   ` 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=YLcRN0KSCpvCS4ET@atomide.com \
    --to=tony@atomide.com \
    --cc=andy.shevchenko@gmail.com \
    --cc=dariobin@libero.it \
    --cc=drew@beagleboard.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vz@mleia.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 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.