lkml.org 
[lkml]   [2011]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] leds-pca9532: Add gpio capability v3
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@jotron.com>
> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>

Looks good.

Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>


\
 
 \ /
  Last update: 2011-02-01 20:51    [W:0.030 / U:40.220 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site