Lines Matching +full:led +full:- +full:pattern
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Driver model for leds and led triggers
11 #include <dt-bindings/leds/common.h>
29 * LED Core
47 * struct led_lookup_data - represents a single LED lookup entry
49 * @list: internal list of all LED lookup entries
50 * @provider: name of led_classdev providing the LED
51 * @dev_id: name of the device associated with this LED
52 * @con_id: name of the LED from the device's point of view
66 * with in-driver hard-coded LED names used as a fallback when
68 * in new LED class drivers.
72 * string to be used for devicename section of LED class device
73 * either for label based LED name composition path or for fwnode
78 * indicates if LED name should always comprise devicename section;
79 * only LEDs exposed by drivers of hot-pluggable devices should
128 /* Brightness off also disables hw-blinking so it is a separate action */
133 /* Set LED brightness level
140 * Set LED brightness level immediately - it can block the caller for
141 * the time required for accessing a LED device register.
145 /* Get LED brightness level */
155 * For led_blink_set_nosleep() the LED core assumes that blink_set
165 struct led_pattern *pattern, u32 len, int repeat);
171 struct list_head node; /* LED Device list */
192 /* true if activated - deactivate routine uses it to do cleanup */
198 /* Unique trigger name supported by LED set in hw control mode */
201 * Check if the LED driver supports the requested mode provided by the
202 * defined supported trigger to setup the LED to hw control mode.
204 * Return 0 on success. Return -EOPNOTSUPP when the passed flags are not
212 * Activate hardware control, LED driver will use the provided flags
213 * from the supported trigger and setup the LED to be driven by hardware
223 * Get from the LED driver the current mode that the LED is set in hw
225 * Trigger can use this to get the initial state of a LED already set in
230 * may be in a not supported initial state by the attached LED trigger.
235 * Get the device this LED blinks in response to.
236 * e.g. for a PHY LED, it is the network device. If the LED is
247 /* Ensures consistent access to the LED Flash Class device */
252 * led_classdev_register_ext - register a new object of LED class with
254 * @parent: LED controller device this LED is driven by
256 * @init_data: the LED class device initialization data
258 * Register a new object of LED class, with name derived from init_data.
267 * led_classdev_register - register a new object of LED class
268 * @parent: LED controller device this LED is driven by
271 * Register a new object of LED class, with name derived from the name property
321 * led_blink_set - set blinking with software fallback
322 * @led_cdev: the LED to start blinking
326 * This function makes the LED blink, attempting to use the
329 * the LED refuses the passed values.
334 * led_cdev->brightness_set() will not stop the blinking,
341 * led_blink_set_nosleep - set blinking, guaranteed to not sleep
342 * @led_cdev: the LED to start blinking
346 * This function makes the LED blink and is guaranteed to not sleep. Otherwise
353 * led_blink_set_oneshot - do a oneshot software blink
354 * @led_cdev: the LED to start blinking
357 * @invert: blink off, then on, leaving the led on
359 * This function makes the LED blink one time for delay_on +
360 * delay_off time, ignoring the request if another one-shot
363 * If invert is set, led blinks for delay_off first, then for
364 * delay_on and leave the led on after the on-off cycle.
372 * led_set_brightness - set LED brightness
373 * @led_cdev: the LED to set
376 * Set an LED's brightness, and, if necessary, cancel the
383 * led_set_brightness_sync - set LED brightness synchronously
384 * @led_cdev: the LED to set
387 * Set an LED's brightness immediately. This function will block
396 * led_update_brightness - update LED brightness
397 * @led_cdev: the LED to query
399 * Get an LED's current brightness and update led_cdev->brightness
407 * led_get_default_pattern - return default pattern
409 * @led_cdev: the LED to get default pattern for
413 * Return: Allocated array of integers with default pattern from device tree
419 * led_sysfs_disable - disable LED sysfs interface
420 * @led_cdev: the LED to set
427 * led_sysfs_enable - enable LED sysfs interface
428 * @led_cdev: the LED to set
435 * led_compose_name - compose LED class device name
436 * @dev: LED controller device object
437 * @init_data: the LED class device initialization data
438 * @led_classdev_name: composed LED class device name
440 * Create LED class device name basing on the provided init_data argument.
450 * led_sysfs_is_disabled - check if LED sysfs interface is disabled
451 * @led_cdev: the LED to query
457 return led_cdev->flags & LED_SYSFS_DISABLE; in led_sysfs_is_disabled()
461 * LED Triggers
477 /* LED-private triggers have this set */
492 * the LED device. As this might change in the future, the following
493 * macros abstract getting the LED device and its trigger_data from the dev
522 led_cdev->trigger_data = trigger_data; in led_set_trigger_data()
527 return led_cdev->trigger_data; in led_get_trigger_data()
608 * Generic LED platform data for describing LED names and default triggers.
634 /* For the leds-gpio driver */
697 * struct led_pattern - pattern interval settings
698 * @delta_t: pattern interval delay, in milliseconds
699 * @brightness: pattern interval brightness
707 LED_AUDIO_MUTE, /* master mute LED */
708 LED_AUDIO_MICMUTE, /* mic mute LED */