All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: "Enrico Weigelt, metux IT consult" <lkml@metux.net>,
	Ed W <lists@wildgooses.com>,
	Philip Prindeville <philipp@redfish-solutions.com>
Cc: platform-driver-x86@vger.kernel.org, "Enrico Weigelt,
	metux IT consult" <info@metux.net>,
	Andres Salomon <dilinger@queued.net>,
	Andreas Eberlein <foodeas@aeberlein.de>,
	Paul Spooren <paul@spooren.de>
Subject: Re: [PATCH v4 1/2] x86: Support APU5 & APU6 in PCEngines platform driver
Date: Mon, 13 Mar 2023 14:26:59 +0100	[thread overview]
Message-ID: <d87df1ca-0fd7-bf8f-d4b3-2d4d0b79282a@redhat.com> (raw)
In-Reply-To: <60af6134-3b0b-f8ec-1375-a9819a181911@metux.net>

Hi,

On 2/17/23 14:50, Enrico Weigelt, metux IT consult wrote:
> On 13.02.23 15:25, Hans de Goede wrote:
> 
>> It would be good to know the ACPI names. Also what happens with the ACPI
>> registered LED devices when the pcengines-apu driver loads, does it
>> somehow unregister those ?
> 
> It doesn't (hasn't any code for that). But the even more interesting
> question is: does the acpi driver lock the IO space so my gpio driver,
> and so the apu driver itself, can't initialize at all ? Or are we in a
> situation where two different drivers meddle with the same chip ?

Since it seems that people are using a patched version of
the pcengines-apu driver with openwrt on newer models I would assume
that the answer here is: "No the ACPI code does not lock the IO space"
although it is unclear to me how the ACPI code exposes leds at all ?

Later in the thread you write that they do some hacks to expose
all io-space of the FCH as gpios and then presumably the embed
devicetree-bits pointing to those new GPIOs into ACPI to make
the leds-gpio.c code handle the LEDs ?

> 
>> If the ACPI LEDs are not unregistered and keep working, then I guess there is no userspace
>> API breakage when using pcengines-apu on newer APU models, "just" duplicate LED devices ?
> 
> Supporting both LED name schemes on the newer boards is an interesting
> thought. Do we have some way for aliasing LED names ?
> 
> OTOH, I wonder whether we need the model specific LED naming at all.
> In the old apuv1 driver, there used to be some (unsupported) LED-only
> support for apuv2, which used model-specific naming. When adding full
> apuv2/v3 support, I specifically chose not to do this, since I don't want userland having to care about the specific model version. And the
> naming is a bit more clear on the actual meaning of these LEDs.
> 
>>> - Additionally, we already broke this in the (distant) past because there was a previous APU driver
>>> which used different names still...
>>
>> Just because we have gotten away with it once, does not mean we should do it again :)
> 
> Back then the situation was different. Haven't even found anybody who's
> was actually using this in the field. This ancient driver (actually made
> for acpuv1, which is totally different HW) was only serving the three
> front LEDs, nothing else, and blocked using the other GPIOs (eg. button)
> Some people out there did weird hacks by directly writing registers from
> userland (obviously w/o loading the ancient driver) - and even worse:
> pcengines publically adviced to so.
> 
>> For the new models I'm fine with whatever LED naming is preferred.
> 
> NAK. The problem here is: userland now has to differenciate between
> various models again. Applications suddenly need to be rewritten in
> order to work with the next higher model, or it fails. That might be not
> a problem for home users, but in the industrial field it is a huge
> problem: you suddenly end up with two product configurations or need
> extra SW complexity to cope with several models at runtime - and this
> even grows with the next one.
> 
> Exactly what I wanted to prevent once and for all.

Note that making applications work OOTB on newer platforms is nice
to have, but is not specifically a blocker from the upstream kernel
review pov.  Userspace needing to adjust to e.g. /dev/sda becoming
/dev/nvme is not considerer userspace API breakage and this is
more or less the same.

Still I agree that preserving the userspace API across different
board models is something which we want to do if possible.

> Since the meaning of these LEDs doesn't change, there's just no need to
> change their naming.

I agree that if the LEDs have the same function as before the name should
be preserved to not needlessly make life harder for userspace consumers
of these LEDs.

Regards,

Hans


  parent reply	other threads:[~2023-03-13 13:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 23:11 [PATCH v4 1/2] x86: Support APU5 & APU6 in PCEngines platform driver Philip Prindeville
2023-01-19 10:22 ` Hans de Goede
2023-01-20  5:34   ` Philip Prindeville
2023-01-20  9:51     ` Hans de Goede
2023-01-20 19:18   ` Ed W
2023-02-02 11:14     ` Hans de Goede
2023-02-09  6:04       ` Philip Prindeville
2023-02-13 13:06         ` Hans de Goede
2023-02-13 14:05           ` Ed W
2023-02-13 14:25             ` Hans de Goede
     [not found]               ` <60af6134-3b0b-f8ec-1375-a9819a181911@metux.net>
2023-03-13 13:26                 ` Hans de Goede [this message]
2023-01-19 10:35 ` Hans de Goede

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=d87df1ca-0fd7-bf8f-d4b3-2d4d0b79282a@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=dilinger@queued.net \
    --cc=foodeas@aeberlein.de \
    --cc=info@metux.net \
    --cc=lists@wildgooses.com \
    --cc=lkml@metux.net \
    --cc=paul@spooren.de \
    --cc=philipp@redfish-solutions.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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.