Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1307132

Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice

From Måns Rullgård <mans@mansr.com>
Newsgroups linux.kernel
Subject Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice
Date 2016-01-12 10:10 +0100
Message-ID <qQ37I-7fJ-27@gated-at.bofh.it> (permalink)
References <qOsWC-7b8-9@gated-at.bofh.it> <qPMzU-4ae-33@gated-at.bofh.it> <qPMTg-4l0-13@gated-at.bofh.it> <qQ2Y2-6UJ-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Nicolas Ferre <nicolas.ferre@atmel.com> writes:

> Le 11/01/2016 16:43, Måns Rullgård a écrit :
>> Nicolas Ferre <nicolas.ferre@atmel.com> writes:
>> 
>>> Le 08/01/2016 01:11, Mans Rullgard a écrit :
>>>> The driver currently chooses between internal chip-select or gpio
>>>> based on the existence of the cs-gpios DT property which fails on
>>>> non-DT systems and also enforces the same choice for all devices.
>>>
>>> Well, I fear that such a per-device choice may impact further the driver
>>> than just moving a field from one structure to another...
>> 
>> Could you please elaborate?
>
> Well, the first thing that comes to my mind is that the DT property may
> need to be  to the SPI device node and not the controller anymore, for a
> need of coherency.
> That would imply modifying the binding and I don't want that for such an
> useless "improvement".
>
>>> Moreover, I have the feeling that it was not the objective of this
>>> patch.
>> 
>> Your feeling is mistaken.  If it's somehow impossible to mix CS types,
>> please explain why.
>
> Please only fix the avr32 issue with CS gpio selection that I admit we
> have. I don't need nor want to mix CS types: it just doesn't make sense
> to allow it.

OK, fine.  I thought it could be useful (and it works), but apparently
you disagree.

Now the trouble with a global gpio vs internal setting is that we don't
know whether the non-DT platform data provides a gpio for the slave
devices when the master device is probed.  One possibility is to make
the choice based on the first slave to be registered and insist that the
rest follow suit.  I don't really like it, but I can't think of anything
else off the top of my head.  Do you have any better suggestions?

-- 
Måns Rullgård

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] spi: atmel: improve internal vs gpio chip-select choice Mans Rullgard <mans@mansr.com> - 2016-01-08 01:20 +0100
  Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-01-11 16:30 +0100
    Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Måns Rullgård <mans@mansr.com> - 2016-01-11 16:50 +0100
      Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-01-12 10:00 +0100
        Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Måns Rullgård <mans@mansr.com> - 2016-01-12 10:10 +0100
        Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Måns Rullgård <mans@mansr.com> - 2016-01-13 03:10 +0100
    Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Cyrille Pitchen <cyrille.pitchen@atmel.com> - 2016-01-11 17:40 +0100
      Re: [PATCH] spi: atmel: improve internal vs gpio chip-select choice Måns Rullgård <mans@mansr.com> - 2016-01-11 17:40 +0100

csiph-web