Merge branch 'for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem update from Bryan Wu. * 'for-3.6-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: (50 commits) leds-lp8788: forgotten unlock at lp8788_led_work LEDS: propagate error codes in blinkm_detect() LEDS: memory leak in blinkm_led_common_set() leds: add new lp8788 led driver LEDS: add BlinkM RGB LED driver, documentation and update MAINTAINERS leds: max8997: Simplify max8997_led_set_mode implementation leds/leds-s3c24xx: use devm_gpio_request leds: convert Network Space v2 LED driver to devm_kzalloc() and cleanup error exit path leds: convert DAC124S085 LED driver to devm_kzalloc() leds: convert LM3530 LED driver to devm_kzalloc() and cleanup error exit path leds: convert TCA6507 LED driver to devm_kzalloc() leds: convert Freescale MC13783 LED driver to devm_kzalloc() and cleanup error exit path leds: convert ADP5520 LED driver to devm_kzalloc() and cleanup error exit path leds: convert PCA955x LED driver to devm_kzalloc() and cleanup error exit path leds: convert Sun Fire LED driver to devm_kzalloc() and cleanup error exit path leds: convert PCA9532 LED driver to devm_kzalloc() leds: convert LT3593 LED driver to devm_kzalloc() leds: convert Renesas TPU LED driver to devm_kzalloc() and cleanup error exit path leds: convert LP5523 LED driver to devm_kzalloc() and cleanup error exit path leds: convert PCA9633 LED driver to devm_kzalloc() ...
This commit is contained in:
@@ -38,6 +38,9 @@ struct led_classdev {
|
||||
#define LED_SUSPENDED (1 << 0)
|
||||
/* Upper 16 bits reflect control information */
|
||||
#define LED_CORE_SUSPENDRESUME (1 << 16)
|
||||
#define LED_BLINK_ONESHOT (1 << 17)
|
||||
#define LED_BLINK_ONESHOT_STOP (1 << 18)
|
||||
#define LED_BLINK_INVERT (1 << 19)
|
||||
|
||||
/* Set LED brightness level */
|
||||
/* Must not sleep, use a workqueue if needed */
|
||||
@@ -103,7 +106,25 @@ extern void led_blink_set(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
/**
|
||||
* led_brightness_set - set LED brightness
|
||||
* led_blink_set_oneshot - do a oneshot software blink
|
||||
* @led_cdev: the LED to start blinking
|
||||
* @delay_on: the time it should be on (in ms)
|
||||
* @delay_off: the time it should ble off (in ms)
|
||||
* @invert: blink off, then on, leaving the led on
|
||||
*
|
||||
* This function makes the LED blink one time for delay_on +
|
||||
* delay_off time, ignoring the request if another one-shot
|
||||
* blink is already in progress.
|
||||
*
|
||||
* If invert is set, led blinks for delay_off first, then for
|
||||
* delay_on and leave the led on after the on-off cycle.
|
||||
*/
|
||||
extern void led_blink_set_oneshot(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off,
|
||||
int invert);
|
||||
/**
|
||||
* led_set_brightness - set LED brightness
|
||||
* @led_cdev: the LED to set
|
||||
* @brightness: the brightness to set it to
|
||||
*
|
||||
@@ -111,7 +132,7 @@ extern void led_blink_set(struct led_classdev *led_cdev,
|
||||
* software blink timer that implements blinking when the
|
||||
* hardware doesn't.
|
||||
*/
|
||||
extern void led_brightness_set(struct led_classdev *led_cdev,
|
||||
extern void led_set_brightness(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness);
|
||||
|
||||
/*
|
||||
@@ -150,6 +171,10 @@ extern void led_trigger_event(struct led_trigger *trigger,
|
||||
extern void led_trigger_blink(struct led_trigger *trigger,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
extern void led_trigger_blink_oneshot(struct led_trigger *trigger,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off,
|
||||
int invert);
|
||||
|
||||
#else
|
||||
|
||||
|
50
include/linux/platform_data/leds-lm3556.h
Normal file
50
include/linux/platform_data/leds-lm3556.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Simple driver for Texas Instruments LM3556 LED Flash driver chip (Rev0x03)
|
||||
* Copyright (C) 2012 Texas Instruments
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_LM3556_H
|
||||
#define __LINUX_LM3556_H
|
||||
|
||||
#define LM3556_NAME "leds-lm3556"
|
||||
|
||||
enum lm3556_pin_polarity {
|
||||
PIN_LOW_ACTIVE = 0,
|
||||
PIN_HIGH_ACTIVE,
|
||||
};
|
||||
|
||||
enum lm3556_pin_enable {
|
||||
PIN_DISABLED = 0,
|
||||
PIN_ENABLED,
|
||||
};
|
||||
|
||||
enum lm3556_strobe_usuage {
|
||||
STROBE_EDGE_DETECT = 0,
|
||||
STROBE_LEVEL_DETECT,
|
||||
};
|
||||
|
||||
enum lm3556_indic_mode {
|
||||
INDIC_MODE_INTERNAL = 0,
|
||||
INDIC_MODE_EXTERNAL,
|
||||
};
|
||||
|
||||
struct lm3556_platform_data {
|
||||
enum lm3556_pin_enable torch_pin_en;
|
||||
enum lm3556_pin_polarity torch_pin_polarity;
|
||||
|
||||
enum lm3556_strobe_usuage strobe_usuage;
|
||||
enum lm3556_pin_enable strobe_pin_en;
|
||||
enum lm3556_pin_polarity strobe_pin_polarity;
|
||||
|
||||
enum lm3556_pin_enable tx_pin_en;
|
||||
enum lm3556_pin_polarity tx_pin_polarity;
|
||||
|
||||
enum lm3556_indic_mode indicator_mode;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LM3556_H */
|
Reference in New Issue
Block a user