Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds

Pull LED subsystem changes from Bryan Wu:
 "LED subsystem updates for 3.13 are basically cleanup and also add a
  new driver for PCA9685"

* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds:
  leds: lp55xx: handle enable pin in driver
  leds-gpio: of: led should not be created if its status is disabled
  of: introduce of_get_available_child_count
  leds: Added driver for the NXP PCA9685 I2C chip
  leds: pwm: Remove redundant of_match_ptr
  leds: Include linux/of.h header
  leds: dac124s085: Remove redundant spi_set_drvdata
  leds: lp55xx: enable setting default trigger
  leds: blinkm: Remove redundant break
This commit is contained in:
Linus Torvalds 2013-11-12 16:27:42 +09:00
commit 85b656cf15
17 changed files with 312 additions and 48 deletions

View file

@ -22,6 +22,7 @@
struct lp55xx_led_config {
const char *name;
const char *default_trigger;
u8 chan_nr;
u8 led_current; /* mA x10, 0 if led is not connected */
u8 max_current;
@ -66,10 +67,8 @@ struct lp55xx_platform_data {
/* Clock configuration */
u8 clock_mode;
/* Platform specific functions */
int (*setup_resources)(void);
void (*release_resources)(void);
void (*enable)(bool state);
/* optional enable GPIO */
int enable_gpio;
/* Predefined pattern data */
struct lp55xx_predef_pattern *patterns;

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 */