Messages in this thread | | | Subject | Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created | From | Jan Kiszka <> | Date | Mon, 10 Jul 2017 19:31:24 +0200 |
| |
On 2017-07-10 14:09, Mark Brown wrote: > On Sun, Jul 09, 2017 at 12:48:10AM +0300, Andy Shevchenko wrote: >> On Sat, Jul 8, 2017 at 11:41 AM, Jan Kiszka <jan.kiszka@web.de> wrote: > >>> Tested on the IOT2000 where the second SPI bus is connected to an >>> Arduino-compatible connector and multiplexed between SPI, GPIO and PWM >>> usage. > >> Can we first switch the driver to use GPIO descriptors instead of >> plain integers? > > Only if you also convert the SPI core to use descriptors, Chris Packham > was looking at that but he needed update the ep93xx drivers among others > and getting reviewers was hard. >
IIUC, we can't convert completely due to some legacy boards providing their CS lines as integers. But even then, a few more API usages can be converted.
While looking into this, I noticed that this patch violated the formal rule to never release a GPIO with the old API when it was requested with the new one. That's at least stated in the docs, even though gpio_free is equivalent to gpiod_put. Fixed that already, but I need to find some time to retest.
Jan
[unhandled content-type:application/pgp-signature] | |