RE: [PATCH] leds-pca9532: Add gpio capability v3

From: H Hartley Sweeten
Date: Tue Feb 01 2011 - 14:48:15 EST


On Tuesday, February 01, 2011 12:41 PM, Joachim Eastwood wrote:
> Hello,
>
> The patch below allows unused leds on pca9532 to be used as gpio. The
> board I am working on now has no less than 6 pca9532 chips. One chips
> is used for only leds, one has 14 leds and 2 gpio and the rest of the
> chips are gpio only.
>
> There is also one board in mainline which could use this capabilty;
> arch/arm/mach-iop32x/n2100.c
> 232 { .type = PCA9532_TYPE_NONE }, /* power OFF gpio */
> 233 { .type = PCA9532_TYPE_NONE }, /* reset gpio */
>
> This patch defines a new pin type, PCA9532_TYPE_GPIO, and registers a
> gpiochip if any pin has this type set. The gpio will registers all
> chip pins but will filter on gpio_request.
>
> Changes in v3:
> * Fixed direction_output funtion, thanks to H Hartley Sweeten
> * direction_input now calles set_value as direction_output
> * Instructions in Kconfig
>
> Tested on custom ARM board.
>
> -------------------------------------------------------------------
> [leds-pca9532] Add gpio capability
>
> Pins not used for leds can now be used as gpio by setting pin type as
> PCA9532_TYPE_GPIO and defining a gpio_base in platform data.
>
> Signed-off-by: Joachim Eastwood <joachim.eastwood@xxxxxxxxxx>
> Reviewed-by: Wolfram Sang <w.sang@xxxxxxxxxxxxxx>

Looks good.

Reviewed-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
--
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/