linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kalle.valo@iki.fi>
To: Andrew de Quincey <adq_dvb@lidskialf.net>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Tony Lindgren <tony@atomide.com>,
	linux-arm-kernel@lists.arm.linux.org.uk,
	Imre Deak <imre.deak@nokia.com>,
	linux-omap@vger.kernel.org,
	linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH 05/10] ARM: OMAP1: Make 770 LCD work
Date: Mon, 01 Jun 2009 16:57:35 +0300	[thread overview]
Message-ID: <87oct8t5tc.fsf@litku.valot.fi> (raw)
In-Reply-To: <20090529012952.104144iws1glmow0@lidskialf.net> (Andrew de Quincey's message of "Fri\, 29 May 2009 01\:29\:52 +0100")

Andrew de Quincey <adq_dvb@lidskialf.net> writes:

> Out of interest, what is the best practice way to pass platform
> specific GPIOs around? There are a number of other n770 related
> drivers I'm intending on cleaning up, several of which have GPIO
> numbers hardcoded in them. Should these be passed in platform
> structures, or is there something analogous to the clk_alias for
> GPIOs?

I was told that platform structures are the preferred way. For wl12xx (a
wi-fi driver) I created a set_power function pointer which will control
the power gpio line:

27 struct wl12xx_platform_data {
28         void (*set_power)(bool enable);
29 };

http://git.kernel.org/?p=linux/kernel/git/linville/wireless-testing.git;a=blob;f=include/linux/spi/wl12xx.h;h=11430cab2aad71242946ebfc7c0ce778d8bf26a1;hb=HEAD

And the irq is configured in the board file and provided to wl12xx with
struct spi_device.irq. So wl12xx doesn't use gpio code at all, it's all
done in the board file. 

Please comment if this isn't the correct way to do this.

-- 
Kalle Valo

  reply	other threads:[~2009-06-01 13:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20090519232905.12760.15490.stgit@localhost>
2009-05-19 23:37 ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work Tony Lindgren
2009-05-25  9:29   ` Russell King - ARM Linux
2009-05-25 13:21     ` Andrew de Quincey
2009-05-25 16:40       ` Andrew de Quincey
2009-05-28 18:20         ` Tony Lindgren
2009-05-28 18:44           ` Andrew de Quincey
2009-05-28 19:11             ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work, v2 Tony Lindgren
2009-05-28 21:03               ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work, v3 Tony Lindgren
2009-05-28 19:50           ` [PATCH 05/10] ARM: OMAP1: Make 770 LCD work Russell King - ARM Linux
2009-05-29  0:29             ` Andrew de Quincey
2009-06-01 13:57               ` Kalle Valo [this message]
2009-05-28 19:53           ` Russell King - ARM Linux
2009-05-28 21:02             ` [PATCH] ARM: Move clk_add_alias() to arch/arm/common/clkdev.c (Re: [PATCH 05/10] ARM: OMAP1: Make 770 LCD work) Tony Lindgren
2009-06-03 16:44               ` Tony Lindgren
2009-05-19 23:44 ` [PATCH 10/10] ARM: OMAP2: 2430SDP: Add FB support to board file Tony Lindgren
2009-05-25 17:42   ` [PATCH 11/10] ARM: OMAP: Add some entries to MAINTAINERS Tony Lindgren

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=87oct8t5tc.fsf@litku.valot.fi \
    --to=kalle.valo@iki.fi \
    --cc=adq_dvb@lidskialf.net \
    --cc=imre.deak@nokia.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tony@atomide.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;
as well as URLs for NNTP newsgroup(s).