Re: [PATCH v5] staging: wfx: Get descriptors for GPIOs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday 3 July 2020 15:07:56 CEST Linus Walleij wrote:
> 
> 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@xxxxxxxxxx>
> Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
> ---
> ChangeLog v4->v5:
> - Make the wakeup GPIO optional.
> ChangeLog v3->v4:
> - Finally figured out how to compile this by selecting SPI
>   host and deselecting MMC host.
> - Initialize the reset GPIO as OUT_LOW
> - Initialize the wakeup GPIO as OUT_LOW
> - Drop one more desc_to_gpio()
> - Update the warning if GPIO is not found.
> ChangeLog v2->v3:
> - ERR_CAST not PTR_CAST
> ChangeLog v1->v2:
> - Fixed a cast and a variable name.
> - I still don't know how to compile this but hey the zeroday
>   robot does.
> ---
>  drivers/staging/wfx/bus_spi.c | 14 +++++------
>  drivers/staging/wfx/main.c    | 47 ++++++-----------------------------
>  drivers/staging/wfx/main.h    |  2 --
>  3 files changed, 14 insertions(+), 49 deletions(-)

I have not yet tested, but it looks correct.

Reviewed-by: Jérôme Pouiller <jerome.pouiller@xxxxxxxxxx>

-- 
Jérôme Pouiller


_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux