From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Federico Vaga <federico.vaga-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
a.sappia-197Af0g7QoUlk5EcyZIkJQ@public.gmane.org,
puria.nafisi-yFROiS3d6cY@public.gmane.org,
Laxman Dewangan
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: How to correctly use spi_slave_tegra
Date: Thu, 15 Nov 2012 11:47:54 -0700 [thread overview]
Message-ID: <50A538DA.2010906@wwwdotorg.org> (raw)
In-Reply-To: <3877625.uASAU6TrGF@number-5>
On 11/13/2012 01:08 PM, Federico Vaga wrote:
> Hi,
>
> I'm working on the SPI bus on a Nvidia Tegra 2 system (Toradex Colibri). I'm
> using kernel 2.6.32 with toradex and nvidia patches.
Laxman, are you able to help with these questions?
That's a very old kernel. I doubt anyone really remembers much about the
NVIDIA custom code we applied to it. Are you sure you have 2.6.32
anyway; the only copy of NVIDIA's 2.6.32-based kernel I have doesn't
include the Tegra SPI slave driver as far as I can tell.
I'd recommend at least upgrading to the most recent NVIDIA downstream
kernel so that people still remember the code.
I should recommend switching to an upstream kernel, but we don't have
any SPI slave driver there at all, nor yet Colibri support, so that
wouldn't be much use, unless you want to upstream the support yourself...
> I need to use one of the Tegra SPI controller in Slave mode. I know that the
> Linux kernel does not support the Slave mode for SPI controllers, but I see
> the drivers/spi/spi_slave_tegra.c driver which is not documented and it is not
> commented, also the author name is missing. The only information available is
> the Nvidia Copyright 2011.
>
> Toradex does not tested the spi_slave_tegra and cannot provides an example of
> driver which use the spi_slave_tegra.
>
> I read the code and I see that spi_slave_tegra use the SPI framework also if
> the SPI framework supports only master controller.
>
> Anyone ever use the spi_slave_tegra? It works? Can you provide an example?
>
> As I understand:
> - obviously I must configure SPI before master start communication
> - speed_hz must be the same of the master
> - I must use spi_async (spi_sync can freeze the driver)
> - Only messages with single transfer. If the master sends messages with
> multiple transfer, I must receive them with a single transfer
> - I have two callback. the message->complete from the SPI framework and the
> spi_tegra_register_callback from the spi_slave_tegra
From a very very very brief look at ouor android-tegra-nv-3.1 branch,
your understanding sounds at least reasonable even if not correct!
next prev parent reply other threads:[~2012-11-15 18:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 20:08 How to correctly use spi_slave_tegra Federico Vaga
2012-11-15 18:47 ` Stephen Warren [this message]
[not found] ` <50A538DA.2010906-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-11-15 19:04 ` Laxman Dewangan
[not found] ` <50A53CB7.1090705-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-15 19:19 ` Federico Vaga
2012-11-15 19:41 ` Federico Vaga
2012-11-15 23:23 ` Laxman Dewangan
[not found] ` <50A57959.1040208-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-11-15 23:37 ` Federico Vaga
2012-11-15 19:10 ` Federico Vaga
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=50A538DA.2010906@wwwdotorg.org \
--to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
--cc=a.sappia-197Af0g7QoUlk5EcyZIkJQ@public.gmane.org \
--cc=federico.vaga-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=puria.nafisi-yFROiS3d6cY@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 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).