From: Michael Buesch <mb@bu3sch.de>
To: David Brownell <david-b@pacbell.net>
Cc: Randy Dunlap <randy.dunlap@oracle.com>, gregkh <greg@kroah.com>,
Andrew Morton <akpm@linux-foundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
"linux-kernel" <linux-kernel@vger.kernel.org>,
Piot Skamruk <piotr.skamruk@gmail.com>,
Pierre Ossman <drzeus-mmc@drzeus.cx>,
openwrt-devel@lists.openwrt.org
Subject: Re: [PATCH v2] Add GPIO-based MMC/SD driver
Date: Mon, 21 Jul 2008 23:21:59 +0200 [thread overview]
Message-ID: <200807212322.00025.mb@bu3sch.de> (raw)
In-Reply-To: <200807211341.35766.david-b@pacbell.net>
On Monday 21 July 2008 22:41:35 David Brownell wrote:
> So what this driver adds is mostly a userspace interface, yes?
Mostly. It also provides a simple platform device.
> If so, please refocus the descriptions a bit more on that;
> it's not actually a "GPIO based MMC/SD driver"; it's really
> a "Configfs creation interface for GPIO based MMC/SD".
>
>
> > > + res = sscanf(buf, "%" GPIOMMC_MAX_NAMELEN_STR "s %u %u %u %u %u %u %u %u",
>
> Kind of ugly, yes? ;)
This is already gone.
> Please switch to the more conventional "MOSI" (Master Out, Slave In)
> and "MISO" (Master In, Slave Out). That's unambiguous. If you want
> to be a bit more clear you could say that MOSI goes to the MMC/SD
> card pin 2 (card data in), and MISO goes to MMC/SD card pin 7 (card
> data out).
Maybe.
> > > + if (res < 8)
> > > + pdata->p.no_spi_delay = 0; /* Default: Delay turned on */
> > > + if (res < 7)
> > > + pdata->p.max_bus_speed = 5000000; /* Default: 5Mhz */
>
> So I'd default to leaving the delay off
How to?
> > > + if (res < 6)
> > > + pdata->p.mode = 0; /* Default: SPI mode 0 */
>
> Don't need to do this. The mmc_spi driver forces mode 0 in
> any case...
Where's that documented?
> > > +config GPIOMMC
> > > + tristate "MMC/SD over GPIO-based SPI"
>
> "Sysfs interface for ..."
>
> Because we can already do MMC/SD over GPIO-SPI,
> without using this code.
This also adds a platform device interface for convenience
(as it also uses that internally).
> > > +config MMC_S3C
> > > + tristate "Samsung S3C SD/MMC Card Interface support"
> > > + depends on ARCH_S3C2410 && MMC
>
> MMC_S3C doesn't belong in this patch...
Yeah that was a mismerge. You are commenting on an obsolete patch.
> > > + * @no_spi_delay: Do not use delays in the lowlevel SPI bitbanging code.
> > > + * This is not standards compliant, but may be required for some
> > > + * embedded machines to gain reasonable speed.
>
> Rather than emphasize "not standards compliant", I'd instead emphasize that
> bitbanged SPI is so slow that you probably don't want to slow it down any
> more by additional delays between per-bit operations!
I'd say you cannot tell how fast the GPIOs are. They can be pretty fast
on a huge machine.
> Again, please don't promote a *SECOND* platform-device based mechanism
It is not a second mechanism, it is a mechanism on top of the first two
mechanisms.
> > > +Registering devices via platform-device
> > > +=======================================
> > > +
> > > +The platform-device interface is used for registering MMC/SD devices that are
> > > +part of the hardware platform. This is most useful only for embedded machines
> > > +with MMC/SD devices statically connected to the platform GPIO bus.
>
> There is no "platform GPIO bus" ...
hm??
> This is the interface I'd rather just not see exposed ...
People asked me to expose it. It was hidden in the first patch that
I submitted. I'm not going to change this just to see the next one
yelling "I want to see this interface in public" again.
> > > +Registering devices via sysfs
> > > +=============================
>
> This is the interface I don't have any particular issues with.
Yeah, but it's gone. See updated patches.
--
Greetings Michael.
prev parent reply other threads:[~2008-07-21 21:23 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-18 20:01 [PATCH v2] Add GPIO-based MMC/SD driver Michael Buesch
2008-07-18 22:10 ` Randy Dunlap
2008-07-18 22:38 ` Michael Buesch
2008-07-18 22:59 ` Greg KH
2008-07-18 23:19 ` Michael Buesch
2008-07-21 20:41 ` David Brownell
2008-07-21 20:53 ` Randy Dunlap
2008-07-27 23:30 ` David Brownell
2008-07-27 23:34 ` David Brownell
2008-07-28 13:11 ` Michael Buesch
2008-07-28 20:03 ` Piotr Skamruk
2008-07-21 21:21 ` Michael Buesch [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=200807212322.00025.mb@bu3sch.de \
--to=mb@bu3sch.de \
--cc=akpm@linux-foundation.org \
--cc=david-b@pacbell.net \
--cc=drzeus-mmc@drzeus.cx \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=openwrt-devel@lists.openwrt.org \
--cc=piotr.skamruk@gmail.com \
--cc=randy.dunlap@oracle.com \
--cc=sfr@canb.auug.org.au \
/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