Skip to content

Commit

Permalink
backlight: backlight: Document inline functions in backlight.h
Browse files Browse the repository at this point in the history
Add documentation for the inline functions in backlight.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Sam Ravnborg authored and Lee Jones committed Jul 20, 2020
1 parent 6f10cd1 commit d160fd4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions include/linux/backlight.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ struct backlight_device {
int use_count;
};

/**
* backlight_update_status - force an update of the backlight device status
* @bd: the backlight device
*/
static inline int backlight_update_status(struct backlight_device *bd)
{
int ret = -ENOENT;
Expand Down Expand Up @@ -361,6 +365,18 @@ extern int backlight_device_set_brightness(struct backlight_device *bd, unsigned

#define to_backlight_device(obj) container_of(obj, struct backlight_device, dev)

/**
* bl_get_data - access devdata
* @bl_dev: pointer to backlight device
*
* When a backlight device is registered the driver has the possibility
* to supply a void * devdata. bl_get_data() return a pointer to the
* devdata.
*
* RETURNS:
*
* pointer to devdata stored while registering the backlight device.
*/
static inline void * bl_get_data(struct backlight_device *bl_dev)
{
return dev_get_drvdata(&bl_dev->dev);
Expand Down

0 comments on commit d160fd4

Please sign in to comment.