All of lore.kernel.org
 help / color / mirror / Atom feed
From: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
To: Wayne Tams <wayne.tams-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: i.MX: GPIO based SPI chip selects question
Date: Sat, 29 Oct 2011 22:44:51 +0200	[thread overview]
Message-ID: <20111029204450.GA31910@tarshish> (raw)
In-Reply-To: <CAN=k24kKWd9TPDbkWTCOSn48FNOi9DUALGd9XmeQ_xOJ=Kxd9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

Hi Wayne,

On Fri, Oct 28, 2011 at 02:06:16PM +0100, Wayne Tams wrote:
> Can I use GPIO pins on my i.mx53 for SPI chip select, I have found little
> on the web that can help me, I am hoping that it is straight-forward enough
> for me to implement it? Perhaps there is a macro that I can use in the
> spi_board_info structure that will let me declare the GPIO?

If you are using the mainline kernel then the SPI driver 
(drivers/spi/spi-imx.c) supports the use of GPIO lines for chip-select 
exclusively. You can find an i.MX53 specific example in 
arch/arm/mach-mx5/board-mx53_evk.c (look for the mx53_evk_spi_data struct).  
This example demonstrate the use of two GPIOs for chip-select, but the list of 
chip-selects can be longer.

Since you appear to be using the Freescale supplied kernel (as I infer from 
your previous question on this list), you are probably using different driver.  
This driver (likely 
http://opensource.freescale.com/git?p=imx/linux-2.6-imx.git;a=blob;f=drivers/spi/mxc_spi.c;h=8c722686a0e1a419b417c0e2f98a4d6f028cf02e;hb=a1cd8a787a18da69ac4e48cfc876623bd7323799) 
does not support GPIOs for chip-select.

Freescale seem to have abandoned their in-house non mainlined SPI driver in a 
later version of their kernel (rel_imx_2.6.38_11.09.01 tag in 
http://opensource.freescale.com/git) so you may want to update your kernel.

baruch

-- 
                                                     ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org - tel: +972.2.679.5364, http://www.tkos.co.il -

------------------------------------------------------------------------------
Get your Android app more play: Bring it to the BlackBerry PlayBook 
in minutes. BlackBerry App World&#153; now supports Android&#153; Apps 
for the BlackBerry&reg; PlayBook&#153;. Discover just how easy and simple 
it is! http://p.sf.net/sfu/android-dev2dev

  parent reply	other threads:[~2011-10-29 20:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 13:06 i.MX: GPIO based SPI chip selects question Wayne Tams
     [not found] ` <CAN=k24kKWd9TPDbkWTCOSn48FNOi9DUALGd9XmeQ_xOJ=Kxd9g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-29 11:51   ` Grant Likely
2011-10-29 20:44   ` Baruch Siach [this message]
2011-10-31  9:26     ` Wayne Tams
     [not found]       ` <CAN=k24nenVPG=V6mvhaRajTL2BORdN7KYmP2R16P72rkkLx6Eg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-10-31  9:52         ` Baruch Siach

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=20111029204450.GA31910@tarshish \
    --to=baruch-nswtu9s1w3p6gbpvegmw2w@public.gmane.org \
    --cc=spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=wayne.tams-Re5JQEeQqe8AvxtiuMwx3w@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.