Lines Matching refs:led_cdev
28 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_shot() local
31 led_blink_set_oneshot(led_cdev, in led_shot()
32 &led_cdev->blink_delay_on, &led_cdev->blink_delay_off, in led_shot()
49 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_invert_store() local
61 led_set_brightness_nosleep(led_cdev, LED_FULL); in led_invert_store()
63 led_set_brightness_nosleep(led_cdev, LED_OFF); in led_invert_store()
71 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_on_show() local
73 return sprintf(buf, "%lu\n", led_cdev->blink_delay_on); in led_delay_on_show()
79 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_on_store() local
87 led_cdev->blink_delay_on = state; in led_delay_on_store()
95 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_off_show() local
97 return sprintf(buf, "%lu\n", led_cdev->blink_delay_off); in led_delay_off_show()
103 struct led_classdev *led_cdev = led_trigger_get_led(dev); in led_delay_off_store() local
111 led_cdev->blink_delay_off = state; in led_delay_off_store()
130 static void pattern_init(struct led_classdev *led_cdev) in pattern_init() argument
135 pattern = led_get_default_pattern(led_cdev, &size); in pattern_init()
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()
158 static int oneshot_trig_activate(struct led_classdev *led_cdev) in oneshot_trig_activate() argument
166 led_set_trigger_data(led_cdev, oneshot_data); in oneshot_trig_activate()
168 if (led_cdev->flags & LED_INIT_DEFAULT_TRIGGER) { in oneshot_trig_activate()
169 pattern_init(led_cdev); in oneshot_trig_activate()
174 led_cdev->flags &= ~LED_INIT_DEFAULT_TRIGGER; in oneshot_trig_activate()
180 static void oneshot_trig_deactivate(struct led_classdev *led_cdev) in oneshot_trig_deactivate() argument
182 struct oneshot_trig_data *oneshot_data = led_get_trigger_data(led_cdev); in oneshot_trig_deactivate()
187 led_set_brightness(led_cdev, LED_OFF); in oneshot_trig_deactivate()