lkml.org 
[lkml]   [2017]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created
From
Date
On 2017-07-09 11:55, Andy Shevchenko wrote:
> On Sun, Jul 9, 2017 at 12:30 PM, Jan Kiszka <jan.kiszka@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@web.de> wrote:
>>>> From: Jan Kiszka <jan.kiszka@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

[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2017-07-09 12:31    [W:0.045 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site