Lines Matching full:trigger
68 /* we come here only if buf matches no trigger */ in led_trigger_write()
99 led_cdev->trigger ? "none" : "[none]"); in led_trigger_format()
107 hit = led_cdev->trigger && !strcmp(led_cdev->trigger->name, trig->name); in led_trigger_format()
165 if (!led_cdev->trigger && !trig) in led_trigger_set()
169 event = kasprintf(GFP_KERNEL, "TRIGGER=%s", name); in led_trigger_set()
171 /* Remove any existing trigger */ in led_trigger_set()
172 if (led_cdev->trigger) { in led_trigger_set()
173 spin_lock(&led_cdev->trigger->leddev_list_lock); in led_trigger_set()
175 spin_unlock(&led_cdev->trigger->leddev_list_lock); in led_trigger_set()
182 device_remove_groups(led_cdev->dev, led_cdev->trigger->groups); in led_trigger_set()
183 if (led_cdev->trigger->deactivate) in led_trigger_set()
184 led_cdev->trigger->deactivate(led_cdev); in led_trigger_set()
185 led_cdev->trigger = NULL; in led_trigger_set()
195 led_cdev->trigger = trig; in led_trigger_set()
199 * the brightness of the LED for which the trigger is being set. in led_trigger_set()
220 dev_err(led_cdev->dev, "Failed to add trigger attributes\n"); in led_trigger_set()
242 spin_lock(&led_cdev->trigger->leddev_list_lock); in led_trigger_set()
244 spin_unlock(&led_cdev->trigger->leddev_list_lock); in led_trigger_set()
246 led_cdev->trigger = NULL; in led_trigger_set()
295 * If default trigger wasn't found, maybe trigger module isn't loaded yet. in led_trigger_set_default()
303 /* LED Trigger Interface */
314 /* Make sure the trigger's name isn't already in use */ in led_trigger_register()
327 /* Register with any LEDs that have this as a default trigger */ in led_trigger_register()
331 if (!led_cdev->trigger && led_cdev->default_trigger) in led_trigger_register()
353 /* Remove anyone actively using this trigger */ in led_trigger_unregister()
357 if (led_cdev->trigger == trig) in led_trigger_unregister()
393 /* Simple LED Trigger Interface */
484 pr_warn("LED trigger %s failed to register (%d)\n", in led_trigger_register_simple()
488 pr_warn("LED trigger %s failed to register (no memory)\n", in led_trigger_register_simple()