Richard Purdie | c72a1d6 | 2006-03-31 02:31:04 -0800 | [diff] [blame] | 1 | /* |
| 2 | * LED Core |
| 3 | * |
| 4 | * Copyright 2005 Openedhand Ltd. |
| 5 | * |
| 6 | * Author: Richard Purdie <rpurdie@openedhand.com> |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License version 2 as |
| 10 | * published by the Free Software Foundation. |
| 11 | * |
| 12 | */ |
| 13 | #ifndef __LEDS_H_INCLUDED |
| 14 | #define __LEDS_H_INCLUDED |
| 15 | |
Richard Purdie | 72f8da3 | 2007-12-31 23:09:44 +0000 | [diff] [blame] | 16 | #include <linux/rwsem.h> |
Richard Purdie | c72a1d6 | 2006-03-31 02:31:04 -0800 | [diff] [blame] | 17 | #include <linux/leds.h> |
| 18 | |
Németh Márton | 0013b23 | 2008-03-09 20:54:37 +0000 | [diff] [blame] | 19 | static inline int led_get_brightness(struct led_classdev *led_cdev) |
| 20 | { |
| 21 | return led_cdev->brightness; |
| 22 | } |
| 23 | |
Jacek Anaszewski | 757b06a | 2015-09-28 14:38:04 +0200 | [diff] [blame] | 24 | void led_init_core(struct led_classdev *led_cdev); |
Fabio Baltieri | d23a22a | 2012-08-15 21:44:34 +0800 | [diff] [blame] | 25 | void led_stop_software_blink(struct led_classdev *led_cdev); |
Jacek Anaszewski | 81fe8e5 | 2015-10-07 11:10:41 +0200 | [diff] [blame] | 26 | void led_set_brightness_nopm(struct led_classdev *led_cdev, |
| 27 | enum led_brightness value); |
| 28 | void led_set_brightness_nosleep(struct led_classdev *led_cdev, |
| 29 | enum led_brightness value); |
Fabio Baltieri | d23a22a | 2012-08-15 21:44:34 +0800 | [diff] [blame] | 30 | |
Richard Purdie | 72f8da3 | 2007-12-31 23:09:44 +0000 | [diff] [blame] | 31 | extern struct rw_semaphore leds_list_lock; |
Richard Purdie | c72a1d6 | 2006-03-31 02:31:04 -0800 | [diff] [blame] | 32 | extern struct list_head leds_list; |
Ezequiel Garcia | ba93cdc | 2016-04-28 19:03:38 -0300 | [diff] [blame] | 33 | extern struct list_head trigger_list; |
Richard Purdie | c72a1d6 | 2006-03-31 02:31:04 -0800 | [diff] [blame] | 34 | |
Richard Purdie | c72a1d6 | 2006-03-31 02:31:04 -0800 | [diff] [blame] | 35 | #endif /* __LEDS_H_INCLUDED */ |