leds.h 957 字节
Newer Older
R
Richard Purdie 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/*
 * LED Core
 *
 * Copyright 2005 Openedhand Ltd.
 *
 * Author: Richard Purdie <rpurdie@openedhand.com>
 *
 * 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 __LEDS_H_INCLUDED
#define __LEDS_H_INCLUDED

16
#include <linux/rwsem.h>
R
Richard Purdie 已提交
17 18
#include <linux/leds.h>

19 20 21 22 23
static inline int led_get_brightness(struct led_classdev *led_cdev)
{
	return led_cdev->brightness;
}

24
void led_init_core(struct led_classdev *led_cdev);
25
void led_stop_software_blink(struct led_classdev *led_cdev);
26 27 28 29
void led_set_brightness_nopm(struct led_classdev *led_cdev,
				enum led_brightness value);
void led_set_brightness_nosleep(struct led_classdev *led_cdev,
				enum led_brightness value);
30

31
extern struct rw_semaphore leds_list_lock;
R
Richard Purdie 已提交
32
extern struct list_head leds_list;
33
extern struct list_head trigger_list;
R
Richard Purdie 已提交
34 35

#endif	/* __LEDS_H_INCLUDED */