All of lore.kernel.org
 help / color / mirror / Atom feed
* tps65010: Allow the board to choose any GPIO base.
@ 2009-11-02 16:52 Ben Dooks
  2009-11-04 11:43 ` Samuel Ortiz
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Dooks @ 2009-11-02 16:52 UTC (permalink / raw)
  To: linux-kernel, sameo, dbrownell; +Cc: Simtec Liunx Team

[-- Attachment #1: tps65010-allow-any-gpio.patch --]
[-- Type: text/plain, Size: 1028 bytes --]

If the board does not care where the TPS turns up, then specifiying the
value -1 to get gpiolib to dynamically allocate the base for the chip
is valid.

Change the test to look for != 0, so that any boards specifying zero
will not end up with gpio that they didn't want.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Liunx Team <linux@simtec.co.uk>

---
 drivers/mfd/tps65010.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: b/drivers/mfd/tps65010.c
===================================================================
--- a/drivers/mfd/tps65010.c	2009-10-21 19:09:28.000000000 +0100
+++ b/drivers/mfd/tps65010.c	2009-10-21 19:09:39.000000000 +0100
@@ -637,7 +637,7 @@ static int tps65010_probe(struct i2c_cli
 				tps, DEBUG_FOPS);
 
 	/* optionally register GPIOs */
-	if (board && board->base > 0) {
+	if (board && board->base != 0) {
 		tps->outmask = board->outmask;
 
 		tps->chip.label = client->name;

-- 
Ben (ben@fluff.org, http://www.fluff.org/)

  'a smiley only costs 4 bytes'

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-11-04 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-02 16:52 tps65010: Allow the board to choose any GPIO base Ben Dooks
2009-11-04 11:43 ` Samuel Ortiz

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.