linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Steven A. Falco" <sfalco@harris.com>
To: David Brownell <david-b@pacbell.net>
Cc: "linuxppc-dev@ozlabs.org" <linuxppc-dev@ozlabs.org>,
	Stefan Roese <sr@denx.de>
Subject: Re: Subject: [PATCH v8] spi: Add PPC4xx SPI driver
Date: Mon, 06 Jul 2009 12:19:44 -0400	[thread overview]
Message-ID: <4A522420.9040307@harris.com> (raw)
In-Reply-To: <200907021744.27636.david-b@pacbell.net>

David Brownell wrote:
> On Friday 26 June 2009, Steven A. Falco wrote:
>> +
>> +       /*
>> +        * If there are no chip selects at all, or if this is the special
>> +        * case of a non-existent (dummy) chip select, do nothing.
>> +        */
>> +
>> +       if (!hw->master->num_chipselect || hw->gpios[cs] == -EEXIST)
>> +               return;
>> +
> 
> I'm going to send this in, but please send a followup
> patch making all this "non-existent (dummy) chip select"
> stuff use the SPI_NO_CS flag.
> 

Not sure yet how this will work.  GPIOs are detected during probe.
of_get_gpio_flags() will return EEXIST for devices without a CS,
and will return the gpio number for devices with a CS, but probe
doesn't (currently) know anything about "struct spi_device".

In fact, the devices don't exist until spi_bitbang_start is called,
near the end of the probe.  So, I've not figured out how the probe
routine will set the new SPI_NO_CS flag on a per-device basis.

There is one example of a ppc board calling spi_register_board_info,
but even that board doesn't really use it, if a device tree exists.

> 
>> +       /*
>> +        * A count of zero implies a single SPI device without any chip-select.
>> +        * Note that of_gpio_count counts all gpios assigned to this spi master.
>> +        * This includes both "null" gpio's and real ones.
>> +        */
> 
> 
> 

      reply	other threads:[~2009-07-06 16:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-26 16:24 Subject: [PATCH v8] spi: Add PPC4xx SPI driver Steven A. Falco
2009-07-03  0:44 ` David Brownell
2009-07-06 16:19   ` Steven A. Falco [this message]

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=4A522420.9040307@harris.com \
    --to=sfalco@harris.com \
    --cc=david-b@pacbell.net \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=sr@denx.de \
    /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).