diff mbox series

[v2,08/16] backlight: document enums in backlight.h

Message ID 20200517190139.740249-9-sam@ravnborg.org (mailing list archive)
State New, archived
Headers show
Series backlight updates | expand

Commit Message

Sam Ravnborg May 17, 2020, 7:01 p.m. UTC
Add kernel-doc documentation for the backlight enums

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
---
 include/linux/backlight.h | 84 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

Comments

Daniel Thompson May 18, 2020, 4:15 p.m. UTC | #1
On Sun, May 17, 2020 at 09:01:31PM +0200, Sam Ravnborg wrote:
> Add kernel-doc documentation for the backlight enums
> 
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
> Cc: Lee Jones <lee.jones@linaro.org>
> Cc: Daniel Thompson <daniel.thompson@linaro.org>
> Cc: Jingoo Han <jingoohan1@gmail.com>

Other than the usual comment about the form in the kernel-doc howto:

Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>



> ---
>  include/linux/backlight.h | 84 +++++++++++++++++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/include/linux/backlight.h b/include/linux/backlight.h
> index 98349a2984dc..b779c29142fd 100644
> --- a/include/linux/backlight.h
> +++ b/include/linux/backlight.h
> @@ -14,26 +14,110 @@
>  #include <linux/mutex.h>
>  #include <linux/notifier.h>
>  
> +/**
> + * enum backlight_update_reason - what method was used to update backlight
> + *
> + * A driver indicates the method (reason) used for updating the backlight
> + * when calling backlight_force_update().
> + */
>  enum backlight_update_reason {
> +	/**
> +	 * @BACKLIGHT_UPDATE_HOTKEY:
> +	 *
> +	 * The backlight was updated using a hot-key.
> +	 */
>  	BACKLIGHT_UPDATE_HOTKEY,
> +
> +	/**
> +	 * @BACKLIGHT_UPDATE_SYSFS:
> +	 *
> +	 * The backlight was updated using sysfs.
> +	 */
>  	BACKLIGHT_UPDATE_SYSFS,
>  };
>  
> +/**
> + * enum backlight_type - the type of backlight control
> + *
> + * The type of interface used to control the backlight.
> + */
>  enum backlight_type {
> +	/**
> +	 * @BACKLIGHT_RAW:
> +	 *
> +	 * The backlight is controlled using hardware registers directly.
> +	 */
>  	BACKLIGHT_RAW = 1,
> +
> +	/**
> +	 * @BACKLIGHT_PLATFORM:
> +	 *
> +	 * The backlight is controller using a platform-specific interface.
> +	 */
>  	BACKLIGHT_PLATFORM,
> +
> +	/**
> +	 * @BACKLIGHT_FIRMWARE:
> +	 *
> +	 * The backlight is controlled using a standard firmware interface.
> +	 */
>  	BACKLIGHT_FIRMWARE,
> +
> +	/**
> +	 * @BACKLIGHT_TYPE_MAX: Number of entries.
> +	 */
>  	BACKLIGHT_TYPE_MAX,
>  };
>  
> +/**
> + * enum backlight_notification - the type of notification
> + *
> + * The notifications that is used for notification sent to the receiver
> + * that registered notifications using backlight_register_notifier().
> + */
>  enum backlight_notification {
> +	/**
> +	 * @BACKLIGHT_REGISTERED:
> +	 *
> +	 * The backlight device is registered.
> +	 */
>  	BACKLIGHT_REGISTERED,
> +
> +	/**
> +	 * @BACKLIGHT_UNREGISTERED:
> +	 *
> +	 * The backlight revice is unregistered.
> +	 */
>  	BACKLIGHT_UNREGISTERED,
>  };
>  
> +/** enum backlight_scale - the type of scale used for brightness values
> + *
> + * The type of scale used for brightness values.
> + */
>  enum backlight_scale {
> +	/**
> +	 * @BACKLIGHT_SCALE_UNKNOWN:
> +	 *
> +	 * The scale is unknown.
> +	 */
>  	BACKLIGHT_SCALE_UNKNOWN = 0,
> +
> +	/**
> +	 * @BACKLIGHT_SCALE_LINEAR:
> +	 *
> +	 * The scale is linear, so the brigness increase is the same
> +	 * when increasing with the same steps (more or less).
> +	 */
>  	BACKLIGHT_SCALE_LINEAR,
> +
> +	/**
> +	 * @BACKLIGHT_SCALE_NON_LINEAR:
> +	 *
> +	 * The scale is not linear. This is often used when the brightness
> +	 * values tries to adjust to the relative perception of the eye
> +	 * demanding a non-linear scale.
> +	 */
>  	BACKLIGHT_SCALE_NON_LINEAR,
>  };
>  
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/include/linux/backlight.h b/include/linux/backlight.h
index 98349a2984dc..b779c29142fd 100644
--- a/include/linux/backlight.h
+++ b/include/linux/backlight.h
@@ -14,26 +14,110 @@ 
 #include <linux/mutex.h>
 #include <linux/notifier.h>
 
+/**
+ * enum backlight_update_reason - what method was used to update backlight
+ *
+ * A driver indicates the method (reason) used for updating the backlight
+ * when calling backlight_force_update().
+ */
 enum backlight_update_reason {
+	/**
+	 * @BACKLIGHT_UPDATE_HOTKEY:
+	 *
+	 * The backlight was updated using a hot-key.
+	 */
 	BACKLIGHT_UPDATE_HOTKEY,
+
+	/**
+	 * @BACKLIGHT_UPDATE_SYSFS:
+	 *
+	 * The backlight was updated using sysfs.
+	 */
 	BACKLIGHT_UPDATE_SYSFS,
 };
 
+/**
+ * enum backlight_type - the type of backlight control
+ *
+ * The type of interface used to control the backlight.
+ */
 enum backlight_type {
+	/**
+	 * @BACKLIGHT_RAW:
+	 *
+	 * The backlight is controlled using hardware registers directly.
+	 */
 	BACKLIGHT_RAW = 1,
+
+	/**
+	 * @BACKLIGHT_PLATFORM:
+	 *
+	 * The backlight is controller using a platform-specific interface.
+	 */
 	BACKLIGHT_PLATFORM,
+
+	/**
+	 * @BACKLIGHT_FIRMWARE:
+	 *
+	 * The backlight is controlled using a standard firmware interface.
+	 */
 	BACKLIGHT_FIRMWARE,
+
+	/**
+	 * @BACKLIGHT_TYPE_MAX: Number of entries.
+	 */
 	BACKLIGHT_TYPE_MAX,
 };
 
+/**
+ * enum backlight_notification - the type of notification
+ *
+ * The notifications that is used for notification sent to the receiver
+ * that registered notifications using backlight_register_notifier().
+ */
 enum backlight_notification {
+	/**
+	 * @BACKLIGHT_REGISTERED:
+	 *
+	 * The backlight device is registered.
+	 */
 	BACKLIGHT_REGISTERED,
+
+	/**
+	 * @BACKLIGHT_UNREGISTERED:
+	 *
+	 * The backlight revice is unregistered.
+	 */
 	BACKLIGHT_UNREGISTERED,
 };
 
+/** enum backlight_scale - the type of scale used for brightness values
+ *
+ * The type of scale used for brightness values.
+ */
 enum backlight_scale {
+	/**
+	 * @BACKLIGHT_SCALE_UNKNOWN:
+	 *
+	 * The scale is unknown.
+	 */
 	BACKLIGHT_SCALE_UNKNOWN = 0,
+
+	/**
+	 * @BACKLIGHT_SCALE_LINEAR:
+	 *
+	 * The scale is linear, so the brigness increase is the same
+	 * when increasing with the same steps (more or less).
+	 */
 	BACKLIGHT_SCALE_LINEAR,
+
+	/**
+	 * @BACKLIGHT_SCALE_NON_LINEAR:
+	 *
+	 * The scale is not linear. This is often used when the brightness
+	 * values tries to adjust to the relative perception of the eye
+	 * demanding a non-linear scale.
+	 */
 	BACKLIGHT_SCALE_NON_LINEAR,
 };