All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andrey Yurovsky" <andrey@cozybit.com>
To: "Harald Welte" <laforge@gnumonks.org>
Cc: "Colin McCabe" <colin@cozybit.com>,
	linux-wireless@vger.kernel.org, libertas-dev@lists.infradead.org,
	"Stefan Schmidt" <stefan@datenfreihafen.org>
Subject: Re: [PATCH 3/3] libertas: if_spi, driver for libertas GSPI devices
Date: Fri, 19 Dec 2008 08:31:13 -0800	[thread overview]
Message-ID: <45e8e6c40812190831k7796e240w55c47d7ca6417437@mail.gmail.com> (raw)
In-Reply-To: <20081219160836.GQ9285@prithivi.gnumonks.org>

Thanks Harald,

On Fri, Dec 19, 2008 at 8:08 AM, Harald Welte <laforge@gnumonks.org> wrote:
> Hi Colin,
>
> thanks a lot for your patch, it is greatly appreciated.
>
> Stefan Schmidt (see Cc) and myself are currently working on using a 8686
> attached t o SPI of a S3C2442 SoC.
>
> Let me make some comments on the actual code:
>
> On Mon, Dec 15, 2008 at 07:27:32PM -0800, Colin McCabe wrote:
>
>> +struct libertas_spi_platform_data {
>> +     u16 host_irq_num;
>> +
>> +     u16 gpio_cs;
>> +};
>
>> +     gpio_set_value(card->gpio_cs, 0); /* assert CS */
>> +     gpio_set_value(card->gpio_cs, 1); /* drop CS */
>
> Typically, in the Linux SPI framework, it is the SPI host controller
> driver that exercises the chipselect GPIO, not the client (device) driver.

The '8686 requires us to assert CS# and then hold it asserted for the
entire transaction.  The transaction is an arbitrary number of SPI
transfers.  Most host controllers cannot do this (they'll toggle CS#
between individual transactions) and therefore we chose to not use the
controller CS# line and use a GPIO.  Can you suggest a different way
to do this given the current SPI framework?

> Also, the host_irq_num is typically passed by the '.irq' member of
> spi_board_info structure, since it is board specific data (see e.g.
> arch/arm/mach-pxa/spitz.c)

The IRQ in question is a GPIO line asserted by the '8686 and it is not
otherwise an SPI line, however I see now that it should be set in
spi_board_info as you mention, we'll fix that.

  -Andrey

  reply	other threads:[~2008-12-19 16:31 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-16  3:27 [PATCH 0/3] libertas: driver for GSPI devices Colin McCabe
2008-12-16  3:27 ` [PATCH 1/3] libertas: Fix alignment issues in libertas core Colin McCabe
2008-12-16  3:27   ` [PATCH 2/3] libertas: Update libertas core with GSPI constants Colin McCabe
2008-12-16  3:27     ` [PATCH 3/3] libertas: if_spi, driver for libertas GSPI devices Colin McCabe
2008-12-16  3:44       ` Angel Roman
2008-12-16 17:38         ` Dan Williams
2008-12-16 18:05           ` Angel Roman
2008-12-16 18:08           ` Andrey Yurovsky
2008-12-19 16:08       ` Harald Welte
2008-12-19 16:31         ` Andrey Yurovsky [this message]
2008-12-19 16:57           ` Peter Wippich
2008-12-19 18:17             ` Andrey Yurovsky
2008-12-23 20:25             ` Colin McCabe
2008-12-16 15:56 ` [PATCH 0/3] libertas: driver for " Peter Wippich
2008-12-16 16:56   ` Andrey Yurovsky
2008-12-17 11:09     ` Peter Wippich

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=45e8e6c40812190831k7796e240w55c47d7ca6417437@mail.gmail.com \
    --to=andrey@cozybit.com \
    --cc=colin@cozybit.com \
    --cc=laforge@gnumonks.org \
    --cc=libertas-dev@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=stefan@datenfreihafen.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.