staging: wfx: Get descriptors for GPIOs
authorLinus Walleij <linus.walleij@linaro.org>
Fri, 3 Jul 2020 13:07:56 +0000 (15:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2020 11:51:22 +0000 (13:51 +0200)
commit354d6ca9d99790e037bf06f093634e851d1253ee
tree39fc0832670f74a1970a9ccd522f44147a275d85
parentd4e03146b00395e82b8db22a0c2e867c7224b7c9
staging: wfx: Get descriptors for GPIOs

The code has the functionality to insert the GPIO lines using
the global GPIO numbers through module parameters.

As we are clearly deprecating the use of global GPIO numbers
look up the GPIO descriptors from the device instead. This
usually falls back to device hardware descriptions using e.g.
device tree or ACPI. This device clearly supports device
tree when used over SPI for example.

For example, this can be supplied in the device tree like so:

  wfx@0x01 {
      compatible = "silabs,wf200";
      reset-gpios = <&gpio0 1>;
      wakeup-gpios = <&gpio0 2>;
  };

Cc: Jérôme Pouiller <jerome.pouiller@silabs.com>
Reviewed-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20200703130756.514868-1-linus.walleij@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wfx/bus_spi.c
drivers/staging/wfx/main.c
drivers/staging/wfx/main.h