Re: [PATCH] leds: Added driver for the NXP PCA9685 I2C chip

From: Maximilian Güntner
Date: Mon Oct 14 2013 - 19:32:37 EST


On Monday 14 October 2013 15:08:15 Bryan Wu wrote:
> On Mon, Oct 14, 2013 at 10:31 AM, Maximilian Güntner
>
> <maximilian.guentner@xxxxxxxxx> wrote:
> > The NXP PCA9685 supports 16 channels/leds using a 12-bit PWM (4095
> > levels of brightness)
> > This driver supports configuration using platform_data.
>
> I'm OK for this patch basically, just a little picky coding style
> issue as below.
> > + if (brightness == 4096)
> > + *((u16 *)(i2c_buffer+1)) = cpu_to_le16(0x1000);
> > + else
> > + *((u16 *)(i2c_buffer+1)) = 0x0000;
>
> One empty line here probably is better.
fixed.
> > +
> > + pdata = dev_get_platdata(&client->dev);
> > +
>
> No need empty line here.
fixed.
> > + pca9685 = devm_kzalloc(&client->dev, 16 * sizeof(*pca9685),
> > GFP_KERNEL); +
>
> No need empty line here.
fixed.
> > &pca9685[i].led_cdev); + if (err < 0)
> > + goto exit;
> > + }
>
> You can add one empty line here.
fixed

Thanks for the quick review. A v2 of this patch is on its way which addresses your and
Peter Meerwald's comments.

Maximilian
--
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/