Linux LED subsystem development
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Thomas Richard <thomas.richard@bootlin.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Bartosz Golaszewski <brgl@bgdev.pl>, Lee Jones <lee@kernel.org>,
	Pavel Machek <pavel@ucw.cz>,
	linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org, thomas.petazzoni@bootlin.com,
	DanieleCleri@aaeon.eu, GaryWang@aaeon.com.tw
Subject: Re: [PATCH 4/5] pinctrl: Add pin controller driver for AAEON UP boards
Date: Wed, 5 Feb 2025 13:41:49 +0200	[thread overview]
Message-ID: <Z6NOfUG3QZyYW0rw@smile.fi.intel.com> (raw)
In-Reply-To: <5e5f7635-86ed-4814-b26f-b1c45fa4f29a@bootlin.com>

On Wed, Feb 05, 2025 at 12:17:29PM +0100, Thomas Richard wrote:
> On 1/16/25 15:14, Andy Shevchenko wrote:

...

> So I'm not really convinced by all this complexity for only one driver.

I am not sure if I asked you to show the excerpt from DSDT for this device.
Is there any link I can browse the ASL code (for that particular device,
most likely I wouldn't need the full DSDT)?

...

> In the same time I had an other idea and I would like your advises.
> 
> The FPGA pinctrl is a consumer of SoC pins, so I can add some
> pinctrl_map to request the SoC pins and mark them as used by the FPGA:
> 
> PIN_MAP_MUX_GROUP("upboard-pinctrl", "soc_pins", "INT3452:00",
> 		"pwm0_grp", "pwm0"),
> PIN_MAP_MUX_GROUP("upboard-pinctrl", "soc_pins", "INT3452:00",
> 		"uart1_grp", "uart1"),
> 
> And in the probe() I call devm_pinctrl_get_select() to request and
> configure SoC pins.
> 
> Pros:
> - the SoC pins are marked as used by the FPGA.
> - less complex solution, no change in the core.
> 
> Cons:
> - probably one mapping for each board as Intel pinctrl device, groups
> and functions may change depending the board. So the right mapping
> should be selected based on DMI table.

Yes, this solution is what we can do for now, I don't see the Cons part is
really cons as we do that in many drivers, but ideally, of course, this
information should come from DSDT. Saying this reminds me that we still have
a gap that should link the ACPICA resources for pin control and muxing to
the pin control layer in the Linux kernel. That's what we probably should
focus on instead of creating a pin control proxy driver which indeed sounds
like a complex and over engineered solution for a niche.

> This solution also implies to make some changes in Intel pinctrl driver
> to create missing groups. Or maybe the pins which are not in a group are
> not writeable (so no need to request them) ?

This is not a problem, it's an improvement in my opinion. Again, this,
of course, should come from DSDT (see the respective Pin*() resource
descriptions in the ACPI specification).

> For the GPIO part, no changes, the SoC GPIO are requested at runtime
> using gpiod (Linus I did not forget you mentioned to use/rework
> gpio-aggregator).

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2025-02-05 11:41 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-11 16:27 [PATCH 0/5] Add support for the AAEON UP board FPGA Thomas Richard
2024-12-11 16:27 ` [PATCH 1/5] mfd: Add support for " Thomas Richard
2024-12-11 16:27 ` [PATCH 2/5] leds: Add AAEON UP board LED driver Thomas Richard
2024-12-11 16:27 ` [PATCH 3/5] gpiolib: add gpiochip_add_pinlist_range() function Thomas Richard
2024-12-16  9:17   ` Bartosz Golaszewski
2024-12-16 10:02     ` Thomas Richard
2024-12-20 12:31   ` Linus Walleij
2024-12-11 16:27 ` [PATCH 4/5] pinctrl: Add pin controller driver for AAEON UP boards Thomas Richard
2024-12-20 12:22   ` Linus Walleij
2024-12-20 13:50     ` Thomas Richard
2024-12-21 23:43       ` Linus Walleij
2025-01-03 10:28         ` Thomas Richard
2025-01-13  9:46           ` Andy Shevchenko
2025-01-14 10:28             ` Thomas Richard
2025-01-16  9:12               ` Andy Shevchenko
2025-01-16 12:21                 ` Thomas Richard
2025-01-16 12:31                   ` Andy Shevchenko
2025-01-16 13:23                     ` Thomas Richard
2025-01-16 14:14                       ` Andy Shevchenko
2025-02-05 11:17                         ` Thomas Richard
2025-02-05 11:41                           ` Andy Shevchenko [this message]
2025-04-04 13:11                             ` Thomas Richard
2025-04-04 13:26                               ` Andy Shevchenko
2025-01-22 12:46                   ` Linus Walleij
2024-12-11 16:27 ` [PATCH 5/5] MAINTAINERS: Add entry for AAEON UP board FPGA drivers Thomas Richard
2024-12-13 17:09 ` (subset) [PATCH 0/5] Add support for the AAEON UP board FPGA Lee Jones

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=Z6NOfUG3QZyYW0rw@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=DanieleCleri@aaeon.eu \
    --cc=GaryWang@aaeon.com.tw \
    --cc=brgl@bgdev.pl \
    --cc=geert+renesas@glider.be \
    --cc=lee@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=thomas.richard@bootlin.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