From: Tomasz Figa <tomasz.figa@gmail.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Naveen Krishna Chatradhi <ch.naveen@samsung.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
spi-devel-general@lists.sourceforge.net,
linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
Naveen Krishna <naveenkrishna.ch@gmail.com>,
"broonie@kernel.org" <broonie@kernel.org>,
Grant Likely <grant.likely@secretlab.ca>,
Jaswinder Singh <jaswinder.singh@linaro.org>,
Kukjin Kim <kgene.kim@samsung.com>, "cpgs ." <cpgs@samsung.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: Re: [PATCH 1/2 v2] spi: s3c64xx: use "cs-gpios" from spi node instead of "cs-gpio"
Date: Tue, 10 Jun 2014 21:59:59 +0200 [thread overview]
Message-ID: <539763BF.1030209@gmail.com> (raw)
In-Reply-To: <CAD=FV=X5nLM3Yqkvk+UqVZPFzVNHmPDn3y+euYDwZ3M2bG+0Cg@mail.gmail.com>
On 10.06.2014 21:58, Doug Anderson wrote:
> Tomasz,
>
> On Tue, Jun 10, 2014 at 12:49 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> This is wrong. The "cs-gpios" property is supposed to be an array,
>> indexed by chip select number of SPI devices (indicated by their "reg"
>> properties).
>>
>> Moreover, is there a need to parse this manually in this driver? I can
>> see respective parsing code in of_spi_register_master().
>
> I noticed this too (see my response), but I was confused about the
> fact that nobody else uses the array created by
> of_spi_register_master(). Any idea why?
Hmm, I can see of_spi_register_master() assigning allocated pointer to
master->cs_gpios, which is then used in spi_add_device() as follows:
if (master->cs_gpios)
spi->cs_gpio = master->cs_gpios[spi->chip_select];
Best regards,
Tomasz
WARNING: multiple messages have this Message-ID (diff)
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2 v2] spi: s3c64xx: use "cs-gpios" from spi node instead of "cs-gpio"
Date: Tue, 10 Jun 2014 21:59:59 +0200 [thread overview]
Message-ID: <539763BF.1030209@gmail.com> (raw)
In-Reply-To: <CAD=FV=X5nLM3Yqkvk+UqVZPFzVNHmPDn3y+euYDwZ3M2bG+0Cg@mail.gmail.com>
On 10.06.2014 21:58, Doug Anderson wrote:
> Tomasz,
>
> On Tue, Jun 10, 2014 at 12:49 PM, Tomasz Figa <tomasz.figa@gmail.com> wrote:
>> This is wrong. The "cs-gpios" property is supposed to be an array,
>> indexed by chip select number of SPI devices (indicated by their "reg"
>> properties).
>>
>> Moreover, is there a need to parse this manually in this driver? I can
>> see respective parsing code in of_spi_register_master().
>
> I noticed this too (see my response), but I was confused about the
> fact that nobody else uses the array created by
> of_spi_register_master(). Any idea why?
Hmm, I can see of_spi_register_master() assigning allocated pointer to
master->cs_gpios, which is then used in spi_add_device() as follows:
if (master->cs_gpios)
spi->cs_gpio = master->cs_gpios[spi->chip_select];
Best regards,
Tomasz
next prev parent reply other threads:[~2014-06-10 20:00 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 10:07 [PATCH 0/2 v2] spi: s3c64xx: use "cs-gpios" in spi node instead of "cs-gpio" Naveen Krishna Chatradhi
2014-06-10 10:07 ` Naveen Krishna Chatradhi
2014-06-10 10:08 ` [PATCH 1/2 v2] spi: s3c64xx: use "cs-gpios" from " Naveen Krishna Chatradhi
2014-06-10 10:08 ` Naveen Krishna Chatradhi
2014-06-10 10:39 ` Sylwester Nawrocki
2014-06-10 10:39 ` Sylwester Nawrocki
2014-06-10 11:00 ` Naveen Krishna Ch
2014-06-10 11:00 ` Naveen Krishna Ch
2014-06-10 18:09 ` Doug Anderson
2014-06-10 18:09 ` Doug Anderson
2014-06-10 19:43 ` Tomasz Figa
2014-06-10 19:43 ` Tomasz Figa
2014-06-10 20:32 ` Rob Herring
2014-06-10 20:32 ` Rob Herring
2014-06-11 12:22 ` Sylwester Nawrocki
2014-06-11 12:22 ` Sylwester Nawrocki
2014-06-10 18:26 ` Doug Anderson
2014-06-10 18:26 ` Doug Anderson
2014-06-10 19:25 ` Tomasz Figa
2014-06-10 19:25 ` Tomasz Figa
[not found] ` <CAD=FV=WgvyF-P+69SdmCGX0jxJ3FVxpa+AcgQKg-Emya_W-w3Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-11 6:10 ` Naveen Krishna Ch
2014-06-11 6:10 ` Naveen Krishna Ch
2014-06-10 19:49 ` Tomasz Figa
2014-06-10 19:49 ` Tomasz Figa
2014-06-10 19:58 ` Doug Anderson
2014-06-10 19:58 ` Doug Anderson
2014-06-10 19:59 ` Tomasz Figa [this message]
2014-06-10 19:59 ` Tomasz Figa
2014-06-10 20:21 ` Doug Anderson
2014-06-10 20:21 ` Doug Anderson
2014-06-11 6:16 ` Naveen Krishna Ch
2014-06-11 6:16 ` Naveen Krishna Ch
2014-06-10 10:08 ` [PATCH 2/2 v2] ARM: DTS: move "cs-gpio" from "controller-data" to under spi node Naveen Krishna Chatradhi
2014-06-10 10:08 ` Naveen Krishna Chatradhi
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=539763BF.1030209@gmail.com \
--to=tomasz.figa@gmail.com \
--cc=broonie@kernel.org \
--cc=ch.naveen@samsung.com \
--cc=cpgs@samsung.com \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=grant.likely@secretlab.ca \
--cc=jaswinder.singh@linaro.org \
--cc=javier.martinez@collabora.co.uk \
--cc=kgene.kim@samsung.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=naveenkrishna.ch@gmail.com \
--cc=spi-devel-general@lists.sourceforge.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.