public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Street <stephen@streetfiresound.com>
To: Mike Lee <eemike@gmail.com>
Cc: linux-kernel@vger.kernel.org, David Brownell <david-b@pacbell.net>
Subject: Re: [PATCH/RFC] simple SPI controller on PXA2xx SSP port, refresh
Date: Thu, 27 Oct 2005 09:41:00 -0700	[thread overview]
Message-ID: <1130431260.22836.19.camel@localhost.localdomain> (raw)
In-Reply-To: <1ffb4b070510270433t2d45cd5cwe71705f7aeddb283@mail.gmail.com>

On Thu, 2005-10-27 at 19:33 +0800, Mike Lee wrote:
> Dear Stepen
>    I am now writing another controller driver by david's framework.
> But leak of debuging layer, could your loopback driver serve for this
> purpose and how could i use it?
> 

The file pxa2xx_loopback.c should be controller independent, but it does
require that the hardware (in my case the PXA255 NSSP) support a
loopback mode (i.e. tx connected to rx).

To create a loopback device for driver you should include:

static struct pxa2xx_spi_chip loopback_chip_info = {
	.mode = SPI_MODE_3,
	.tx_threshold = 12,
	.rx_threshold = 4,
	.dma_burst_size = 8,
	.bits_per_word = 8,
	.timeout_microsecs = 64,
	.enable_loopback = 1,
};

static struct spi_board_info streetracer_spi_board_info[] __initdata = {
	{
		.modalias = "loopback",
		.max_speed_hz = 3686400,
		.bus_num = 2,
		.chip_select = 3,
		.controller_data = &loopback_chip_info,
	},
};

in your board init code and install the module per your configuration.
Anything written to /dev/slp23 will be echoed back to /dev/slp23 via the
"SPI controller".

Hope this helps!

-Stephen



  reply	other threads:[~2005-10-27 16:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-25 23:48 [PATCH/RFC] simple SPI controller on PXA2xx SSP port, refresh stephen
2005-10-27 11:33 ` Mike Lee
2005-10-27 16:41   ` Stephen Street [this message]
2005-10-29 18:25     ` Mike Lee
2005-11-01 18:35       ` Stephen Street
2005-11-03  9:37         ` Mike Lee
2005-11-04 18:11           ` Stephen Street
2005-11-04 20:36             ` Mark Underwood
2005-11-07 20:43               ` Mark Underwood
  -- strict thread matches above, loose matches on Subject: below --
2005-11-04  0:15 David Brownell
2005-11-04 18:52 ` Stephen Street
2005-11-04 20:16   ` David Brownell
2005-11-04 23:38     ` Stephen Street
2005-11-05  0:54       ` David Brownell
2005-11-05  2:28         ` Stephen Street
2005-11-05 20:58           ` David Brownell

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=1130431260.22836.19.camel@localhost.localdomain \
    --to=stephen@streetfiresound.com \
    --cc=david-b@pacbell.net \
    --cc=eemike@gmail.com \
    --cc=linux-kernel@vger.kernel.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