All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Nizette <ben.nizette@iinet.net.au>
To: NZG <ngustavson@emacinc.com>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: passing function pointers through platform devices?
Date: Wed, 07 Mar 2007 14:53:31 +1100	[thread overview]
Message-ID: <45EE373B.80606@iinet.net.au> (raw)
In-Reply-To: <200703061246.29615.ngustavson@emacinc.com>

NZG wrote:
> I'm developing an SPI- bus >MMC/SD block driver translation layer.
> As part of this layer the write protect and card detect lines need to be read.
> The method for determining the state of these lines will be board specific.
> 
> Is it appropriate to pass a function pointer through a platform device 
> (declared in the mach initialization) to implement card_available and 
> write_protect function calls?
> Or is there a cleaner way to do it?

Once the generic GPIO framework migrates upstream from -mm you should 
just pass the GPIO token from board-specific code and gpio_get_value() it.

--Ben.

  reply	other threads:[~2007-03-07  3:53 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-06 18:46 passing function pointers through platform devices? NZG
2007-03-07  3:53 ` Ben Nizette [this message]
2007-03-07 16:37   ` NZG
2007-03-07 17:07     ` Randy Dunlap
2007-03-07 17:36       ` NZG
2007-03-08 18:41     ` Haavard Skinnemoen
2007-03-08 18:57       ` NZG
2007-03-07 17:11 ` Paul Sokolovsky
  -- strict thread matches above, loose matches on Subject: below --
2007-03-07 17:55 David Brownell
2007-03-09 16:31 ` NZG

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=45EE373B.80606@iinet.net.au \
    --to=ben.nizette@iinet.net.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ngustavson@emacinc.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 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.