Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED update from Bryan Wu: "Basically we have some bug fixing and clean up and one big thing is we start to merge patch to add support LED Flash class" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: gpio: cleanup the leds-gpio driver led: gpio: Fix possible ZERO_SIZE_PTR pointer dereferencing error. led: gpio: Sort include headers alphabetically leds: Improve and export led_update_brightness leds: trigger: gpio: fix warning in gpio trigger for gpios whose accessor function may sleep leds: lp3944: fix sparse warning leds: avoid using DEVICE_ATTR macro for max_brightness attribute leds: make brightness type consistent across whole subsystem leds: Reorder include directives
This commit is contained in:
@@ -13,8 +13,8 @@
|
||||
#define __LINUX_LEDS_H_INCLUDED
|
||||
|
||||
#include <linux/list.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/rwsem.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/timer.h>
|
||||
#include <linux/workqueue.h>
|
||||
|
||||
@@ -31,8 +31,8 @@ enum led_brightness {
|
||||
|
||||
struct led_classdev {
|
||||
const char *name;
|
||||
int brightness;
|
||||
int max_brightness;
|
||||
enum led_brightness brightness;
|
||||
enum led_brightness max_brightness;
|
||||
int flags;
|
||||
|
||||
/* Lower 16 bits reflect status */
|
||||
@@ -140,6 +140,16 @@ extern void led_blink_set_oneshot(struct led_classdev *led_cdev,
|
||||
*/
|
||||
extern void led_set_brightness(struct led_classdev *led_cdev,
|
||||
enum led_brightness brightness);
|
||||
/**
|
||||
* led_update_brightness - update LED brightness
|
||||
* @led_cdev: the LED to query
|
||||
*
|
||||
* Get an LED's current brightness and update led_cdev->brightness
|
||||
* member with the obtained value.
|
||||
*
|
||||
* Returns: 0 on success or negative error value on failure
|
||||
*/
|
||||
extern int led_update_brightness(struct led_classdev *led_cdev);
|
||||
|
||||
/*
|
||||
* LED Triggers
|
||||
|
||||
Reference in New Issue
Block a user