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 */
174 struct workqueue_struct *wq; /* LED workqueue */
187 /* true if activated - deactivate routine uses it to do cleanup */
193 /* Unique trigger name supported by LED set in hw control mode */
196 * Check if the LED driver supports the requested mode provided by the
197 * defined supported trigger to setup the LED to hw control mode.
199 * Return 0 on success. Return -EOPNOTSUPP when the passed flags are not
207 * Activate hardware control, LED driver will use the provided flags
208 * from the supported trigger and setup the LED to be driven by hardware
218 * Get from the LED driver the current mode that the LED is set in hw
220 * Trigger can use this to get the initial state of a LED already set in
225 * may be in a not supported initial state by the attached LED trigger.
230 * Get the device this LED blinks in response to.
231 * e.g. for a PHY LED, it is the network device. If the LED is
242 /* Ensures consistent access to the LED class device */
247 * led_classdev_register_ext - register a new object of LED class with
249 * @parent: LED controller device this LED is driven by
251 * @init_data: the LED class device initialization data
253 * Register a new object of LED class, with name derived from init_data.
262 * led_classdev_register - register a new object of LED class
263 * @parent: LED controller device this LED is driven by
266 * Register a new object of LED class, with name derived from the name property
305 * led_blink_set - set blinking with software fallback
306 * @led_cdev: the LED to start blinking
310 * This function makes the LED blink, attempting to use the
313 * the LED refuses the passed values.
318 * led_cdev->brightness_set() will not stop the blinking,
325 * led_blink_set_nosleep - set blinking, guaranteed to not sleep
326 * @led_cdev: the LED to start blinking
330 * This function makes the LED blink and is guaranteed to not sleep. Otherwise
337 * led_blink_set_oneshot - do a oneshot software blink
338 * @led_cdev: the LED to start blinking
341 * @invert: blink off, then on, leaving the led on
343 * This function makes the LED blink one time for delay_on +
344 * delay_off time, ignoring the request if another one-shot
347 * If invert is set, led blinks for delay_off first, then for
348 * delay_on and leave the led on after the on-off cycle.
356 * led_set_brightness - set LED brightness
357 * @led_cdev: the LED to set
360 * Set an LED's brightness, and, if necessary, cancel the
367 * led_set_brightness_sync - set LED brightness synchronously
368 * @led_cdev: the LED to set
371 * Set an LED's brightness immediately. This function will block
380 * led_mc_set_brightness - set mc LED color intensity values and brightness
381 * @led_cdev: the LED to set
384 * @brightness: the brightness to set the LED to
386 * Set a multi-color LED's per color intensity values and brightness.
390 * Calling this function on a non multi-color led_classdev or with the wrong
399 * led_update_brightness - update LED brightness
400 * @led_cdev: the LED to query
402 * Get an LED's current brightness and update led_cdev->brightness
410 * led_get_default_pattern - return default pattern
412 * @led_cdev: the LED to get default pattern for
422 * led_sysfs_disable - disable LED sysfs interface
423 * @led_cdev: the LED to set
425 * Disable the led_cdev's sysfs interface.
430 * led_sysfs_enable - enable LED sysfs interface
431 * @led_cdev: the LED to set
433 * Enable the led_cdev's sysfs interface.
438 * led_compose_name - compose LED class device name
439 * @dev: LED controller device object
440 * @init_data: the LED class device initialization data
441 * @led_classdev_name: composed LED class device name
443 * Create LED class device name basing on the provided init_data argument.
453 * led_get_color_name - get string representation of color ID
463 * led_sysfs_is_disabled - check if LED sysfs interface is disabled
464 * @led_cdev: the LED to query
466 * Returns: true if the led_cdev's sysfs interface is disabled.
470 return led_cdev->flags & LED_SYSFS_DISABLE; in led_sysfs_is_disabled()
474 * LED Triggers
493 /* LED-private triggers have this set */
508 * the LED device. As this might change in the future, the following
509 * macros abstract getting the LED device and its trigger_data from the dev
541 led_cdev->trigger_data = trigger_data; in led_set_trigger_data()
546 return led_cdev->trigger_data; in led_get_trigger_data()
552 return trigger ? trigger->brightness : LED_OFF; in led_trigger_get_brightness()
644 * Generic LED platform data for describing LED names and default triggers.
670 /* For the leds-gpio driver */
733 * struct led_pattern - pattern interval settings
743 LED_AUDIO_MUTE, /* master mute LED */
744 LED_AUDIO_MICMUTE, /* mic mute LED */