All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Ribeiro <drwyrm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: David Brownell <david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
Cc: Ned Forrester <nforrester-/d+BM93fTQY@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH] pxa2xx_spi: wait_rx_stall before	deasserting CS on PIO mode
Date: Thu, 11 Sep 2008 22:53:52 -0300	[thread overview]
Message-ID: <1221184432.5078.19.camel@brutus> (raw)
In-Reply-To: <200809111041.20900.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>

Em Qui, 2008-09-11 às 10:41 -0700, David Brownell escreveu:
> You could instead
> 
>     return spi_write_then_read(pcap.spi, data, 4, data, 4);

Tried this already. data == 0x00000000.
Anyway, after the latest chipselect fixes, (deassert CS on
pump_transfer() || giveback() instead of int_transfer_complete()) the
code is working.

> to get the sequential (not concurrent!) I/O you need.  Be
> careful of byte ordering, of course; you probably should
> set spi->bits_per_word to 32 and then spi_setup(), as part
> of your driver init.

Yes, i guess i really should use spi_setup().
My current code is:

        spi_message_init(&m);
        t.len = 4;
        t.tx_buf = (u8 *)data;
        t.rx_buf = (u8 *)data;
        t.bits_per_word = 32;
        t.delay_usecs = 0;
        t.cs_change = 0;
        t.speed_hz = 13000000;
        spi_message_add_tail(&t, &m);
        return spi_sync(pcap.spi, &m);

I noted that if i dont set .delay_usecs it gets a default huge value,
same with .speed_hz, it dont use spi_board_info->max_speed_hz as
default. Would calling spi_setup() on my driver init solve this? Or is
this yet another issue?

Thanks for your reply.

--
Daniel Ribeiro



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
spi-devel-general mailing list
spi-devel-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

  parent reply	other threads:[~2008-09-12  1:53 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-17 22:53 [PATCH] pxa2xx_spi: wait_rx_stall before deasserting CS on PIO mode Daniel Ribeiro
     [not found] ` <6669365c0808171553i3f64b667t18fcea589d94411a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-17 22:59   ` Daniel Ribeiro
2008-08-18 18:53   ` Ned Forrester
     [not found]     ` <48A9C515.3000908-/d+BM93fTQY@public.gmane.org>
2008-08-18 19:27       ` Daniel Ribeiro
     [not found]         ` <6669365c0808181227k2fa01d6fu570cebc10630f55d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-18 20:47           ` Ned Forrester
     [not found]             ` <48A9DFD9.9000708-/d+BM93fTQY@public.gmane.org>
2008-08-18 23:06               ` Daniel Ribeiro
     [not found]                 ` <6669365c0808181606u4ead2f27h1f2286f9365e8a7a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-19  5:58                   ` Ned Forrester
2008-08-19  5:58                   ` Daniel Ribeiro
     [not found]                     ` <6669365c0808182258t6c4a5086xd9425435930e6d8f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-08-19  6:08                       ` Ned Forrester
2008-08-19 16:48                       ` Ned Forrester
2008-09-11 17:41           ` David Brownell
     [not found]             ` <200809111041.20900.david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org>
2008-09-12  1:53               ` Daniel Ribeiro [this message]
2008-09-12  2:53                 ` Ned Forrester
2008-09-12  2:59                 ` Ned Forrester

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=1221184432.5078.19.camel@brutus \
    --to=drwyrm-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=david-b-yBeKhBN/0LDR7s880joybQ@public.gmane.org \
    --cc=nforrester-/d+BM93fTQY@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@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 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.