Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 15e2a357 authored by Pavel Machek's avatar Pavel Machek Committed by Linus Walleij
Browse files

gpio/board.txt: point to gpiod_set_value



gpiod_set_value() is preffered interface these days, so add a
pointer. Also fix a missing ).

Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
[Fixed some grammar and reworded]
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1001354c
Loading
Loading
Loading
Loading
+7 −4
Original line number Original line Diff line number Diff line
@@ -6,7 +6,7 @@ Note that it only applies to the new descriptor-based interface. For a
description of the deprecated integer-based GPIO interface please refer to
description of the deprecated integer-based GPIO interface please refer to
gpio-legacy.txt (actually, there is no real mapping possible with the old
gpio-legacy.txt (actually, there is no real mapping possible with the old
interface; you just fetch an integer from somewhere and request the
interface; you just fetch an integer from somewhere and request the
corresponding GPIO.
corresponding GPIO).


All platforms can enable the GPIO library, but if the platform strictly
All platforms can enable the GPIO library, but if the platform strictly
requires GPIO functionality to be present, it needs to select GPIOLIB from its
requires GPIO functionality to be present, it needs to select GPIOLIB from its
@@ -162,6 +162,9 @@ The driver controlling "foo.0" will then be able to obtain its GPIOs as follows:


Since the "led" GPIOs are mapped as active-high, this example will switch their
Since the "led" GPIOs are mapped as active-high, this example will switch their
signals to 1, i.e. enabling the LEDs. And for the "power" GPIO, which is mapped
signals to 1, i.e. enabling the LEDs. And for the "power" GPIO, which is mapped
as active-low, its actual signal will be 0 after this code. Contrary to the legacy
as active-low, its actual signal will be 0 after this code. Contrary to the
integer GPIO interface, the active-low property is handled during mapping and is
legacy integer GPIO interface, the active-low property is handled during
thus transparent to GPIO consumers.
mapping and is thus transparent to GPIO consumers.

A set of functions such as gpiod_set_value() is available to work with
the new descriptor-oriented interface.