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 * The backlight driver core receives notifications from fbdev and
62 * FBIOBLANK ioctrl, results in a change in the backlight state the
88 * framebuffer driver. The backlight core only cares about FB_BLANK_UNBLANK
92 * There may be several fbdev's connected to the backlight device,
94 * if there is a change in backlight for the specified fbdev.
373 * backlight_force_update - tell the backlight subsystem that hardware state
375 * @bd: the backlight device to update
378 * Updates the internal state of the backlight in response to a hardware event,
379 * and generates an uevent to notify userspace. A backlight driver shall call
380 * backlight_force_update() when the backlight is changed using, for example,
432 WARN(1, "%s: invalid backlight type", name); in backlight_device_register()
471 /** backlight_device_get_by_type - find first backlight device of a type
472 * @type: the type of backlight device
474 * Look up the first backlight device of the specified type
478 * Pointer to backlight device if any was found. Otherwise NULL.
499 * backlight_device_get_by_name - Get backlight device by name
502 * This function looks up a backlight device by its name. It obtains a reference
503 * on the backlight device and it is the caller's responsibility to drop the
507 * A pointer to the backlight device if found, otherwise NULL.
550 struct backlight_device *backlight = *(struct backlight_device **)res; in devm_backlight_device_release() local
552 backlight_device_unregister(backlight); in devm_backlight_device_release()
564 * backlight_register_notifier - get notified of backlight (un)registration
565 * @nb: notifier block with the notifier to call on backlight (un)registration
567 * Register a notifier to get notified when backlight devices get registered
581 * backlight_unregister_notifier - unregister a backlight notifier
584 * Register a notifier to get notified when backlight devices get registered
598 * devm_backlight_device_register - register a new backlight device
603 * @ops: the backlight operations structure
604 * @props: the backlight properties
606 * Creates and registers new backlight device. When a backlight device
612 * struct backlight on success, or an ERR_PTR on error
619 struct backlight_device **ptr, *backlight; in devm_backlight_device_register() local
626 backlight = backlight_device_register(name, parent, devdata, ops, in devm_backlight_device_register()
628 if (!IS_ERR(backlight)) { in devm_backlight_device_register()
629 *ptr = backlight; in devm_backlight_device_register()
635 return backlight; in devm_backlight_device_register()
640 * devm_backlight_device_unregister - unregister backlight device
642 * @bd: the backlight device to unregister
644 * Deallocates a backlight allocated with devm_backlight_device_register().
666 * of_find_backlight_by_node() - find backlight device by device-tree node
667 * @node: device-tree node of the backlight device
669 * Returns a pointer to the backlight device corresponding to the given DT
670 * node or NULL if no such backlight device exists or if the device hasn't
673 * This function obtains a reference on the backlight device and it is the
675 * the backlight device's .dev field.
697 np = of_parse_phandle(dev->of_node, "backlight", 0); in of_find_backlight()
717 * devm_of_find_backlight - find backlight for a device
720 * This function looks for a property named 'backlight' on the DT node
721 * connected to @dev and looks up the backlight device. The lookup is
722 * device managed so the reference to the backlight device is automatically
727 * A pointer to the backlight device if found.
728 * Error pointer -EPROBE_DEFER if the DT property is set, but no backlight
729 * device is found. NULL if there's no backlight property.
754 backlight_class = class_create(THIS_MODULE, "backlight"); in backlight_class_init()
756 pr_warn("Unable to create backlight class; errno = %ld\n", in backlight_class_init()
779 MODULE_DESCRIPTION("Backlight Lowlevel Control Abstraction");