Re: [PATCHv2 4/5] TPS65911: Add support for added GPIO lines

From: Samuel Ortiz
Date: Fri May 13 2011 - 12:33:15 EST


Hi Jorge,

On Wed, May 04, 2011 at 07:21:41PM -0500, Jorge Eduardo Candelaria wrote:
> @@ -76,7 +77,12 @@ void tps65910_gpio_init(struct tps65910 *tps65910, int gpio_base)
> tps65910->gpio.label = tps65910->i2c_client->name;
> tps65910->gpio.dev = tps65910->dev;
> tps65910->gpio.base = gpio_base;
> - tps65910->gpio.ngpio = 1;
> + if (tps65910_chip_id(tps65910) == TPS65910)
> + tps65910->gpio.ngpio = 6;
> + else if (tps65910_chip_id(tps65910) == TPS65911)
> + tps65910->gpio.ngpio = 9;
> + else
> + return;
That should be handled through a switch statement too.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/