mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-25 14:13:01 -04:00
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem updates from Bryan Wu: "In this cycle, we merged some fix and update for LED Flash class driver. Then the core code of LED Flash class driver is in the kernel now. Moreover, we also got some bug fixes, code cleanup and new drivers for LED controllers" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: Don't treat the LED name as a format string leds: Use log level warn instead of info when telling about a name clash leds/led-class: Handle LEDs with the same name leds: lp8860: Fix typo in MODULE_DESCRIPTION in leds-lp8860.c leds: lp8501: Fix typo in MODULE_DESCRIPTION in leds-lp8501.c DT: leds: Add uniqueness requirement for 'label' property. dt-binding: leds: Add common LED DT bindings macros leds: add Qualcomm PM8941 WLED driver leds: add DT binding for Qualcomm PM8941 WLED block leds: pca963x: Add missing initialiation of struct led_info.flags leds: flash: Fix the size of sysfs_groups array Documentation: leds: Add description of LED Flash class extension leds: flash: document sysfs interface leds: flash: Remove synchronized flash strobe feature leds: Introduce devres helper for led_classdev_register leds: lp8860: make use of devm_gpiod_get_optional leds: Let the binding document example for leds-gpio follow the gpio bindings leds: flash: remove stray include directive leds: leds-pwm: drop one pwm_get_period() call
This commit is contained in:
commit
e7c8241243
18 changed files with 735 additions and 120 deletions
|
|
@ -13,7 +13,6 @@
|
|||
#define __LINUX_FLASH_LEDS_H_INCLUDED
|
||||
|
||||
#include <linux/leds.h>
|
||||
#include <uapi/linux/v4l2-controls.h>
|
||||
|
||||
struct device_node;
|
||||
struct led_classdev_flash;
|
||||
|
|
@ -33,7 +32,7 @@ struct led_classdev_flash;
|
|||
#define LED_FAULT_LED_OVER_TEMPERATURE (1 << 8)
|
||||
#define LED_NUM_FLASH_FAULTS 9
|
||||
|
||||
#define LED_FLASH_MAX_SYSFS_GROUPS 7
|
||||
#define LED_FLASH_SYSFS_GROUPS_SIZE 5
|
||||
|
||||
struct led_flash_ops {
|
||||
/* set flash brightness */
|
||||
|
|
@ -81,21 +80,7 @@ struct led_classdev_flash {
|
|||
struct led_flash_setting timeout;
|
||||
|
||||
/* LED Flash class sysfs groups */
|
||||
const struct attribute_group *sysfs_groups[LED_FLASH_MAX_SYSFS_GROUPS];
|
||||
|
||||
/* LEDs available for flash strobe synchronization */
|
||||
struct led_classdev_flash **sync_leds;
|
||||
|
||||
/* Number of LEDs available for flash strobe synchronization */
|
||||
int num_sync_leds;
|
||||
|
||||
/*
|
||||
* The identifier of the sub-led to synchronize the flash strobe with.
|
||||
* Identifiers start from 1, which reflects the first element from the
|
||||
* sync_leds array. 0 means that the flash strobe should not be
|
||||
* synchronized.
|
||||
*/
|
||||
u32 sync_led_id;
|
||||
const struct attribute_group *sysfs_groups[LED_FLASH_SYSFS_GROUPS_SIZE];
|
||||
};
|
||||
|
||||
static inline struct led_classdev_flash *lcdev_to_flcdev(
|
||||
|
|
|
|||
|
|
@ -47,7 +47,6 @@ struct led_classdev {
|
|||
#define SET_BRIGHTNESS_ASYNC (1 << 21)
|
||||
#define SET_BRIGHTNESS_SYNC (1 << 22)
|
||||
#define LED_DEV_CAP_FLASH (1 << 23)
|
||||
#define LED_DEV_CAP_SYNC_STROBE (1 << 24)
|
||||
|
||||
/* Set LED brightness level */
|
||||
/* Must not sleep, use a workqueue if needed */
|
||||
|
|
@ -105,7 +104,11 @@ struct led_classdev {
|
|||
|
||||
extern int led_classdev_register(struct device *parent,
|
||||
struct led_classdev *led_cdev);
|
||||
extern int devm_led_classdev_register(struct device *parent,
|
||||
struct led_classdev *led_cdev);
|
||||
extern void led_classdev_unregister(struct led_classdev *led_cdev);
|
||||
extern void devm_led_classdev_unregister(struct device *parent,
|
||||
struct led_classdev *led_cdev);
|
||||
extern void led_classdev_suspend(struct led_classdev *led_cdev);
|
||||
extern void led_classdev_resume(struct led_classdev *led_cdev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue