Re: [PATCH 2/4] tps65912: gpio: add gpio driver

From: Mark Brown
Date: Tue May 10 2011 - 16:39:32 EST


On Tue, May 10, 2011 at 03:25:35PM -0500, Margarita Olaya wrote:

> drivers/mfd/Makefile | 2 +-
> drivers/mfd/tps65912-gpio.c | 94 ++++++++++++++++++++++++++++++++++++++++++

We're mostly moving GPIO drivers to drivers/gpio these days - there's a
push to move drivers into the appropriate subsystems (particularly
focused on arch/arm but still).

> +static void tps6591x_gpio_set(struct gpio_chip *gc, unsigned offset,
> + int value)
> +{
> + struct tps65912 *tps65912 = container_of(gc, struct tps65912, gpio);
> +
> + if (value)
> + tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset,
> + GPIO_SET_MASK);
> + else
> + tps65912_set_bits(tps65912, TPS65912_GPIO1 + offset,
> + ~GPIO_SET_MASK);

Should one of those be clear_bits() given that there's such a function?

> + tps65912->gpio.owner = THIS_MODULE;
> + /* FIXME: should we use compilation macro for SPI */
> + tps65912->gpio.label = tps65912->i2c_client->name;

I guess dev_name() would do a reasonable job?
--
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/