Re: [PATCH v3 2/3] pinctrl: core: configure pinmux from pins debug file

From: Linus Walleij
Date: Fri May 28 2021 - 05:08:37 EST

On Thu, May 27, 2021 at 10:33 PM Dario Binacchi <dariobin@xxxxxxxxx> wrote:
> > Il 27/05/2021 21:57 Vladimir Zapolskiy <vz@xxxxxxxxx> 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.)

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?

Linus Walleij