Loading drivers/leds/leds-qti-flash.c +10 −0 Original line number Diff line number Diff line Loading @@ -601,10 +601,20 @@ int qti_flash_led_prepare(struct led_trigger *trig, int options, snode = container_of(led_cdev, struct flash_switch_data, cdev); if (options & QUERY_MAX_AVAIL_CURRENT) { if (!max_current) { pr_err("Invalid max_current pointer\n"); return -EINVAL; } *max_current = snode->led->max_current; return 0; } if (options & ENABLE_REGULATOR) return 0; if (options & DISABLE_REGULATOR) return 0; return -EINVAL; } EXPORT_SYMBOL(qti_flash_led_prepare); Loading include/linux/leds-qti-flash.h +4 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,10 @@ #include <linux/leds.h> #define QUERY_MAX_AVAIL_CURRENT BIT(0) #define ENABLE_REGULATOR BIT(0) #define DISABLE_REGULATOR BIT(1) #define QUERY_MAX_AVAIL_CURRENT BIT(2) #define QUERY_MAX_CURRENT BIT(3) int qpnp_flash_register_led_prepare(struct device *dev, void *data); Loading Loading
drivers/leds/leds-qti-flash.c +10 −0 Original line number Diff line number Diff line Loading @@ -601,10 +601,20 @@ int qti_flash_led_prepare(struct led_trigger *trig, int options, snode = container_of(led_cdev, struct flash_switch_data, cdev); if (options & QUERY_MAX_AVAIL_CURRENT) { if (!max_current) { pr_err("Invalid max_current pointer\n"); return -EINVAL; } *max_current = snode->led->max_current; return 0; } if (options & ENABLE_REGULATOR) return 0; if (options & DISABLE_REGULATOR) return 0; return -EINVAL; } EXPORT_SYMBOL(qti_flash_led_prepare); Loading
include/linux/leds-qti-flash.h +4 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,10 @@ #include <linux/leds.h> #define QUERY_MAX_AVAIL_CURRENT BIT(0) #define ENABLE_REGULATOR BIT(0) #define DISABLE_REGULATOR BIT(1) #define QUERY_MAX_AVAIL_CURRENT BIT(2) #define QUERY_MAX_CURRENT BIT(3) int qpnp_flash_register_led_prepare(struct device *dev, void *data); Loading