[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4E12AC10.9020206@gmail.com>
Date: Tue, 05 Jul 2011 16:15:44 +1000
From: Ryan Mallon <rmallon@...il.com>
To: Sekhar Nori <nsekhar@...com>
CC: linux-kernel@...r.kernel.org, Kevin Hilman <khilman@...com>,
Grant Likely <grant.likely@...retlab.ca>,
Cyril Chemparathy <cyril@...com>,
linux-arm-kernel@...ts.infradead.org,
davinci-linux-open-source@...ux.davincidsp.com
Subject: Re: [RFC/RFT 1/2] gpio/basic_mmio: add support for enable register
On 05/07/11 15:10, Sekhar Nori wrote:
> Some GPIO controllers have an enable register
> which needs to be written to before a GPIO
> can be used.
>
> Add support for enabling the GPIO. At this
> time inverted logic for enabling the GPIO
> is not supported. This can be done by adding
> a disable register as and when a controller
> with this comes along.
>
> Signed-off-by: Sekhar Nori<nsekhar@...com>
> ---
>
<snip>
> static int bgpio_setup_io(struct bgpio_chip *bgc,
> void __iomem *dat,
> @@ -369,6 +401,7 @@ int __devinit bgpio_init(struct bgpio_chip *bgc,
> void __iomem *clr,
> void __iomem *dirout,
> void __iomem *dirin,
> + void __iomem *en,
> bool big_endian)
The arguments to this function are getting a bit unwieldy :-). Maybe we
need to introduce something like:
struct bgpio_chip_info {
struct device *dev;
unsigned long sz;
void __iomem *dat;
void __iomem *set;
void __iomem *clr;
void __iomem *dirout;
void __iomem *dirin;
void __iomem *en;
bool big_endian;
};
and pass that to bgpio_init instead. It would have the added benefits of
making the drivers more readable and that bgpio_chip_info structs in the
drivers can probably be marked __initdata also.
Since you are already having to touch all of the call sites for
bgpio_init this could be done as a separate patch along with this series.
~Ryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists