From: "Charles Martel" <SingerIsland-KK0ffGbhmjU@public.gmane.org>
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: Change MODE, CS, BUS, and SPEED using SPI-DEV driver?
Date: Mon, 04 Oct 2010 17:02:13 -0400 [thread overview]
Message-ID: <20101004210503.147160@gmx.com> (raw)
----- Original Message -----
From: David Brownell
Sent: 10/01/10 08:02 PM
To: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Charles Martel
Subject: Re: Change MODE, CS, BUS, and SPEED using SPI-DEV driver?
--- On Fri, 10/1/10, Charles Martel <SingerIsland-KK0ffGbhmjU@public.gmane.org> wrote: >> >> The question I have is how do I modify these settings? > Evidently you haven't yet looked at the > documentation. Try that. There's a sample > program which will be informative.
Thank you for your reply.
1) I have read numerous documents but don't see where they
explain what I need considering that only the following SPI driver
files are built:
built-in.o, hspi-s3c64xx.o, spi.o, and spi-dev.o.
I had built a kernel for the s3c6410 using linux-2.6.24.
I noticed that there are drivers for the s3c24xx but only the
"S3C6410 High Speed SPI Driver" is specific to the s3c6410.
I do not believe that the the s3c24xx series drivers are
compatible with the s3c6410. Am I wrong?
The problem I am having would go away if I could use the
s3c24xx drivers since they result in the spidev.c file being
built.
2) The following all return 0 (debug message: "Invalid ioctl option"):
ret = ioctl(fd, SPI_IOC_WR_MODE, &spiMode);
ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bitsPerWord);
ret = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &spiSpeed);
These ioctl functions are supported by the spidev_ioctl function in spidev.c.
However, as mentioned above, the "S3C6410 High Speed SPI Driver"
does not build spidev.c.
The same result happens when I use the following ioctl call:
ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
where tr structure (spi_ioc_transfer) contains the following:
tr.tx_buf = txBuf;
tr.rx_buf = rxBuf;
tr.delay_usecs = delay;
tr.speed_hz = speed;
tr.bits_per_word = 8;
tr.pad = 0;
tr.cs_change = 0;
This is what I expect since spi-dev.c does not handle these ioctl requests.
The spidev_ioctl function in spi-dev.c only handles the following:
SET_SPI_FLAGS, SET_SPI_RETRIES, and SET_SPI_TIMEOUT.
3) The following always succeeds:
ret = write(fd, txBuf, xLen);
------------------------------------------------------------------------------
Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security
easier or more difficult to achieve? Read this whitepaper to separate the
two and get a better understanding.
http://p.sf.net/sfu/hp-phase2-d2d
next reply other threads:[~2010-10-04 21:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-04 21:02 Charles Martel [this message]
[not found] ` <20101004210503.147160-KK0ffGbhmjU@public.gmane.org>
2010-10-05 0:54 ` Change MODE, CS, BUS, and SPEED using SPI-DEV driver? Jassi Brar
-- strict thread matches above, loose matches on Subject: below --
2010-10-01 17:40 Charles Martel
[not found] ` <20101001175135.147160-KK0ffGbhmjU@public.gmane.org>
2010-10-02 0:02 ` 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=20101004210503.147160@gmx.com \
--to=singerisland-kk0ffgbhmju@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.