aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/platform_data/leds-pca9685.h
diff options
context:
space:
mode:
authorMaximilian Güntner <maximilian.guentner@gmail.com>2013-10-16 18:09:17 -0700
committerBryan Wu <cooloney@gmail.com>2013-10-22 10:57:35 -0700
commitbb6febdc90efe7f664328075c204eed8e9af7ec9 (patch)
tree51ecf9e4ac1f0a3af243799d3b40078bc1f3eab3 /include/linux/platform_data/leds-pca9685.h
parentleds: pwm: Remove redundant of_match_ptr (diff)
downloadlinux-dev-bb6febdc90efe7f664328075c204eed8e9af7ec9.tar.xz
linux-dev-bb6febdc90efe7f664328075c204eed8e9af7ec9.zip
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>
Diffstat (limited to 'include/linux/platform_data/leds-pca9685.h')
-rw-r--r--include/linux/platform_data/leds-pca9685.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/linux/platform_data/leds-pca9685.h b/include/linux/platform_data/leds-pca9685.h
new file mode 100644
index 000000000000..778e9e4249cc
--- /dev/null
+++ b/include/linux/platform_data/leds-pca9685.h
@@ -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 */