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 19:59 UTC|newest]
Thread overview: 17+ 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:08 ` [PATCH 1/2 v2] spi: s3c64xx: use "cs-gpios" from " Naveen Krishna Chatradhi
2014-06-10 10:39 ` Sylwester Nawrocki
2014-06-10 11:00 ` Naveen Krishna Ch
2014-06-10 18:09 ` Doug Anderson
2014-06-10 19:43 ` Tomasz Figa
2014-06-10 20:32 ` Rob Herring
2014-06-11 12:22 ` Sylwester Nawrocki
2014-06-10 18:26 ` Doug Anderson
2014-06-10 19:25 ` Tomasz Figa
2014-06-11 6:10 ` Naveen Krishna Ch
2014-06-10 19:49 ` Tomasz Figa
2014-06-10 19:58 ` Doug Anderson
2014-06-10 19:59 ` Tomasz Figa [this message]
2014-06-10 20:21 ` Doug Anderson
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
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=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;
as well as URLs for NNTP newsgroup(s).