Re: [MeeGo-Dev][PATCH v3] Topcliff: Update PCH_GPIO driver to2.6.35

From: Mark Brown
Date: Fri Oct 01 2010 - 19:01:42 EST


On Wed, Sep 29, 2010 at 10:20:38AM +0900, Masayuki Ohtak wrote:

> +static int pch_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
> + int val)
> +{
> + struct pch_gpio *chip = container_of(gpio, struct pch_gpio, gpio);
> + u32 pm;
> +
> + mutex_lock(&chip->lock);
> + pm = ioread32(&chip->reg->pm) & PCH_GPIO_ALL_PINS;
> + pm |= (1 << nr);
> + iowrite32(pm, &chip->reg->pm);
> + mutex_unlock(&chip->lock);
> +
> + return 0;
> +}

This doesn't do anything with val - it should be doing the equivalent of
a gpio_set() to set the initial value of the GPIO when switching it to
output mode.

Otherwise this looks good.
--
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/