Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1694645
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created |
| Date | 2017-07-24 13:20 +0200 |
| Message-ID | <u6Jz3-42s-3@gated-at.bofh.it> (permalink) |
| References | <u0TB7-8kI-17@gated-at.bofh.it> <u6J62-3B1-25@gated-at.bofh.it> <u6JfI-3F7-27@gated-at.bofh.it> <u6Jpn-3Yr-5@gated-at.bofh.it> <u6Jpn-3Yr-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jul 24, 2017 at 2:06 PM, Jan Kiszka <jan.kiszka@web.de> wrote: > On 2017-07-24 13:02, Andy Shevchenko wrote: >> On Mon, Jul 24, 2017 at 1:53 PM, Jan Kiszka <jan.kiszka@web.de> wrote: >>> On 2017-07-24 12:44, Andy Shevchenko wrote: >>>> +Cc: Mika >>>> >>>> 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. >> >>>> This breaks all systems which are using _DSD. >>> >>> Err, can you elaborate? Worked fine here with _DSD on the IOT2000. >> >> Sure, the setup() function can be called several times for the same >> chip (as written in the comment inside the function). >> Definitely your code doesn't follow this, since gpiod_get_index() is >> returning -EBUSY when called 2+ time, that's what I got on all my >> tests. > > Ah, multiple devices on the same controller - I only had one. Nope, one. Since we are talking about recurrent call to gpiod_get_index() with the same index. -- With Best Regards, Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-24 12:50 +0200
Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created Jan Kiszka <jan.kiszka@web.de> - 2017-07-24 13:00 +0200
Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created Jan Kiszka <jan.kiszka@web.de> - 2017-07-24 13:10 +0200
Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-24 13:20 +0200
Re: [PATCH] spi: pxa2xx: Only claim CS GPIOs when the slave device is created Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-07-24 13:10 +0200
csiph-web