Lines Matching full:backlight

3  * Backlight Lowlevel Control Abstraction
14 #include <linux/backlight.h>
22 #include <asm/backlight.h>
28 * The backlight core supports implementing backlight drivers.
30 * A backlight driver registers a driver using
31 * devm_backlight_device_register(). The properties of the backlight
34 * the update_status() operation is called. The backlight driver shall
35 * implement this operation and use it to adjust backlight.
37 * Several sysfs attributes are provided by the backlight core::
43 * See Documentation/ABI/stable/sysfs-class-backlight for the full list.
45 * The backlight can be adjusted using the sysfs interface, and
46 * the backlight driver may also support adjusting backlight using
54 * When the backlight changes this is reported to user-space using
57 * a hot-key to adjust backlight, the driver must notify the backlight
60 * Display drives can control the backlight device's status using
62 * results in a change in the backlight state the functions call the
327 .name = "backlight",
333 * backlight_force_update - tell the backlight subsystem that hardware state
335 * @bd: the backlight device to update
338 * Updates the internal state of the backlight in response to a hardware event,
339 * and generates an uevent to notify userspace. A backlight driver shall call
340 * backlight_force_update() when the backlight is changed using, for example,
392 WARN(1, "%s: invalid backlight type", name);
422 /** backlight_device_get_by_type - find first backlight device of a type
423 * @type: the type of backlight device
425 * Look up the first backlight device of the specified type
429 * Pointer to backlight device if any was found. Otherwise NULL.
450 * backlight_device_get_by_name - Get backlight device by name
453 * This function looks up a backlight device by its name. It obtains a reference
454 * on the backlight device and it is the caller's responsibility to drop the
458 * A pointer to the backlight device if found, otherwise NULL.
497 struct backlight_device *backlight = *(struct backlight_device **)res;
499 backlight_device_unregister(backlight);
511 * devm_backlight_device_register - register a new backlight device
516 * @ops: the backlight operations structure
517 * @props: the backlight properties
519 * Creates and registers new backlight device. When a backlight device
525 * struct backlight on success, or an ERR_PTR on error
532 struct backlight_device **ptr, *backlight;
539 backlight = backlight_device_register(name, parent, devdata, ops,
541 if (!IS_ERR(backlight)) {
542 *ptr = backlight;
548 return backlight;
553 * devm_backlight_device_unregister - unregister backlight device
555 * @bd: the backlight device to unregister
557 * Deallocates a backlight allocated with devm_backlight_device_register().
579 * of_find_backlight_by_node() - find backlight device by device-tree node
580 * @node: device-tree node of the backlight device
582 * Returns a pointer to the backlight device corresponding to the given DT
583 * node or NULL if no such backlight device exists or if the device hasn't
586 * This function obtains a reference on the backlight device and it is the
588 * the backlight device's .dev field.
610 np = of_parse_phandle(dev->of_node, "backlight", 0);
630 * devm_of_find_backlight - find backlight for a device
633 * This function looks for a property named 'backlight' on the DT node
634 * connected to @dev and looks up the backlight device. The lookup is
635 * device managed so the reference to the backlight device is automatically
640 * A pointer to the backlight device if found.
641 * Error pointer -EPROBE_DEFER if the DT property is set, but no backlight
642 * device is found. NULL if there's no backlight property.
671 pr_warn("Unable to create backlight class; errno = %d\n", ret);
690 MODULE_DESCRIPTION("Backlight Lowlevel Control Abstraction");