Re: [alsa-devel] Fwd: [PATCH 1/1] SPI : spi-pxa2xx : fix spi init of WM510205 codec via ACPI (resend)

Christian Hartmann
2015-08-20T11:52:04Z

hi,

2015-08-20 13:34 GMT+02:00 Christian Hartmann <cornogle-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org>:

> the code in arizona-core.c arizona_dev_init looks like
>
> if (arizona->pdata.reset) {
> /* Start out with /RESET low to put the chip into reset */
> ret = devm_gpio_request_one(arizona->dev, arizona->pdata.reset,
> }
>
> which fails here. seems that I have to use desc_to_gpio() here too.
> Does anybody have an idea whats wrong with LDO1? I try the
> desc_to_gpio at first and will report soon
>
> cheers
> chris

hm, in include/linux/mfd/arizona/pdata.h
the structur arizona_pdata has declared ints for the GPIOs ldoena and reset.

struct arizona_pdata {
int reset; /** GPIO controlling /RESET, if any */
int ldoena; /** GPIO controlling LODENA, if any */
}

so I have to respect the type of the two fields while getting the GPIO
descriptors.
On the other hand I can also add two new fields or change the code
that it uses the GPIO names instead of the numbers.

What do you think?