x86-power-control
Bills, Jason M
jason.m.bills at linux.intel.com
Fri Oct 18 06:05:45 AEDT 2019
Hi Oskar,
On 10/17/2019 10:21 AM, Oskar Senft wrote:
> Hi Jason
>
>
> In our DTS we use gpio-line-names to name all of the GPIOs in one block:
>
> &gpio {
> status = "okay";
> gpio-line-names =
> [...]
> /*D0-D7*/ "","","","","","","","",
> /*E0-E7*/
> "RESET_BUTTON","RESET_OUT","POWER_BUTTON","POWER_OUT","","","","",
> /*F0-F7*/ "NMI_OUT","","","","CPU_ERR0","CPU_ERR1","","",
> /*G0-G7*/
> "CPU_ERR2","CPU_CATERR","PCH_BMC_THERMTRIP","","","","","",
>
>
> Ugh, ok - that's a nice trick. But it's also a little messy :-/ Is that
> the "officially recommended" way? I guess, since the other option I
> tried doesn't work!.
I'm not completely sure. I remember seeing this approach as an example
when studying up on libgpiod and a quick search showed this approach
used for other DTS files such as for Raspberry Pi
(https://github.com/raspberrypi/linux/blob/e33ef2c4cd5dc96aa05a7d328eff61c183c94748/arch/arm/boot/dts/bcm2835-rpi-b-plus.dts#L37).
So, if not "officially recommended" it's at least not unheard of. :)
>
> Is that purely used for naming lines, or does it have any semantic impact?
As far as I know, this is purely used for naming lines for libpiod and
associated tools such as 'gpioinfo'. You can still find and access GPIO
lines by chip and line number.
>
> Thanks
> Oskar.
More information about the openbmc
mailing list