mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Johannes Stezenbach <js@sig21.net>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: SPI chip select problem
Date: Mon, 25 Jun 2012 12:48:59 +0200	[thread overview]
Message-ID: <20120625104859.GA10844@sig21.net> (raw)
In-Reply-To: <CAA4bVAHqT37AuMbBUia4FGSdayQXvSYJ63hok_fYSaZpZHQK6A@mail.gmail.com>

On Mon, Jun 25, 2012 at 02:07:34PM +0400, Antony Pavlov wrote:
> On 25 June 2012 12:53, Johannes Stezenbach <js@sig21.net> wrote:
> > On Mon, Jun 25, 2012 at 11:45:06AM +0400, Antony Pavlov wrote:
> >>
> >> There is the 'cs_change' flag for *_spi_transfer() method, but this
> >> flag does not used at all!
> >
> > altera_spi.c and mic_spi.c use it, but often this is not needed (e.g. for
> > SPI flashes) so to keep the code simple and small it might be better
> > to not implement cs_change handling.
> 
> But I have not found any common code where cs_change is managed.

It doesn't need to be handled in common code, the spi_device
driver requests a cs_change if it needs one, the spi_master driver
programs the hardware to do it.  Common code in drivers/spi/spi.c
doesn't need to care.  (To clarify: cs_change does not mean
to switch from one CS to another, it means to pulse the
CS line between spi_transfers of a spi_message.  Some devices
need that in some cases.)


Johannes

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2012-06-25 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25  7:45 Antony Pavlov
2012-06-25  8:53 ` Johannes Stezenbach
2012-06-25 10:07   ` Antony Pavlov
2012-06-25 10:48     ` Johannes Stezenbach [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=20120625104859.GA10844@sig21.net \
    --to=js@sig21.net \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@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