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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
--
To unsubscribe from this list: send the line "unsubscribe linux-leds" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux