[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-fbdev-devel
Subject: Re: [Linux-fbdev-devel] [PATCH 05/10] ARM: OMAP1: Make 770 LCD work
From: Kalle Valo <kalle.valo () iki ! fi>
Date: 2009-06-01 13:57:35
Message-ID: 87oct8t5tc.fsf () litku ! valot ! fi
[Download RAW message or body]
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
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic