lkml.org 
[lkml]   [2013]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] leds: Added driver for the NXP PCA9685 I2C chip
Date
On Tuesday 15 October 2013 00:38:13 Peter Meerwald wrote:
> > The NXP PCA9685 supports 16 channels/leds using a 12-bit PWM (4095
> > levels of brightness)
> > This driver supports configuration using platform_data.
>
> some nitpicking inline
Thank you for your comments.
> chip
fixed.
>
>> + * Driver for the NXP PCA9685 12-Bit I2C chip.
> this could be more descriptive: 12-bit PWM LED driver chip
fixed.
> > + /*
> > + * 4095 is the maximum brightness, so we set the ON time to 0x1000
> > + * which disables the PWM generator for that LED
> > + */
> > + if (pca9685->brightness == 4095)
> > + brightness = 4096;
>
> why not check for 4095 instead of 4096 below and save this if statement?
removed.

I left it there in order to improve the code readability, which should be equally
good when we just remove the statement and check for 4095 below.
> > + i2c_smbus_write_byte_data(client, PCA9685_MODE1, 1 << PCA9685_AI);
>
> maybe BIT(PCA9685_AI)
replaced.


\
 
 \ /
  Last update: 2013-10-15 01:41    [W:0.095 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site