Lines Matching refs:backlight

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 .name = "backlight",
379 * backlight_force_update - tell the backlight subsystem that hardware state
381 * @bd: the backlight device to update
384 * Updates the internal state of the backlight in response to a hardware event,
385 * and generates an uevent to notify userspace. A backlight driver shall call
386 * backlight_force_update() when the backlight is changed using, for example,
438 WARN(1, "%s: invalid backlight type", name);
477 /** backlight_device_get_by_type - find first backlight device of a type
478 * @type: the type of backlight device
480 * Look up the first backlight device of the specified type
484 * Pointer to backlight device if any was found. Otherwise NULL.
505 * backlight_device_get_by_name - Get backlight device by name
508 * This function looks up a backlight device by its name. It obtains a reference
509 * on the backlight device and it is the caller's responsibility to drop the
513 * A pointer to the backlight device if found, otherwise NULL.
556 struct backlight_device *backlight = *(struct backlight_device **)res;
558 backlight_device_unregister(backlight);
570 * backlight_register_notifier - get notified of backlight (un)registration
571 * @nb: notifier block with the notifier to call on backlight (un)registration
573 * Register a notifier to get notified when backlight devices get registered
587 * backlight_unregister_notifier - unregister a backlight notifier
590 * Register a notifier to get notified when backlight devices get registered
604 * devm_backlight_device_register - register a new backlight device
609 * @ops: the backlight operations structure
610 * @props: the backlight properties
612 * Creates and registers new backlight device. When a backlight device
618 * struct backlight on success, or an ERR_PTR on error
625 struct backlight_device **ptr, *backlight;
632 backlight = backlight_device_register(name, parent, devdata, ops,
634 if (!IS_ERR(backlight)) {
635 *ptr = backlight;
641 return backlight;
646 * devm_backlight_device_unregister - unregister backlight device
648 * @bd: the backlight device to unregister
650 * Deallocates a backlight allocated with devm_backlight_device_register().
672 * of_find_backlight_by_node() - find backlight device by device-tree node
673 * @node: device-tree node of the backlight device
675 * Returns a pointer to the backlight device corresponding to the given DT
676 * node or NULL if no such backlight device exists or if the device hasn't
679 * This function obtains a reference on the backlight device and it is the
681 * the backlight device's .dev field.
703 np = of_parse_phandle(dev->of_node, "backlight", 0);
723 * devm_of_find_backlight - find backlight for a device
726 * This function looks for a property named 'backlight' on the DT node
727 * connected to @dev and looks up the backlight device. The lookup is
728 * device managed so the reference to the backlight device is automatically
733 * A pointer to the backlight device if found.
734 * Error pointer -EPROBE_DEFER if the DT property is set, but no backlight
735 * device is found. NULL if there's no backlight property.
764 pr_warn("Unable to create backlight class; errno = %d\n", ret);