From patchwork Mon Jun 1 06:52:01 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11581491 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 97DE0157C for ; Mon, 1 Jun 2020 06:52:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 764BF206E2 for ; Mon, 1 Jun 2020 06:52:38 +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="rbuMMtwa" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 764BF206E2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ravnborg.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 521B36E132; Mon, 1 Jun 2020 06:52:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7A5166E138 for ; Mon, 1 Jun 2020 06:52:33 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id o9so6757619ljj.6 for ; Sun, 31 May 2020 23:52:33 -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=NySSdlyQJkQGVkK1Cp0EHZZ6M2Ik0zG0av6w2Ego7I4=; b=rbuMMtwa32PlMgO3FLH9ovOTcW9dDxJqamtsGyz/yDGxwGhiZUOAictnebq5XGOUJa GYZvEoglN5aUz07Eb4Ee3r0Wm9PGmdbXlkyeB+jemEaWfvCvEH7w+t/werIAsAywDiZh KmYK99Ouzqz0FoNxuHqfn4P45jIzXf30SdpFboGDrjsHoYfaxCB8QP0+XD+OCivpqj9e akRwRzz7YLfe6sCinOxkIkYvq+HIEMUyDLTh6aFNitX7C2+2xVj9B2LLnkUJI0UksEnT NxBr+dxvmZYllzVKeglKLHrvkqRhYALq6R6Ni9HlDTtyBCtxtfb2UxmGSU2MA7XnbSif G5sg== 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=NySSdlyQJkQGVkK1Cp0EHZZ6M2Ik0zG0av6w2Ego7I4=; b=lt5pdkvhlT5GSjFFmGW4rUaXnQKzkEsQEtt6upwmMPv7LB6woKzsQE4SP1kOvBiZba hn4CIUPvz3in4SOFEnY5CzxYX+KQ7i3bk5QEYJdhW1I65iAiFULWGQLJ+IpidkNfvuTm +LAgxpLWYiD1MQOq2hUBAlio3wLqCqx6CiJMMoFxuLGqnhd4T03FQ47jvISQbhw/GCCV ALgpfhKVGxbMTetovqyo0XIySibmrXx3hBmcdvgjOmFVY/X8W6O81w5FDuecJGeTBbkn dUbo/t25aeKwewFfKwtrK0cs+TThiCgMxFdr0XPE7ZkLf8Rk0LdQeAbozsJ+9e+Yh0Ki YHDQ== X-Gm-Message-State: AOAM530gDwc2Imvl804LztpJtWfH+cPQ5Q+c1uBnUPmjYCFdhoi0V8HJ fpnzVmigfZfw0qO7pWWF6kKu0UP+w6o= X-Google-Smtp-Source: ABdhPJzFLoA3566dKX71K1Hk/avEwSPU2a8TFY6W34e11xmPVzkT9VeSoTjpuep92eETOAu24eniEA== X-Received: by 2002:a2e:82d0:: with SMTP id n16mr7862747ljh.6.1590994351618; Sun, 31 May 2020 23:52:31 -0700 (PDT) Received: from saturn.lan ([2a00:fd00:805f:db00:281d:a604:434c:a58d]) by smtp.gmail.com with ESMTPSA id e13sm2540462ljl.117.2020.05.31.23.52.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 May 2020 23:52:31 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Jingoo Han , Lee Jones , Daniel Thompson Subject: [PATCH v3 07/13] backlight: document enums in backlight.h Date: Mon, 1 Jun 2020 08:52:01 +0200 Message-Id: <20200601065207.492614-8-sam@ravnborg.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200601065207.492614-1-sam@ravnborg.org> References: <20200601065207.492614-1-sam@ravnborg.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Support Opensource , Michael Hennerich , Bartlomiej Zolnierkiewicz , David Airlie , Daniel Vetter , Tomi Valkeinen , Jonathan Corbet , Emil Velikov , Bjorn Andersson , Peter Ujfalusi , Andy Gross , Thierry Reding , Thomas Zimmermann , linux-arm-msm@vger.kernel.org, Uwe Kleine-Konig , Sam Ravnborg , patches@opensource.cirrus.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Cc: Lee Jones Cc: Daniel Thompson Cc: Jingoo Han --- include/linux/backlight.h | 74 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 73 insertions(+), 1 deletion(-) diff --git a/include/linux/backlight.h b/include/linux/backlight.h index f99ca19cc3ec..c1c7b1666a9b 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, }; @@ -149,7 +221,7 @@ struct backlight_properties { /** * @fb_blank: The power state from the FBIOBLANK ioclt. * - * When the FBIOBLANK ioctl is called fb_blank is set to the + * When the FBIOBLANK ioctl is called @fb_blank is set to the * blank parameter and the update_status() operation is called. * * When the backlight device is enabled @fb_blank is set