On Mon, Sep 15, 2025 at 8:49 PM Hans de Goede hansg@kernel.org wrote:
On 15-Sep-25 3:21 AM, Dmitry Torokhov wrote:
On Sat, Sep 13, 2025 at 08:43:09PM +0200, Hans de Goede wrote:
...
Thanks for catching this. I think it would be better if we added handling of the secondary node to gpiod_find_and_request(). This way the fallback will work for all kind of combinations, even if secondary node happens to be an OF or ACPI one.
IOW something like this:
That should work too, but if there is an OF or ACPI node it should always be the primary one. So my original patch id fine as is.
I barely remember one discussion with Heikki a few years ago and the subject of the discussion was the order inversion of the ACPI/OF vs. SW in the fwnode list. But it might be that it was just for something that never appeared upstream. In any case, the proposed by Dmitry is more flexible (we won't need to change this again if needed in the future).
Either way works for me. If you prefer the above approach instead of my original patch let me know and I'll give it a test-run and then post a v2.
+1 for v2.