Skip to contentSkip to conversation

tps65010: Allow the board to choose any GPIO base.

PATCH Applied Ben Dooks 2 participants 2 messages Nov 2, 2009 – Nov 4, 2009 Multifunction devices (MFD)

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

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.

---
 drivers/mfd/tps65010.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/tps65010.c +1 -1
Index: b/drivers/mfd/tps65010.c
===================================================================
@@ -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;
Signature · 3 lines
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
Applied
#1 lore raw

Hi Ben,

Quoted 9 lines · Ben Dooks

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.

Applied, thanks a lot.

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

Index: b/drivers/mfd/tps65010.c
===================================================================

drivers/mfd/tps65010.c +1 -1
@@ -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;
Signature · 4 lines
-- 
Ben ([email protected], http://www.fluff.org/)

  'a smiley only costs 4 bytes'
Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/