Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created

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

 



On 2017-07-09 11:55, Andy Shevchenko wrote:
> On Sun, Jul 9, 2017 at 12:30 PM, Jan Kiszka <jan.kiszka@xxxxxx> wrote:
>> On 2017-07-08 23:48, Andy Shevchenko wrote:
>>> On Sat, Jul 8, 2017 at 11:41 AM, Jan Kiszka <jan.kiszka@xxxxxx> wrote:
>>>> From: Jan Kiszka <jan.kiszka@xxxxxxxxxxx>
>>>>
>>>> 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

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux