Lines Matching +full:led +full:- +full:pattern
1 // SPDX-License-Identifier: GPL-2.0-only
3 * LED Kernel Timer Trigger
5 * Copyright 2005-2006 Openedhand Ltd.
23 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); in led_delay_on_show()
37 led_blink_set(led_cdev, &state, &led_cdev->blink_delay_off); in led_delay_on_store()
38 led_cdev->blink_delay_on = state; in led_delay_on_store()
48 return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); in led_delay_off_show()
62 led_blink_set(led_cdev, &led_cdev->blink_delay_on, &state); in led_delay_off_store()
63 led_cdev->blink_delay_off = state; in led_delay_off_store()
80 u32 *pattern; in pattern_init() local
83 pattern = led_get_default_pattern(led_cdev, &size); in pattern_init()
84 if (!pattern) in pattern_init()
88 dev_warn(led_cdev->dev, in pattern_init()
89 "Expected 2 but got %u values for delays pattern\n", in pattern_init()
94 led_cdev->blink_delay_on = pattern[0]; in pattern_init()
95 led_cdev->blink_delay_off = pattern[1]; in pattern_init()
99 kfree(pattern); in pattern_init()
104 if (led_cdev->flags & LED_INIT_DEFAULT_TRIGGER) { in timer_trig_activate()
110 led_cdev->flags &= ~LED_INIT_DEFAULT_TRIGGER; in timer_trig_activate()
117 flush_work(&led_cdev->set_brightness_work); in timer_trig_activate()
118 led_blink_set(led_cdev, &led_cdev->blink_delay_on, in timer_trig_activate()
119 &led_cdev->blink_delay_off); in timer_trig_activate()
139 MODULE_DESCRIPTION("Timer LED trigger");