diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/led-class-flash.h | 19 | ||||
| -rw-r--r-- | include/linux/leds.h | 5 |
2 files changed, 6 insertions, 18 deletions
diff --git a/include/linux/led-class-flash.h b/include/linux/led-class-flash.h index 5ba2facd7a51..e97966d1fb8d 100644 --- a/include/linux/led-class-flash.h +++ b/include/linux/led-class-flash.h | |||
| @@ -13,7 +13,6 @@ | |||
| 13 | #define __LINUX_FLASH_LEDS_H_INCLUDED | 13 | #define __LINUX_FLASH_LEDS_H_INCLUDED |
| 14 | 14 | ||
| 15 | #include <linux/leds.h> | 15 | #include <linux/leds.h> |
| 16 | #include <uapi/linux/v4l2-controls.h> | ||
| 17 | 16 | ||
| 18 | struct device_node; | 17 | struct device_node; |
| 19 | struct led_classdev_flash; | 18 | struct led_classdev_flash; |
| @@ -33,7 +32,7 @@ struct led_classdev_flash; | |||
| 33 | #define LED_FAULT_LED_OVER_TEMPERATURE (1 << 8) | 32 | #define LED_FAULT_LED_OVER_TEMPERATURE (1 << 8) |
| 34 | #define LED_NUM_FLASH_FAULTS 9 | 33 | #define LED_NUM_FLASH_FAULTS 9 |
| 35 | 34 | ||
| 36 | #define LED_FLASH_MAX_SYSFS_GROUPS 7 | 35 | #define LED_FLASH_SYSFS_GROUPS_SIZE 5 |
| 37 | 36 | ||
| 38 | struct led_flash_ops { | 37 | struct led_flash_ops { |
| 39 | /* set flash brightness */ | 38 | /* set flash brightness */ |
| @@ -81,21 +80,7 @@ struct led_classdev_flash { | |||
| 81 | struct led_flash_setting timeout; | 80 | struct led_flash_setting timeout; |
| 82 | 81 | ||
| 83 | /* LED Flash class sysfs groups */ | 82 | /* LED Flash class sysfs groups */ |
| 84 | const struct attribute_group *sysfs_groups[LED_FLASH_MAX_SYSFS_GROUPS]; | 83 | const struct attribute_group *sysfs_groups[LED_FLASH_SYSFS_GROUPS_SIZE]; |
| 85 | |||
| 86 | /* LEDs available for flash strobe synchronization */ | ||
| 87 | struct led_classdev_flash **sync_leds; | ||
| 88 | |||
| 89 | /* Number of LEDs available for flash strobe synchronization */ | ||
| 90 | int num_sync_leds; | ||
| 91 | |||
| 92 | /* | ||
| 93 | * The identifier of the sub-led to synchronize the flash strobe with. | ||
| 94 | * Identifiers start from 1, which reflects the first element from the | ||
| 95 | * sync_leds array. 0 means that the flash strobe should not be | ||
| 96 | * synchronized. | ||
| 97 | */ | ||
| 98 | u32 sync_led_id; | ||
| 99 | }; | 84 | }; |
| 100 | 85 | ||
| 101 | static inline struct led_classdev_flash *lcdev_to_flcdev( | 86 | static inline struct led_classdev_flash *lcdev_to_flcdev( |
diff --git a/include/linux/leds.h b/include/linux/leds.h index f70f84f35674..9a2b000094cf 100644 --- a/include/linux/leds.h +++ b/include/linux/leds.h | |||
| @@ -47,7 +47,6 @@ struct led_classdev { | |||
| 47 | #define SET_BRIGHTNESS_ASYNC (1 << 21) | 47 | #define SET_BRIGHTNESS_ASYNC (1 << 21) |
| 48 | #define SET_BRIGHTNESS_SYNC (1 << 22) | 48 | #define SET_BRIGHTNESS_SYNC (1 << 22) |
| 49 | #define LED_DEV_CAP_FLASH (1 << 23) | 49 | #define LED_DEV_CAP_FLASH (1 << 23) |
| 50 | #define LED_DEV_CAP_SYNC_STROBE (1 << 24) | ||
| 51 | 50 | ||
| 52 | /* Set LED brightness level */ | 51 | /* Set LED brightness level */ |
| 53 | /* Must not sleep, use a workqueue if needed */ | 52 | /* Must not sleep, use a workqueue if needed */ |
| @@ -105,7 +104,11 @@ struct led_classdev { | |||
| 105 | 104 | ||
| 106 | extern int led_classdev_register(struct device *parent, | 105 | extern int led_classdev_register(struct device *parent, |
| 107 | struct led_classdev *led_cdev); | 106 | struct led_classdev *led_cdev); |
| 107 | extern int devm_led_classdev_register(struct device *parent, | ||
| 108 | struct led_classdev *led_cdev); | ||
| 108 | extern void led_classdev_unregister(struct led_classdev *led_cdev); | 109 | extern void led_classdev_unregister(struct led_classdev *led_cdev); |
| 110 | extern void devm_led_classdev_unregister(struct device *parent, | ||
| 111 | struct led_classdev *led_cdev); | ||
| 109 | extern void led_classdev_suspend(struct led_classdev *led_cdev); | 112 | extern void led_classdev_suspend(struct led_classdev *led_cdev); |
| 110 | extern void led_classdev_resume(struct led_classdev *led_cdev); | 113 | extern void led_classdev_resume(struct led_classdev *led_cdev); |
| 111 | 114 | ||
