linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: martinwguy@gmail.com (Martin Guy)
To: linux-arm-kernel@lists.infradead.org
Subject: [spi-devel-general] [PATCH v3 0/2] spi: driver for Cirrus EP93xx SPI controller
Date: Sat, 17 Apr 2010 19:43:23 +0100	[thread overview]
Message-ID: <s2i56d259a01004171143m74b06d85yd1cbb38ef7ce778e@mail.gmail.com> (raw)
In-Reply-To: <20100417045913.GA19534@gw.healthdatacare.com>

(sorry for the duplicate, Mika, I forgot to include the list)

On 4/17/10, Mika Westerberg <mika.westerberg@iki.fi> wrote:
>  However, I'm not sure what you mean by limited only to built-in GPIOs? Currently
>  the driver does:
>
>         info->cs_control(spi->chip_select, value, info->data);
>
>  when it wants to assert/deassert the chip select.

There's a further strangeness when a board has a single SPI device not
using any GPIO chip select. At present, clients seem to need to
declare that they have 1 chip select and to provide an empty
cs_control function that does nothing. For example:

static void null_cs_control(unsigned cs, unsigned value, void *data) {
       /* Sim.One only has MMC card and no GPIO chip select logic */
}

static struct ep93xx_spi_info simone_spi_info = {
       .num_chipselect = 1,
       .cs_control     = null_cs_control,
       .data           = NULL,
};
...
static void __init simone_init_machine(void)
{
...
       spi_register_board_info(simone_spi_board_info,
ARRAY_SIZE(simone_spi_board_info));
       ep93xx_register_spi(&simone_spi_info);
...

Allowing cs_control to be NULL would do away with the empty function, but
when I just tried with num_chipselect = 0 the device did not appear. There
may be a better solution.

   M

  reply	other threads:[~2010-04-17 18:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-13 14:10 [PATCH v3 0/2] spi: driver for Cirrus EP93xx SPI controller Mika Westerberg
2010-04-13 14:10 ` [PATCH v3 1/2] spi: implemented " Mika Westerberg
2010-04-13 14:10   ` [PATCH v3 2/2] ep93xx: SPI driver platform support code Mika Westerberg
2010-04-16 18:40     ` [spi-devel-general] " H Hartley Sweeten
2010-04-17  6:30   ` [PATCH v3 1/2] spi: implemented driver for Cirrus EP93xx SPI controller Grant Likely
2010-04-17 11:00     ` Mika Westerberg
2010-04-19 18:02       ` Grant Likely
2010-04-19 18:52         ` Martin Guy
2010-04-19 19:05           ` Grant Likely
2010-04-19 19:26             ` Martin Guy
2010-04-19 19:16         ` Martin Guy
2010-05-20  4:56           ` Grant Likely
2010-04-20  6:16         ` Mika Westerberg
2010-04-16 18:28 ` [spi-devel-general] [PATCH v3 0/2] spi: " H Hartley Sweeten
2010-04-17  4:59   ` Mika Westerberg
2010-04-17 18:43     ` Martin Guy [this message]
2010-04-18  5:33       ` Mika Westerberg
2010-04-19 17:04     ` H Hartley Sweeten
2010-04-19 17:44       ` Mika Westerberg
2010-04-19 18:11         ` H Hartley Sweeten

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=s2i56d259a01004171143m74b06d85yd1cbb38ef7ce778e@mail.gmail.com \
    --to=martinwguy@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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).