mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Trent Piepho <tpiepho@freescale.com>
Cc: Ben Nizette <bn@niasdigital.com>,
	lkml <linux-kernel@vger.kernel.org>,
	hartleys <hartleys@visionengravers.com>,
	Mike Frysinger <vapier.adi@gmail.com>,
	Bryan Wu <cooloney@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [patch/rfc 2.6.25-git] gpio: sysfs interface
Date: Tue, 29 Apr 2008 15:39:31 -0700	[thread overview]
Message-ID: <200804291539.31577.david-b@pacbell.net> (raw)
In-Reply-To: <Pine.LNX.4.64.0804282251420.8286@t2.domain.actdsltmp>

On Monday 28 April 2008, Trent Piepho wrote:
> We have a flash chip with a hardware write protected boot block controlled by
> a gpio.  If we want to flash this block, we need a way to change the gpio. 
> patching the mtd driver to do this automatically would require maintaining an
> out-of-tree patch, I like to avoid those.  We'd also rather mtd didn't
> automatically un-write-protect the boot block; kinda defeats the purpose.
> 
> The device may have a daughtercard installed in it.  There is a gpio used as a
> presence detect.  We want to be able, from userspace (any maybe kernel too),
> to print out "card installed" or "no card installed".  There is also certain
> stuff that should run if the card is present when the machine boots.
> 
> We have some PCA9557 I2C gpio expanders that encode a device version number. 
> We want to print this number out in userspace (e.g.  show it in the web
> interface, various other application specific interfaces, etc.).  Maybe the
> kernel will need to know too, we'll see what happens when there is a version
> two.  The daughter card also has a PCA9557 expander, but of course it might
> not be connected, the pca9557 driver can probe the bus for this.

Good examples.  Note that the "daughtercard installed" cases generalize
somewhat ... it's not uncommon to do like DRAM sticks do with SPD EEPROMS,
and have a cheap EEPROM identifying characteristics of that card, since
different cards need different initialization/setup.

However, I think a slightly more common practice in current embedded
Linux systems is to build custom kernels that know which daughtercard(s)
are available.  That's mostly what gets pushed upstream, anyway...

ISTR that Gumstix distro kernels use a more retro scheme to identify what's
in the card stack:  they poke at various peripheral addresses to see if the
device on a given card is there.  In the PC space, that's what "ISA Legacy
Drivers" do, albeit at the level of individual peripherals, not cards.

- Dave


  reply	other threads:[~2008-04-29 22:45 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-28 19:39 David Brownell
2008-04-28 20:46 ` Andrew Morton
2008-04-28 23:28   ` David Brownell
2008-04-29  2:54     ` Andrew Morton
2008-04-29  3:42       ` Greg KH
2008-04-29 18:45         ` David Brownell
2008-04-29 19:09           ` Andrew Morton
2008-05-02 20:36   ` Pavel Machek
2008-05-17 22:14     ` David Brownell
2008-05-18  0:36       ` [patch 2.6.26-rc2-git] " David Brownell
2008-05-20  7:17         ` Andrew Morton
2008-05-18  4:55       ` [patch/rfc 2.6.25-git] " Ben Nizette
2008-05-19 22:39       ` Pavel Machek
2008-05-20  1:26         ` David Brownell
2008-05-20  8:02           ` Pavel Machek
2008-04-28 23:01 ` Ben Nizette
2008-04-29  0:44   ` David Brownell
2008-04-29  1:58     ` Ben Nizette
2008-04-29  3:44       ` David Brownell
2008-04-29  4:47         ` Ben Nizette
2008-04-29 21:28           ` David Brownell
2008-04-29  6:17         ` Trent Piepho
2008-04-29 22:39           ` David Brownell [this message]
2008-04-28 23:09 ` Trent Piepho
2008-04-29  0:45   ` David Brownell
2008-04-29  5:48     ` Trent Piepho
2008-04-29 12:35       ` Ben Nizette
2008-04-29 18:15         ` Trent Piepho
2008-04-29 21:56           ` David Brownell
2008-04-30  0:49             ` Trent Piepho
2008-04-30 17:49               ` David Brownell
2008-04-29 21:55         ` David Brownell
2008-04-29 23:29           ` Ben Nizette
2008-04-30  1:04             ` David Brownell
2008-04-30  2:08               ` Ben Nizette
2008-04-30  3:13                 ` Trent Piepho
2008-04-30 10:33                   ` Ben Nizette
2008-04-30 17:42                 ` David Brownell
2008-04-30 21:34                   ` [patch/rfc 2.6.25-git v2] " David Brownell
2008-04-30 22:47                     ` Trent Piepho
2008-04-30 23:14                       ` Ben Nizette
2008-05-01  2:12                         ` David Brownell
2008-05-01  2:08                       ` David Brownell
2008-05-01  3:41                         ` Trent Piepho
2008-05-01  4:35                           ` David Brownell
2008-05-01 21:16                             ` Trent Piepho
2008-05-03  2:58                               ` David Brownell
2008-05-03  3:05                               ` David Brownell
2008-04-30 23:28                     ` Ben Nizette
2008-05-01 21:40                       ` David Brownell
2008-04-29  0:47   ` [patch/rfc 2.6.25-git] " Ben Nizette

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=200804291539.31577.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@linux-foundation.org \
    --cc=bn@niasdigital.com \
    --cc=cooloney@kernel.org \
    --cc=hartleys@visionengravers.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tpiepho@freescale.com \
    --cc=vapier.adi@gmail.com \
    /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

all inboxes | Powered by JetHome®