linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Gamari <bgamari-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Ben Dooks <ben-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org>
Cc: David Brownell
	<dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Michael Hennerich
	<michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org>,
	beagleboard <beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
	Eric Miao <eric.miao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>,
	spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-omap <linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: (no subject)
Date: Wed, 20 Jan 2010 14:47:23 -0500	[thread overview]
Message-ID: <1264016711-sup-309@ben-laptop> (raw)

Bcc: 
Subject: GPIO chip select support in omap2_mcspi driver

Hey,

Recently I have been looking to use a BeagleBoard to drive several
serial ADCs and DACs in a data acquisition and analysis setup. Unfortunately, the
BeagleBoard is severely limited by the number of SPI controllers it
exposes on the expansion connector (McSPI3 with 2 CS lines and McSPI4
with one). This is insufficient for our application and thus I have been
investigating adding support to the mcspi driver for using GPIO lines as
chip select lines, as is done in the pxa2xx, bfin5xx, and s3c24xx drivers.

To this end, I have a few questions about how this support was
implemented. First, it seems that the s3c24xx driver is built on the
spi_bitbang driver, despite interfacing with a dedicated hardware SPI
controller.  What is the reason for this? Was this done specifically for
the purpose of incorporating support for GPIO CS pins?

It seems like the rough idea is to add a cs_gpio field to the device
struct (omap2_mcspi) and add the appropriate code to the
omap2_mcspi_force_cs() to bring cs_gpio high or low if it is valid. The
potential problem I can see with this is that omap2_mcspi_set_enable()
is called to enable the channel before the force_cs() is called (in
omap2_mcspi_work()). If I'm interpreting the documentation correctly,
the enable bit starts the clocks, meaning that the chip will begin
clocking out data before CS is brought high. I must be missing something
here, no?

For reference, I included a short list of relevant commits below, largely for
my own benefit. I would greatly appreciate any feedback you might have.

Thanks,
- Ben


pxa2xx_spi: a7bb3909b3293d503211d7f6af8ed62c1644b686
bfin_spi: 42c78b2bf51bafb4cfa98dfecc28dd9b8bcd04b0

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev

             reply	other threads:[~2010-01-20 19:47 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-20 19:47 Ben Gamari [this message]
2010-01-21  0:04 ` Ben Dooks
2010-01-21  0:04 ` (no subject) Ben Dooks
2010-01-21  0:04 ` Ben Dooks
2010-01-22 15:53 ` Re: Ben Gamari
2010-01-28  4:10 ` McSPI questions pertaining to GPIO chip select support Ben Gamari
     [not found] ` <1264651770-sup-5197@ben-laptop>
2010-01-28  4:15   ` Bill Gatliff
2010-01-28  4:25     ` Ben Gamari
2010-01-28  4:27       ` Bill Gatliff
2010-01-28  4:33   ` jassi brar
     [not found]     ` <1b68c6791001272033q60dd31dbif4de285cd9bac83d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-29  0:32       ` Ben Gamari
2010-01-29  1:09         ` jassi brar
     [not found]           ` <1b68c6791001281709l7d11da30lee486632e85b99cb-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-01-29  1:58             ` Ben Gamari
2010-12-21 17:56       ` [RFC PATCH] GPIO chip select support for McSPI Ben Gamari
2010-12-21 17:56       ` [PATCH] mcspi: Add support for GPIO chip select lines Ben Gamari
     [not found]     ` <1292954195-20204-2-git-send-email-bgamari.foss@gmail.com>
2010-12-23 19:59       ` Tony Lindgren
2010-12-23 21:38       ` Grant Likely
2010-12-23 23:09         ` Ben Gamari
2010-12-24  0:37           ` Grant Likely
2010-12-24  2:27             ` Ben Gamari
2010-12-24  3:28               ` Grant Likely
2010-12-24  6:05                 ` Ben Gamari
2011-02-12  8:33                   ` Grant Likely
2011-02-13 22:07                     ` Ben Gamari
2011-08-30 10:14   ` McSPI questions pertaining to GPIO chip select support Raju Sana
2011-08-30 13:50     ` Ben Gamari
2011-08-30 13:50       ` [PATCH] mcspi: Add support for GPIO chip select lines Ben Gamari
2011-08-30 13:52       ` [PATCH] beagledaq: Hack in cs_gpios Ben Gamari
     [not found]         ` <1314712343-27367-1-git-send-email-bgamari.foss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2011-09-05 12:42           ` Raju Sana
  -- strict thread matches above, loose matches on Subject: below --
2017-01-13 10:46 [PATCH v3 4/8] x86: stop exporting msr-index.h to userland Nicolas Dichtel
2017-01-09 11:33 ` [PATCH v2 0/7] uapi: export all headers under uapi directories Arnd Bergmann
2017-01-13 10:46   ` [PATCH v3 0/8] " Nicolas Dichtel
2017-01-13 15:43     ` (no subject) David Howells
2009-12-13 20:22 Darrell
2008-11-18  7:52 Bryan Wu
2007-11-01 20:27 张先生
2007-10-09 20:03 蔡先生
2007-10-09 19:28 蔡先生
2007-10-09 17:05 蔡先生
2007-10-09 15:29 蔡先生
2007-10-08 18:35 蔡先生
2007-10-08 18:29 蔡先生
2007-10-08 18:16 蔡先生
2007-10-08 17:06 蔡先生
2007-10-06 23:59 蔡先生
2007-10-06 19:30 蔡先生
2007-10-06 15:33 蔡先生
2007-10-06 10:34 蔡先生
2007-10-06 10:03 蔡先生
2007-10-06  9:53 蔡先生
2007-10-02 15:49 蔡先生
2007-10-02 14:33 蔡先生
2007-10-02  5:55 蔡先生
2007-09-22 14:05 蔡先生
2007-07-27 11:17 Stacy Lilly
2007-07-21  8:25 Joachim B.Byrne

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=1264016711-sup-309@ben-laptop \
    --to=bgamari-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=beagleboard-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    --cc=ben-Y5A6D6n0/KfQXOPxS62xeg@public.gmane.org \
    --cc=dbrownell-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=eric.miao-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=michael.hennerich-OyLXuOCK7orQT0dZR+AlfA@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --subject='Re: (no subject)' \
    /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

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).