[PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created
Jan Kiszka
jan.kiszka at web.de
Sun Jul 9 03:30:40 PDT 2017
On 2017-07-09 11:55, Andy Shevchenko wrote:
> On Sun, Jul 9, 2017 at 12:30 PM, Jan Kiszka <jan.kiszka at web.de> wrote:
>> On 2017-07-08 23:48, Andy Shevchenko wrote:
>>> On Sat, Jul 8, 2017 at 11:41 AM, Jan Kiszka <jan.kiszka at web.de> wrote:
>>>> From: Jan Kiszka <jan.kiszka at siemens.com>
>>>>
>>>> Avoid hogging chip select GPIOs just because they are listed for the
>>>> master. They might be mulitplexed and, if no slave device is attached,
>>>> used for different purposes. Moreover, this strategy avoids having to
>>>> allocate a cs_gpiods structure.
>>>>
>>>> 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?
>>
>> -ENOPARSE
>
> In code you are trying to modify there is a mix of plain integers and
> GPIO descriptors (and two APIs).
> Can we just convert it to use GPIO descriptors API?
That wasn't helpful either for someone not doing gpio development the
whole day. I suppose you wanted to suggest the conversion of
chip_data::chip_cs to struct gpio_desc * and the consistent usage of
gpiod_*, instead of gpio_*. That's not necessarily a precondition, but
it's a reasonable cleanup.
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20170709/560cf7ff/attachment.sig>
More information about the linux-arm-kernel
mailing list