Lines Matching +full:led +full:- +full:s
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
122 /* Brightness off also disables hw-blinking so it is a separate action */
127 /* Set LED brightness level
134 * Set LED brightness level immediately - it can block the caller for
135 * the time required for accessing a LED device register.
139 /* Get LED brightness level */
149 * For led_blink_set_nosleep() the LED core assumes that blink_set
165 struct list_head node; /* LED Device list */
186 /* true if activated - deactivate routine uses it to do cleanup */
192 /* Unique trigger name supported by LED set in hw control mode */
195 * Check if the LED driver supports the requested mode provided by the
196 * defined supported trigger to setup the LED to hw control mode.
198 * Return 0 on success. Return -EOPNOTSUPP when the passed flags are not
206 * Activate hardware control, LED driver will use the provided flags
207 * from the supported trigger and setup the LED to be driven by hardware
217 * Get from the LED driver the current mode that the LED is set in hw
219 * Trigger can use this to get the initial state of a LED already set in
224 * may be in a not supported initial state by the attached LED trigger.
229 * Get the device this LED blinks in response to.
230 * e.g. for a PHY LED, it is the network device. If the LED is
241 /* Ensures consistent access to the LED Flash Class device */
246 * led_classdev_register_ext - register a new object of LED class with
248 * @parent: LED controller device this LED is driven by
250 * @init_data: the LED class device initialization data
252 * Register a new object of LED class, with name derived from init_data.
261 * led_classdev_register - register a new object of LED class
262 * @parent: LED controller device this LED is driven by
265 * Register a new object of LED class, with name derived from the name property
304 * led_blink_set - set blinking with software fallback
305 * @led_cdev: the LED to start blinking
309 * This function makes the LED blink, attempting to use the
312 * the LED refuses the passed values.
317 * led_cdev->brightness_set() will not stop the blinking,
324 * led_blink_set_nosleep - set blinking, guaranteed to not sleep
325 * @led_cdev: the LED to start blinking
329 * This function makes the LED blink and is guaranteed to not sleep. Otherwise
336 * led_blink_set_oneshot - do a oneshot software blink
337 * @led_cdev: the LED to start blinking
340 * @invert: blink off, then on, leaving the led on
342 * This function makes the LED blink one time for delay_on +
343 * delay_off time, ignoring the request if another one-shot
346 * If invert is set, led blinks for delay_off first, then for
347 * delay_on and leave the led on after the on-off cycle.
355 * led_set_brightness - set LED brightness
356 * @led_cdev: the LED to set
359 * Set an LED's brightness, and, if necessary, cancel the
366 * led_set_brightness_sync - set LED brightness synchronously
367 * @led_cdev: the LED to set
370 * Set an LED's brightness immediately. This function will block
379 * led_mc_set_brightness - set mc LED color intensity values and brightness
380 * @led_cdev: the LED to set
383 * @brightness: the brightness to set the LED to
385 * Set a multi-color LED's per color intensity values and brightness.
389 * Calling this function on a non multi-color led_classdev or with the wrong
398 * led_update_brightness - update LED brightness
399 * @led_cdev: the LED to query
401 * Get an LED's current brightness and update led_cdev->brightness
409 * led_get_default_pattern - return default pattern
411 * @led_cdev: the LED to get default pattern for
421 * led_sysfs_disable - disable LED sysfs interface
422 * @led_cdev: the LED to set
424 * Disable the led_cdev's sysfs interface.
429 * led_sysfs_enable - enable LED sysfs interface
430 * @led_cdev: the LED to set
432 * Enable the led_cdev's sysfs interface.
437 * led_compose_name - compose LED class device name
438 * @dev: LED controller device object
439 * @init_data: the LED class device initialization data
440 * @led_classdev_name: composed LED class device name
442 * Create LED class device name basing on the provided init_data argument.
452 * led_get_color_name - get string representation of color ID
462 * led_sysfs_is_disabled - check if LED sysfs interface is disabled
463 * @led_cdev: the LED to query
465 * Returns: true if the led_cdev's sysfs interface is disabled.
469 return led_cdev->flags & LED_SYSFS_DISABLE; in led_sysfs_is_disabled()
473 * LED Triggers
492 /* LED-private triggers have this set */
507 * the LED device. As this might change in the future, the following
508 * macros abstract getting the LED device and its trigger_data from the dev
540 led_cdev->trigger_data = trigger_data; in led_set_trigger_data()
545 return led_cdev->trigger_data; in led_get_trigger_data()
551 return trigger ? trigger->brightness : LED_OFF; in led_trigger_get_brightness()
643 * Generic LED platform data for describing LED names and default triggers.
669 /* For the leds-gpio driver */
732 * struct led_pattern - pattern interval settings
742 LED_AUDIO_MUTE, /* master mute LED */
743 LED_AUDIO_MICMUTE, /* mic mute LED */