mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00:00
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:
parent
1e08f72dd2
commit
bb6febdc90
4 changed files with 259 additions and 0 deletions
35
include/linux/platform_data/leds-pca9685.h
Normal file
35
include/linux/platform_data/leds-pca9685.h
Normal 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 */
|
Loading…
Add table
Add a link
Reference in a new issue