linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Gardiner <bengardiner@nanometrics.ca>
To: David Brownell <david-b@pacbell.net>,
	Wolfram Sang <w.sang@pengutronix.de>
Cc: spi-devel-general@lists.sourceforge.net,
	Grant Likely <grant.likely@secretlab.ca>,
	David Brownell <dbrownell@users.sourceforge.net>,
	linux-kernel@vger.kernel.org, Michael Buesch <mb@bu3sch.de>
Subject: Re: [RFC][PATCH v2 0/3] slower spi-gpio
Date: Tue, 14 Dec 2010 11:58:15 -0500	[thread overview]
Message-ID: <AANLkTin5KBeD=Q6r4bFU+Yppb4bcDAUR3ePVczgHJoT1@mail.gmail.com> (raw)
In-Reply-To: <795969.76999.qm@web180308.mail.gq1.yahoo.com>

On Thu, Dec 9, 2010 at 11:38 PM, David Brownell <david-b@pacbell.net> wrote:
> You know, the spi-gpio code was written so it
> would not need Kconfiguration, and I'd like
> to see that continued.
>
> Surely the minimal configuration you'd need
> could be wrapped up in #defineslike the
> actual GPIO numbers are wrapped up in.
>
> Heck, nothing outside your patches needs your
> :slow it way the heck down" option, so there's
> no point to exposing it  via Kconfig;
> such stuff is routinely embedded in C code.

Hi David,

Thanks for your comments. I'm glad to get a better picture of what you
expect from future proposed changes to spi_gpio.

Ok. Kconfig is clearly not an acceptable way to keep spi_gpio fast for
those who want it.

> Would it make more sense to have a separate
> slowed-down veresion of the driver, maybe just
> custom defs for our hardware plus the current
> driver body, as explained in the driver code
> (last time I looked at it, anyway).

I'm hearing that a separate driver is.

> (I notice you didn't even check the GPIOs to see
> if they are sleeping calls (e.g. over I2C), which
> would have been preferable to a static always-slow
> Kconfig option.  (But not to an always-slow object
> vs the current default always-fast model.

I hadn't thought that we could check for sleeping calls, thanks for
that suggestion.

> I still need to be able to get multi-megabit
> SPI clock rates out of the standard spi-gpio
> code base.  (When I've had to use spi-gpio it
> has never been a performance issue; the code
> was written to facilitate inner bitbang loops
> of about half a dozen instructions (ARM).

Ok so current users of spi_gpio require it to operate 'as fast as it
can.' But compile-time switching in the driver is undesireable.

What I'm taking away from the discussion is that we should introduce a
second bitbanging SPI master driver that reuses as much code as
possible from the existing spi_gpio driver.

Best Regards,
Ben Gardiner

---
Nanometrics Inc.
http://www.nanometrics.ca

      reply	other threads:[~2010-12-14 16:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19 22:19 [PATCH][RFC] spi-gpio: implement spidelay() for platforms that configure SLOWER_SPI_GPIO Ben Gardiner
2010-12-09 20:34 ` [RFC][PATCH v2 0/3] slower spi-gpio Ben Gardiner
2010-12-09 20:34   ` [RFC][PATCH v2 1/3] spi-gpio: implement spidelay() for platforms that configure SLOWER_SPI_GPIO Ben Gardiner
2010-12-09 20:34   ` [RFC][PATCH v2 2/3] spi_bitbang : get nsecs delay from cs during transfer Ben Gardiner
2010-12-10 11:46     ` Wolfram Sang
2010-12-14 16:58       ` Ben Gardiner
2010-12-14 18:08         ` Wolfram Sang
2010-12-14 18:17           ` Ben Gardiner
2010-12-09 20:34   ` [RFC][PATCH v2 3/3] spi-gpio: use _cansleep when CONFIG_SLOWER_SPI_GPIO is defined Ben Gardiner
2010-12-10  4:38   ` [RFC][PATCH v2 0/3] slower spi-gpio David Brownell
2010-12-14 16:58     ` Ben Gardiner [this message]

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='AANLkTin5KBeD=Q6r4bFU+Yppb4bcDAUR3ePVczgHJoT1@mail.gmail.com' \
    --to=bengardiner@nanometrics.ca \
    --cc=david-b@pacbell.net \
    --cc=dbrownell@users.sourceforge.net \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=w.sang@pengutronix.de \
    /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).