powerpc/sgy_cts1000: convert to using gpiod API and facelift
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 27 Sep 2022 19:23:58 +0000 (12:23 -0700)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Nov 2022 12:31:48 +0000 (23:31 +1100)
commit4e87bd14e501030619d1bad29b3ec1f947f84fc4
tree7c9e30edf713352e31001124bfa61a8bba2727ee
parent1892e87a3e9170146549779622cb844582f1e2bb
powerpc/sgy_cts1000: convert to using gpiod API and facelift

This patch converts the driver to newer gpiod API, and away from
OF-specific legacy gpio API that we want to stop using.

While at it, let's address a few more issues:

- switch to using dev_info()/pr_info() and friends
- cancel work when unbinding the driver

Note that the original code handled halt GPIO polarity incorrectly:
in halt callback, when line polarity is "low" it would set trigger to
"1" and drive halt line high, which is counter to the annotation.
gpiod API will drive such line low. However I do not see any DTSes
in mainline that have a DT node with "sgy,gpio-halt" compatible.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/YzNNznewTyCJiGFz@google.com
arch/powerpc/platforms/85xx/sgy_cts1000.c