[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75Ve5sonh1qNgqqF1yr8OiuJVWXb-UJj+kzxQa7+R-YVoXQ@mail.gmail.com>
Date: Wed, 19 May 2021 14:27:38 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Drew Fustini <drew@...gleboard.org>
Cc: Dario Binacchi <dariobin@...ero.it>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
"open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
Vladimir Zapolskiy <vz@...ia.com>
Subject: Re: [PATCH 1/2] pinctrl: core: configure pinmux from pins debug file
On Wed, May 19, 2021 at 1:02 PM Drew Fustini <drew@...gleboard.org> wrote:
> On Tue, May 18, 2021 at 05:01:30PM +0300, Andy Shevchenko wrote:
...
> Vladimir Zapolskiy wrote in e73339037f6b ("pinctrl: remove unused
> 'pinconf-config' debugfs interface"):
>
> Of course it might be possible to increase MAX_NAME_LEN, and then add
> .pin_config_dbg_parse_modify callbacks to the drivers, but the whole
> idea of such a limited debug option looks inviable. A more flexible
> way to functionally substitute the original approach is to implicitly
> or explicitly use pinctrl_select_state() function whenever needed.
>
> This makes me think it is not a good idea to bring back pinconf-config.
> The pinmux-select debugfs file that I add added in commit 6199f6becc86
> ("pinctrl: pinmux: Add pinmux-select debugfs file") provides a method to
> activate a pin function and pin group which I think provides the same
> capability as long as the possible pin functions are described in dts.
The problem is that the pinctrl_select_state() is very limited and has
no clear meanings of the states. Only few are defined and still
unclear. What does `sleep` or `standby` or whatever mean? It may be
quite different to the device in question. Basically what we need is
to say we want this device ('function') to appear on this group of
pins ('group'). And pinctrl_select_state() can't fulfill this simple
task :-(
If we look at the ACPI case it makes that API completely out of useful
context (it can be used due to above and some kind of layering
violations, like PM vs. pin control).
Since above is the debugfs interface we may return it for the certain
task, i.e. printing current function / group choice(s) (if it's not
done by other means) and allow to switch it desired function/group
(that's what Dario tries to achieve AFAIU).
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists