powerpc/warp: switch to using gpiod API
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 27 Sep 2022 06:03:25 +0000 (23:03 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:47 +0000 (23:31 +1100)
commit1892e87a3e9170146549779622cb844582f1e2bb
treef96ee44216505d5cfa36ed64289d700d47beb0c6
parent1c4a4a4c8410be4a231a58b23e7a30923ff954ac
powerpc/warp: switch to using gpiod API

This switches PIKA Warp away from legacy gpio API and to newer gpiod
API, so that we can eventually deprecate the former.

Because LEDs are normally driven by leds-gpio driver, but the
platform code also wants to access the LEDs during thermal shutdown,
and gpiod API does not allow locating GPIO without requesting it,
the platform code is now responsible for locating GPIOs through device
tree and requesting them. It then constructs platform data for
leds-gpio platform device and registers it. This allows platform
code to retain access to LED GPIO descriptors and use them when needed.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/YzKSLcrYmV5kjyeX@google.com
arch/powerpc/boot/dts/warp.dts
arch/powerpc/platforms/44x/warp.c