leds: Added driver for the NXP PCA9685 I2C chip

The NXP PCA9685 supports 16 channels/leds using a 12-bit PWM (4095
levels of brightness)
This driver supports configuration using platform_data.

Signed-off-by: Maximilian Güntner <maximilian.guentner@gmail.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
This commit is contained in:
Maximilian Güntner 2013-10-16 18:09:17 -07:00 committed by Bryan Wu
parent 1e08f72dd2
commit bb6febdc90
4 changed files with 259 additions and 0 deletions

View file

@ -0,0 +1,35 @@
/*
* Copyright 2013 Maximilian Güntner <maximilian.guentner@gmail.com>
*
* This file is subject to the terms and conditions of version 2 of
* the GNU General Public License. See the file COPYING in the main
* directory of this archive for more details.
*
* Based on leds-pca963x.h by Peter Meerwald <p.meerwald@bct-electronic.com>
*
* LED driver for the NXP PCA9685 PWM chip
*
*/
#ifndef __LINUX_PCA9685_H
#define __LINUX_PCA9685_H
#include <linux/leds.h>
enum pca9685_outdrv {
PCA9685_OPEN_DRAIN,
PCA9685_TOTEM_POLE,
};
enum pca9685_inverted {
PCA9685_NOT_INVERTED,
PCA9685_INVERTED,
};
struct pca9685_platform_data {
struct led_platform_data leds;
enum pca9685_outdrv outdrv;
enum pca9685_inverted inverted;
};
#endif /* __LINUX_PCA9685_H */