[PATCH] arm: dts: sun7i-a20-bananapi: name the GPIO lines

Linus Walleij linus.walleij at linaro.org
Mon Jul 25 06:27:55 PDT 2016


On Mon, Jul 25, 2016 at 7:27 AM, fixed-term.Oleksij.Rempel
<fixed-term.Oleksij.Rempel at de.bosch.com> wrote:
> On 22.07.2016 17:47, Chen-Yu Tsai wrote:
>> On Fri, Jul 22, 2016 at 10:55 PM, Linus Walleij
>> <linus.walleij at linaro.org> wrote:

>>> "LED1" seems like the right name, if this is a GPIO used to drive
>>> a LED.
>>
>> This is GPIO based.
>
> This was not clear to me, marking GPIO pin as peripheral, at moment of
> writing and testing it was a allocated by led driver. Bit for example
> IO-GCLK was free to use for GPIO :).. so do [] actually make sense?

I would say if the hardware is used in GPIO mode, i.e. if the hardware
registers of the GPIO block is written to activate the LED, then it
is "LED1".

If there would be a specific LED driver block that disables the GPIO
block to be used for the same lines and have its registers elsewhere,
it would be "[LED1]".

So proper names "FOO" is for the case where the GPIO output is
used as GPIO.

Yours,
Linus Walleij



More information about the linux-arm-kernel mailing list