Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds
Pull LED subsystem updates from Bryan Wu: - move LED trigger drivers into a new directory - lp55xx common driver updates - other led drivers updates and bug fixing * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds: leds: leds-asic3: switch to using SIMPLE_DEV_PM_OPS leds: leds-bd2802: add CONFIG_PM_SLEEP to suspend/resume functions leds: lp55xx: configure the clock detection leds: lp55xx: use common clock framework when external clock is used leds: leds-ns2: fix oops at module removal leds: leds-pwm: Defer led_pwm_set() if PWM can sleep leds: lp55xx: fix the sysfs read operation leds: lm355x, lm3642: support camera LED triggers for flash and torch leds: add camera LED triggers leds: trigger: use inline functions instead of macros leds: tca6507: Use of_match_ptr() macro leds: wm8350: Complain if we fail to reenable DCDC leds: renesas: set gpio_request_one() flags param correctly leds: leds-ns2: set devm_gpio_request_one() flags param correctly leds: leds-lt3593: set devm_gpio_request_one() flags param correctly leds: leds-bd2802: remove erroneous __exit annotation leds: atmel-pwm: remove erroneous __exit annotation leds: move LED trigger drivers into new subdirectory leds: add new LP5562 LED driver
This commit is contained in:
@@ -142,6 +142,10 @@ extern void led_set_brightness(struct led_classdev *led_cdev,
|
||||
/*
|
||||
* LED Triggers
|
||||
*/
|
||||
/* Registration functions for simple triggers */
|
||||
#define DEFINE_LED_TRIGGER(x) static struct led_trigger *x;
|
||||
#define DEFINE_LED_TRIGGER_GLOBAL(x) struct led_trigger *x;
|
||||
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
|
||||
#define TRIG_NAME_MAX 50
|
||||
@@ -164,9 +168,6 @@ struct led_trigger {
|
||||
extern int led_trigger_register(struct led_trigger *trigger);
|
||||
extern void led_trigger_unregister(struct led_trigger *trigger);
|
||||
|
||||
/* Registration functions for simple triggers */
|
||||
#define DEFINE_LED_TRIGGER(x) static struct led_trigger *x;
|
||||
#define DEFINE_LED_TRIGGER_GLOBAL(x) struct led_trigger *x;
|
||||
extern void led_trigger_register_simple(const char *name,
|
||||
struct led_trigger **trigger);
|
||||
extern void led_trigger_unregister_simple(struct led_trigger *trigger);
|
||||
@@ -199,20 +200,30 @@ extern void led_trigger_rename_static(const char *name,
|
||||
|
||||
#else
|
||||
|
||||
/* Triggers aren't active - null macros */
|
||||
#define DEFINE_LED_TRIGGER(x)
|
||||
#define DEFINE_LED_TRIGGER_GLOBAL(x)
|
||||
#define led_trigger_register_simple(x, y) do {} while(0)
|
||||
#define led_trigger_unregister_simple(x) do {} while(0)
|
||||
#define led_trigger_event(x, y) do {} while(0)
|
||||
/* Trigger has no members */
|
||||
struct led_trigger {};
|
||||
|
||||
#endif
|
||||
/* Trigger inline empty functions */
|
||||
static inline void led_trigger_register_simple(const char *name,
|
||||
struct led_trigger **trigger) {}
|
||||
static inline void led_trigger_unregister_simple(struct led_trigger *trigger) {}
|
||||
static inline void led_trigger_event(struct led_trigger *trigger,
|
||||
enum led_brightness event) {}
|
||||
#endif /* CONFIG_LEDS_TRIGGERS */
|
||||
|
||||
/* Trigger specific functions */
|
||||
#ifdef CONFIG_LEDS_TRIGGER_IDE_DISK
|
||||
extern void ledtrig_ide_activity(void);
|
||||
#else
|
||||
#define ledtrig_ide_activity() do {} while(0)
|
||||
static inline void ledtrig_ide_activity(void) {}
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_LEDS_TRIGGER_CAMERA) || defined(CONFIG_LEDS_TRIGGER_CAMERA_MODULE)
|
||||
extern void ledtrig_flash_ctrl(bool on);
|
||||
extern void ledtrig_torch_ctrl(bool on);
|
||||
#else
|
||||
static inline void ledtrig_flash_ctrl(bool on) {}
|
||||
static inline void ledtrig_torch_ctrl(bool on) {}
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -342,9 +342,7 @@ struct mmc_host {
|
||||
|
||||
mmc_pm_flag_t pm_flags; /* requested pm features */
|
||||
|
||||
#ifdef CONFIG_LEDS_TRIGGERS
|
||||
struct led_trigger *led; /* activity led */
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_REGULATOR
|
||||
bool regulator_enabled; /* regulator state */
|
||||
|
||||
@@ -20,18 +20,6 @@
|
||||
#define LP55XX_CLOCK_INT 1
|
||||
#define LP55XX_CLOCK_EXT 2
|
||||
|
||||
/* Bits in LP5521 CONFIG register. 'update_config' in lp55xx_platform_data */
|
||||
#define LP5521_PWM_HF 0x40 /* PWM: 0 = 256Hz, 1 = 558Hz */
|
||||
#define LP5521_PWRSAVE_EN 0x20 /* 1 = Power save mode */
|
||||
#define LP5521_CP_MODE_OFF 0 /* Charge pump (CP) off */
|
||||
#define LP5521_CP_MODE_BYPASS 8 /* CP forced to bypass mode */
|
||||
#define LP5521_CP_MODE_1X5 0x10 /* CP forced to 1.5x mode */
|
||||
#define LP5521_CP_MODE_AUTO 0x18 /* Automatic mode selection */
|
||||
#define LP5521_R_TO_BATT 4 /* R out: 0 = CP, 1 = Vbat */
|
||||
#define LP5521_CLK_SRC_EXT 0 /* Ext-clk source (CLK_32K) */
|
||||
#define LP5521_CLK_INT 1 /* Internal clock */
|
||||
#define LP5521_CLK_AUTO 2 /* Automatic clock selection */
|
||||
|
||||
struct lp55xx_led_config {
|
||||
const char *name;
|
||||
u8 chan_nr;
|
||||
@@ -40,9 +28,9 @@ struct lp55xx_led_config {
|
||||
};
|
||||
|
||||
struct lp55xx_predef_pattern {
|
||||
u8 *r;
|
||||
u8 *g;
|
||||
u8 *b;
|
||||
const u8 *r;
|
||||
const u8 *g;
|
||||
const u8 *b;
|
||||
u8 size_r;
|
||||
u8 size_g;
|
||||
u8 size_b;
|
||||
@@ -79,9 +67,6 @@ struct lp55xx_platform_data {
|
||||
/* Predefined pattern data */
|
||||
struct lp55xx_predef_pattern *patterns;
|
||||
unsigned int num_patterns;
|
||||
|
||||
/* _CONFIG register */
|
||||
u8 update_config;
|
||||
};
|
||||
|
||||
#endif /* _LEDS_LP55XX_H */
|
||||
|
||||
Reference in New Issue
Block a user