devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Grygorii Strashko <grygorii.strashko-l0cyMroinI0@public.gmane.org>
To: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	santosh.shilimkar-l0cyMroinI0@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH v2 1/2] spi: davinci: add support to configure gpio cs through dt
Date: Fri, 1 Aug 2014 21:24:52 +0300	[thread overview]
Message-ID: <53DBDB74.3070205@ti.com> (raw)
In-Reply-To: <20140801173506.GB30458-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>

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-l0cyMroinI0@public.gmane.org>
>>
>> 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

  parent 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
     [not found] ` <1406911233-18999-1-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2014-08-01 16:40   ` [PATCH v2 1/2] spi: davinci: add support to configure " Grygorii Strashko
     [not found]     ` <1406911233-18999-2-git-send-email-grygorii.strashko-l0cyMroinI0@public.gmane.org>
2014-08-01 17:26       ` Mark Brown
     [not found]         ` <20140801172620.GA30458-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2014-08-01 18:20           ` Grygorii Strashko
2014-08-01 17:35       ` Mark Brown
     [not found]         ` <20140801173506.GB30458-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
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-l0cymroini0@public.gmane.org \
    --cc=broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=davinci-linux-open-source-VycZQUHpC/PFrsHnngEfi1aTQe2KTcn/@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=santosh.shilimkar-l0cyMroinI0@public.gmane.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;
as well as URLs for NNTP newsgroup(s).