public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: grygorii.strashko@ti.com (Grygorii Strashko)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/2] spi: davinci: add support to configure gpio cs through dt
Date: Fri, 01 Aug 2014 21:24:52 +0300	[thread overview]
Message-ID: <53DBDB74.3070205@ti.com> (raw)
In-Reply-To: <20140801173506.GB30458@sirena.org.uk>

On 08/01/2014 08:35 PM, Mark Brown wrote:
> On Fri, Aug 01, 2014 at 07:40:32PM +0300, Grygorii Strashko wrote:
>> From: Murali Karicheri <m-karicheri2@ti.com>
>>
>> Currently driver supports only configuration of GPIO CS through
>> platform data. This patch enhances the driver to configure GPIO
>> CS through DT. Also update the DT binding documentation to
>> reflect the availability of cs-gpios.
> 
> Ah, sorry - this is the unapplied patch from before.  It would have been
> much better to submit this as the second patch after your rework patch
> since this...
> 

I can do this, but It will wait for a week :(

>> -	if (pdata->chip_sel && chip_sel < pdata->num_chipselect &&
>> -				pdata->chip_sel[chip_sel] != SPI_INTERN_CS)
>> +	if (np && master->cs_gpios != NULL && spi->cs_gpio >= 0) {
>> +		/* SPI core parse and update master->cs_gpio */
>>   		gpio_chipsel = true;
>> +		gpio = spi->cs_gpio;
>> +	} else if (pdata->chip_sel &&
>> +		   chip_sel < pdata->num_chipselect &&
>> +		   pdata->chip_sel[chip_sel] != SPI_INTERN_CS) {
>> +		/* platform data defines chip_sel */
>> +		gpio_chipsel = true;
>> +		gpio = pdata->chip_sel[chip_sel];
>> +	}
> 
> ...still looks excessively confusing - it is way more logic than I'd
> expect to see on every chip select.
> 

Yep. Finally, patch "[PATCH v2 2/2] spi: davinci: use spi_device.cs_gpio to store gpio cs per spi device"
simplifies logic above.

Regards,
-grygorii

  reply	other threads:[~2014-08-01 18:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01 16:40 [PATCH v2 0/2] spi: davinci: add support for gpio cs through dt Grygorii Strashko
2014-08-01 16:40 ` [PATCH v2 1/2] spi: davinci: add support to configure " Grygorii Strashko
2014-08-01 17:26   ` Mark Brown
2014-08-01 18:20     ` Grygorii Strashko
2014-08-01 17:35   ` Mark Brown
2014-08-01 18:24     ` Grygorii Strashko [this message]
2014-08-01 18:21   ` Mark Brown
2014-08-01 16:40 ` [PATCH v2 2/2] spi: davinci: use spi_device.cs_gpio to store gpio cs per spi device Grygorii Strashko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53DBDB74.3070205@ti.com \
    --to=grygorii.strashko@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox