Re: [PATCH v2] Documentation: gpio: add documentation about using software nodes

From: Randy Dunlap
Date: Sat Aug 16 2025 - 19:17:45 EST




On 8/16/25 3:21 PM, Randy Dunlap wrote:
>
>
> On 8/16/25 3:08 PM, Randy Dunlap wrote:
>> Hi,
>>
>> On 8/15/25 10:30 AM, Dmitry Torokhov wrote:
>>> Introduce documentation regarding use of software nodes to describe
>>> GPIOs on legacy boards that have not been converted to device tree.
>>>
>>> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
>>> ---
>>>
>>> v2: Addressed Randy's comments.
>>>
>>> Documentation/driver-api/gpio/board.rst | 65 ++++
>>> Documentation/driver-api/gpio/index.rst | 1 +
>>> .../driver-api/gpio/legacy-boards.rst | 298 ++++++++++++++++++
>>> 3 files changed, 364 insertions(+)

Hi Dmitry,

There are a few build errors with the example code. It's OK to leave that
as an exercise for the reader. :)

There are a few missing header files, but the biggest build warning/error
is a Section mismatch:
WARNING: modpost: gpio-swnodes: section mismatch in reference: myboard_exit+0x1f (section: .exit.text) -> myboard_swnodes (section: .init.rodata)

so myboard_swnodes should not be marked as __initconst.

cheers.
--
~Randy