Lines Matching +full:one +full:- +full:shot
1 // SPDX-License-Identifier: GPL-2.0-only
3 * One-shot LED Trigger
7 * Based on ledtrig-timer.c by Richard Purdie <rpurdie@openedhand.com>
32 &led_cdev->blink_delay_on, &led_cdev->blink_delay_off, in led_shot()
33 oneshot_data->invert); in led_shot()
43 return sprintf(buf, "%u\n", oneshot_data->invert); in led_invert_show()
58 oneshot_data->invert = !!state; in led_invert_store()
60 if (oneshot_data->invert) in led_invert_store()
73 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); in led_delay_on_show()
87 led_cdev->blink_delay_on = state; in led_delay_on_store()
97 return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); in led_delay_off_show()
111 led_cdev->blink_delay_off = state; in led_delay_off_store()
119 static DEVICE_ATTR(shot, 0200, NULL, led_shot);
140 dev_warn(led_cdev->dev, in pattern_init()
146 led_cdev->blink_delay_on = pattern[0]; in pattern_init()
147 led_cdev->blink_delay_off = pattern[1]; in pattern_init()
154 led_cdev->blink_delay_on = DEFAULT_DELAY; in pattern_init()
155 led_cdev->blink_delay_off = DEFAULT_DELAY; in pattern_init()
164 return -ENOMEM; in oneshot_trig_activate()
168 if (led_cdev->flags & LED_INIT_DEFAULT_TRIGGER) { in oneshot_trig_activate()
174 led_cdev->flags &= ~LED_INIT_DEFAULT_TRIGGER; in oneshot_trig_activate()
199 MODULE_DESCRIPTION("One-shot LED trigger");