On Wed, Jul 2, 2014 at 10:50 PM, Peter Meerwald <[email protected]> wrote:
> PCA9632 defaults to open-drain
> PCA9633/4/5 defaults to totem-pole
>
> the driver assumed that totem-pole default and didn't actively set
> the value; the MODE2 register is now written if platform
> data indicating the mode is given
>
> Signed-off-by: Peter Meerwald <[email protected]>

Applied. thanks,
-Bryan

> ---
>  drivers/leds/leds-pca963x.c |   10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/leds/leds-pca963x.c b/drivers/leds/leds-pca963x.c
> index 4438be9..f110b4c 100644
> --- a/drivers/leds/leds-pca963x.c
> +++ b/drivers/leds/leds-pca963x.c
> @@ -423,9 +423,13 @@ static int pca963x_probe(struct i2c_client *client,
>         /* Disable LED all-call address and set normal mode */
>         i2c_smbus_write_byte_data(client, PCA963X_MODE1, 0x00);
>
> -       /* Configure output: open-drain or totem pole (push-pull) */
> -       if (pdata && pdata->outdrv == PCA963X_OPEN_DRAIN)
> -               i2c_smbus_write_byte_data(client, PCA963X_MODE2, 0x01);
> +       if (pdata) {
> +               /* Configure output: open-drain or totem pole (push-pull) */
> +               if (pdata->outdrv == PCA963X_OPEN_DRAIN)
> +                       i2c_smbus_write_byte_data(client, PCA963X_MODE2, 
> 0x01);
> +               else
> +                       i2c_smbus_write_byte_data(client, PCA963X_MODE2, 
> 0x05);
> +       }
>
>         return 0;
>
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to