Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds: leds: Futher document blink_set leds: Add options to have GPIO LEDs start on or keep their state leds: LED driver for National Semiconductor LP3944 Funlight Chip leds: pca9532 - Indent using tabs, not spaces. leds: Remove an orphan Kconfig entry leds: Further document parameters for blink_set() leds: alix-leds2 fixed for Award BIOS leds: leds-gpio - fix a section mismatch leds: add the sysfs interface into the leds-bd2802 driver for changing wave pattern and led current. leds: change the license information leds: fix led-bd2802 errors while resuming
This commit is contained in:
53
include/linux/leds-lp3944.h
Normal file
53
include/linux/leds-lp3944.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* leds-lp3944.h - platform data structure for lp3944 led controller
|
||||
*
|
||||
* Copyright (C) 2009 Antonio Ospite <ospite@studenti.unina.it>
|
||||
*
|
||||
* 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_LEDS_LP3944_H
|
||||
#define __LINUX_LEDS_LP3944_H
|
||||
|
||||
#include <linux/leds.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
#define LP3944_LED0 0
|
||||
#define LP3944_LED1 1
|
||||
#define LP3944_LED2 2
|
||||
#define LP3944_LED3 3
|
||||
#define LP3944_LED4 4
|
||||
#define LP3944_LED5 5
|
||||
#define LP3944_LED6 6
|
||||
#define LP3944_LED7 7
|
||||
#define LP3944_LEDS_MAX 8
|
||||
|
||||
#define LP3944_LED_STATUS_MASK 0x03
|
||||
enum lp3944_status {
|
||||
LP3944_LED_STATUS_OFF = 0x0,
|
||||
LP3944_LED_STATUS_ON = 0x1,
|
||||
LP3944_LED_STATUS_DIM0 = 0x2,
|
||||
LP3944_LED_STATUS_DIM1 = 0x3
|
||||
};
|
||||
|
||||
enum lp3944_type {
|
||||
LP3944_LED_TYPE_NONE,
|
||||
LP3944_LED_TYPE_LED,
|
||||
LP3944_LED_TYPE_LED_INVERTED,
|
||||
};
|
||||
|
||||
struct lp3944_led {
|
||||
char *name;
|
||||
enum lp3944_type type;
|
||||
enum lp3944_status status;
|
||||
};
|
||||
|
||||
struct lp3944_platform_data {
|
||||
struct lp3944_led leds[LP3944_LEDS_MAX];
|
||||
u8 leds_size;
|
||||
};
|
||||
|
||||
#endif /* __LINUX_LEDS_LP3944_H */
|
||||
@@ -45,7 +45,10 @@ struct led_classdev {
|
||||
/* Get LED brightness level */
|
||||
enum led_brightness (*brightness_get)(struct led_classdev *led_cdev);
|
||||
|
||||
/* Activate hardware accelerated blink */
|
||||
/* Activate hardware accelerated blink, delays are in
|
||||
* miliseconds and if none is provided then a sensible default
|
||||
* should be chosen. The call can adjust the timings if it can't
|
||||
* match the values specified exactly. */
|
||||
int (*blink_set)(struct led_classdev *led_cdev,
|
||||
unsigned long *delay_on,
|
||||
unsigned long *delay_off);
|
||||
@@ -141,9 +144,14 @@ struct gpio_led {
|
||||
const char *name;
|
||||
const char *default_trigger;
|
||||
unsigned gpio;
|
||||
u8 active_low : 1;
|
||||
u8 retain_state_suspended : 1;
|
||||
unsigned active_low : 1;
|
||||
unsigned retain_state_suspended : 1;
|
||||
unsigned default_state : 2;
|
||||
/* default_state should be one of LEDS_GPIO_DEFSTATE_(ON|OFF|KEEP) */
|
||||
};
|
||||
#define LEDS_GPIO_DEFSTATE_OFF 0
|
||||
#define LEDS_GPIO_DEFSTATE_ON 1
|
||||
#define LEDS_GPIO_DEFSTATE_KEEP 2
|
||||
|
||||
struct gpio_led_platform_data {
|
||||
int num_leds;
|
||||
|
||||
Reference in New Issue
Block a user