From patchwork Fri Jul 3 18:45:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11642645 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 064DF13BD for ; Fri, 3 Jul 2020 18:46:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E026B20870 for ; Fri, 3 Jul 2020 18:46:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oqlozcFW" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726258AbgGCSqT (ORCPT ); Fri, 3 Jul 2020 14:46:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbgGCSqT (ORCPT ); Fri, 3 Jul 2020 14:46:19 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6EBEC061794; Fri, 3 Jul 2020 11:46:18 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id k15so19011284lfc.4; Fri, 03 Jul 2020 11:46:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vYmiCB0MtpvvbRewOLH7Fp+n6izpRPTScgvaYJf2yds=; b=oqlozcFWehIysU86i5aW350PmfFrB7Ra6isNeLOds2GK3ZvMtIbcb8V7a6Nu9BAOfh HDZ5zc/BsZ2NkN+tQ+IcbtTiHEmghORPoE1t/GJBgr5Eec7J03qDdSVkjBR0QunAIrQW l6EC7yv12PfmCpcmAeB3G1UfNFSXmdciCV3w8f+9vHwtgu2ixi+O9fsYxLTbuIoDrWNM M+6oSKwMMWe1cKaWKMQRj3I6w5Fgs4lwkIuU9E2ggfKh6fNe1AXRL5dwJDbGvZTnkb4U j/NJWIG21fTGVtGrtPV0oy2vmvAh7TgF9MghMs8S54emllM+WBbis+OyhrFMK5hqMTkg +A5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=vYmiCB0MtpvvbRewOLH7Fp+n6izpRPTScgvaYJf2yds=; b=YUINsdrlxQh2DyRL/WKbEgExkXEuC6QQ6zLd74CBwtVVQomkKSCcJmrzK57seOx+YK DPZReHL9DGlBJNVBcGnTotckpgZI5SWWKQeJa17pw9hOBt2XSF6m5dyEyHOZLnmBj/w/ EWD3+lQe4JwZKdkuhwrwSWhExmesqzs7nUmwIeyknWuJ7HgsG6/dFLzYzijFQugCK2Am J9Dj3r/g3GPjSQ6CgLZmoGpzEgFLy9s7xQY9PNWp2E5sZ2ydfH7d44hIwKkyct3wqBqF Z7Xnx+rUyLCXQDxaAMMEL+YT5S6tiSU7ooAek5Xcw6sfMCvuKEZNlL7HB0rj/obNN3aY ekMA== X-Gm-Message-State: AOAM531cuGWCfVmbkkzqGLLT+YQ7NRPMmNXUbnB96j33BUnWp1ppi6kk hBr7AkzFc8Npcs2Glu4k0Fo= X-Google-Smtp-Source: ABdhPJzzse2Tcvz14qq7VJIffxIIsoOKapJx3DrpiEf2jHlq+xTMPZVqx19W0DYg0TKZm/6G4csY3g== X-Received: by 2002:a19:3f42:: with SMTP id m63mr22876684lfa.104.1593801977166; Fri, 03 Jul 2020 11:46:17 -0700 (PDT) Received: from saturn.lan ([2a00:fd00:805f:db00:4025:a614:1d5c:b7bc]) by smtp.gmail.com with ESMTPSA id h22sm4404224ljg.1.2020.07.03.11.46.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Jul 2020 11:46:16 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Jingoo Han , Lee Jones , Daniel Thompson Cc: Andy Gross , Bartlomiej Zolnierkiewicz , Bjorn Andersson , Daniel Vetter , David Airlie , Emil Velikov , Jonathan Corbet , linux-arm-msm@vger.kernel.org, linux-pwm@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Michael Hennerich , patches@opensource.cirrus.com, Support Opensource , Thierry Reding , Thomas Zimmermann , Uwe Kleine-Konig , Peter Ujfalusi , Tomi Valkeinen , Sam Ravnborg Subject: [PATCH v4 07/20] backlight: document enums in backlight.h Date: Fri, 3 Jul 2020 20:45:33 +0200 Message-Id: <20200703184546.144664-8-sam@ravnborg.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200703184546.144664-1-sam@ravnborg.org> References: <20200703184546.144664-1-sam@ravnborg.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add kernel-doc documentation for the backlight enums v2: - Add intro to each enum member (Daniel) Except backlight type as line lenght was too long. The generated HTML is the same. Signed-off-by: Sam Ravnborg Reviewed-by: Daniel Thompson Reviewed-by: Emil Velikov Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han --- include/linux/backlight.h | 72 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 7d6cb61e10f5..0f425b32e6be 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -14,26 +14,98 @@ #include #include +/** + * 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. + */ BACKLIGHT_RAW = 1, + + /** + * @BACKLIGHT_PLATFORM: + * + * The backlight is controlled 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. + * + * The linear scale will increase brightness the same for each step. + */ 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, };