From patchwork Mon Jun 24 15:19:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709720 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 0B542C3064D for ; Mon, 24 Jun 2024 15:20:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6008610E4B2; Mon, 24 Jun 2024 15:20:40 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE4C410E4B5 for ; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E03CD219CB; Mon, 24 Jun 2024 15:20:37 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 8F25013ACD; Mon, 24 Jun 2024 15:20:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id aBmjIcWOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:37 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 01/17] backlight: Add BACKLIGHT_POWER_ constants for power states Date: Mon, 24 Jun 2024 17:19:56 +0200 Message-ID: <20240624152033.25016-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: E03CD219CB X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Duplicate FB_BLANK_ constants as BACKLIGHT_POWER__ constants in the backlight header file. Allows backlight drivers to avoid including the fbdev header file and removes a compile-time dependency between the two subsystems. The new BACKLIGHT_POWER_ constants have the same values as their FB_BLANK_ counterparts. Hence UAPI and internal semantics do not change. The backlight drivers can be converted one by one. Each instance of FB_BLANK_UNBLANK becomes BACKLIGHT_POWER_ON, each of FB_BLANK_POWERDOWN becomes BACKLIGHT_POWER_OFF, and FB_BLANK_NORMAL becomes BACKLIGHT_POWER_REDUCED. Backlight code or drivers do not use FB_BLANK_VSYNC_SUSPEND and FB_BLANK_HSYNC_SUSPEND, so no new constants for these are being added. The semantics of FB_BLANK_NORMAL appear inconsistent. In fbdev, NORMAL means display off with sync enabled. In backlight code, this translates to turn the backlight off, but some drivers interpret it as backlight on. So we keep the current code as is, but mark BACKLIGHT_POWER_REDUCED as deprecated. Drivers should be fixed and the constant removed. This affects ams369fg06 and a few DRM panel drivers. v2: - rename BL_CORE_ power constants to BACKLIGHT_POWER_ (Sam) - fix documentation Signed-off-by: Thomas Zimmermann --- .../ABI/stable/sysfs-class-backlight | 7 ++++--- include/linux/backlight.h | 20 +++++++++++-------- 2 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Documentation/ABI/stable/sysfs-class-backlight b/Documentation/ABI/stable/sysfs-class-backlight index 023fb52645f8..6102d6bebdf9 100644 --- a/Documentation/ABI/stable/sysfs-class-backlight +++ b/Documentation/ABI/stable/sysfs-class-backlight @@ -3,10 +3,11 @@ Date: April 2005 KernelVersion: 2.6.12 Contact: Richard Purdie Description: - Control BACKLIGHT power, values are FB_BLANK_* from fb.h + Control BACKLIGHT power, values are compatible with + FB_BLANK_* from fb.h - - FB_BLANK_UNBLANK (0) : power on. - - FB_BLANK_POWERDOWN (4) : power off + - 0 (FB_BLANK_UNBLANK) : power on. + - 4 (FB_BLANK_POWERDOWN) : power off Users: HAL What: /sys/class/backlight//brightness diff --git a/include/linux/backlight.h b/include/linux/backlight.h index 19a1c0e22629..ea9c1bc8148e 100644 --- a/include/linux/backlight.h +++ b/include/linux/backlight.h @@ -209,15 +209,19 @@ struct backlight_properties { * attribute: /sys/class/backlight//bl_power * When the power property is updated update_status() is called. * - * The possible values are: (0: full on, 1 to 3: power saving - * modes; 4: full off), see FB_BLANK_XXX. + * The possible values are: (0: full on, 4: full off), see + * BACKLIGHT_POWER constants. * - * When the backlight device is enabled @power is set - * to FB_BLANK_UNBLANK. When the backlight device is disabled - * @power is set to FB_BLANK_POWERDOWN. + * When the backlight device is enabled, @power is set to + * BACKLIGHT_POWER_ON. When the backlight device is disabled, + * @power is set to BACKLIGHT_POWER_OFF. */ int power; +#define BACKLIGHT_POWER_ON (0) +#define BACKLIGHT_POWER_OFF (4) +#define BACKLIGHT_POWER_REDUCED (1) // deprecated; don't use in new code + /** * @type: The type of backlight supported. * @@ -346,7 +350,7 @@ static inline int backlight_enable(struct backlight_device *bd) if (!bd) return 0; - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; bd->props.state &= ~BL_CORE_FBBLANK; return backlight_update_status(bd); @@ -361,7 +365,7 @@ static inline int backlight_disable(struct backlight_device *bd) if (!bd) return 0; - bd->props.power = FB_BLANK_POWERDOWN; + bd->props.power = BACKLIGHT_POWER_OFF; bd->props.state |= BL_CORE_FBBLANK; return backlight_update_status(bd); @@ -380,7 +384,7 @@ static inline int backlight_disable(struct backlight_device *bd) */ static inline bool backlight_is_blank(const struct backlight_device *bd) { - return bd->props.power != FB_BLANK_UNBLANK || + return bd->props.power != BACKLIGHT_POWER_ON || bd->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK); } From patchwork Mon Jun 24 15:19:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709722 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 5FE0AC2BD09 for ; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1FAA210E4B5; Mon, 24 Jun 2024 15:20:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="sZi0uDeC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="smhwEg7Y"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sZi0uDeC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="smhwEg7Y"; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id D367810E4B6 for ; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4038021A9D; Mon, 24 Jun 2024 15:20:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242438; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mqREaBwcoZ+coU5cHhkCtUFqc6BawunkmVoO2ASgRkY=; b=sZi0uDeCKki6gUkIcChC6U1fsbwal0asXBN/t5mxgdiqTNEiLxG9YkiVyh4GeeOxdfzslg ax6IimIndkUkPMsLbMMZDBDQ9Zcw8SVviNpGIEMhMCKiHJfr4QWwVBaaP4ylU9Dug8ePnz QXpr6vCHJv1gBDWs+69pNh9yTqro9oo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242438; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mqREaBwcoZ+coU5cHhkCtUFqc6BawunkmVoO2ASgRkY=; b=smhwEg7YbHZM5lH6PvltLQKNGRwQUefyE0z+jkC17oIcneusfTmHDjLmglJlaQuqwUW8+B xqGdw2/Nr7ryiMCw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242438; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mqREaBwcoZ+coU5cHhkCtUFqc6BawunkmVoO2ASgRkY=; b=sZi0uDeCKki6gUkIcChC6U1fsbwal0asXBN/t5mxgdiqTNEiLxG9YkiVyh4GeeOxdfzslg ax6IimIndkUkPMsLbMMZDBDQ9Zcw8SVviNpGIEMhMCKiHJfr4QWwVBaaP4ylU9Dug8ePnz QXpr6vCHJv1gBDWs+69pNh9yTqro9oo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242438; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mqREaBwcoZ+coU5cHhkCtUFqc6BawunkmVoO2ASgRkY=; b=smhwEg7YbHZM5lH6PvltLQKNGRwQUefyE0z+jkC17oIcneusfTmHDjLmglJlaQuqwUW8+B xqGdw2/Nr7ryiMCw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id E68D513AA4; Mon, 24 Jun 2024 15:20:37 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id wIP9NsWOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:37 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 02/17] backlight: aat2870-backlight: Use blacklight power constants Date: Mon, 24 Jun 2024 17:19:57 +0200 Message-ID: <20240624152033.25016-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/aat2870_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/aat2870_bl.c b/drivers/video/backlight/aat2870_bl.c index b4c3354a1a8a..68d327ee4b2e 100644 --- a/drivers/video/backlight/aat2870_bl.c +++ b/drivers/video/backlight/aat2870_bl.c @@ -156,7 +156,7 @@ static int aat2870_bl_probe(struct platform_device *pdev) bd->props.max_brightness = 255; aat2870_bl->brightness = 0; - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; bd->props.brightness = bd->props.max_brightness; ret = aat2870_bl_update_status(bd); @@ -176,7 +176,7 @@ static void aat2870_bl_remove(struct platform_device *pdev) struct aat2870_bl_driver_data *aat2870_bl = platform_get_drvdata(pdev); struct backlight_device *bd = aat2870_bl->bd; - bd->props.power = FB_BLANK_POWERDOWN; + bd->props.power = BACKLIGHT_POWER_OFF; bd->props.brightness = 0; backlight_update_status(bd); } From patchwork Mon Jun 24 15:19:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709724 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 364D7C3064D for ; Mon, 24 Jun 2024 15:20:54 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4974A10E4B7; Mon, 24 Jun 2024 15:20:53 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id DA37010E4B7 for ; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 990DA21A62; Mon, 24 Jun 2024 15:20:38 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 4744E13ACD; Mon, 24 Jun 2024 15:20:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id uLgVEMaOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:38 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 03/17] backlight: ams369fb06: Use backlight power constants Date: Mon, 24 Jun 2024 17:19:58 +0200 Message-ID: <20240624152033.25016-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 990DA21A62 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/ams369fg06.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c index 57ec205d2bd2..f8442689ac43 100644 --- a/drivers/video/backlight/ams369fg06.c +++ b/drivers/video/backlight/ams369fg06.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -300,7 +299,7 @@ static int ams369fg06_ldi_disable(struct ams369fg06 *lcd) static int ams369fg06_power_is_on(int power) { - return power <= FB_BLANK_NORMAL; + return power <= BACKLIGHT_POWER_REDUCED; } static int ams369fg06_power_on(struct ams369fg06 *lcd) @@ -396,8 +395,8 @@ static int ams369fg06_set_power(struct lcd_device *ld, int power) { struct ams369fg06 *lcd = lcd_get_data(ld); - if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN && - power != FB_BLANK_NORMAL) { + if (power != BACKLIGHT_POWER_ON && power != BACKLIGHT_POWER_OFF && + power != BACKLIGHT_POWER_REDUCED) { dev_err(lcd->dev, "power value should be 0, 1 or 4.\n"); return -EINVAL; } @@ -492,11 +491,11 @@ static int ams369fg06_probe(struct spi_device *spi) * current lcd status is powerdown and then * it enables lcd panel. */ - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = BACKLIGHT_POWER_OFF; - ams369fg06_power(lcd, FB_BLANK_UNBLANK); + ams369fg06_power(lcd, BACKLIGHT_POWER_ON); } else { - lcd->power = FB_BLANK_UNBLANK; + lcd->power = BACKLIGHT_POWER_ON; } spi_set_drvdata(spi, lcd); @@ -510,7 +509,7 @@ static void ams369fg06_remove(struct spi_device *spi) { struct ams369fg06 *lcd = spi_get_drvdata(spi); - ams369fg06_power(lcd, FB_BLANK_POWERDOWN); + ams369fg06_power(lcd, BACKLIGHT_POWER_OFF); } #ifdef CONFIG_PM_SLEEP @@ -524,16 +523,16 @@ static int ams369fg06_suspend(struct device *dev) * when lcd panel is suspend, lcd panel becomes off * regardless of status. */ - return ams369fg06_power(lcd, FB_BLANK_POWERDOWN); + return ams369fg06_power(lcd, BACKLIGHT_POWER_OFF); } static int ams369fg06_resume(struct device *dev) { struct ams369fg06 *lcd = dev_get_drvdata(dev); - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = BACKLIGHT_POWER_OFF; - return ams369fg06_power(lcd, FB_BLANK_UNBLANK); + return ams369fg06_power(lcd, BACKLIGHT_POWER_ON); } #endif @@ -544,7 +543,7 @@ static void ams369fg06_shutdown(struct spi_device *spi) { struct ams369fg06 *lcd = spi_get_drvdata(spi); - ams369fg06_power(lcd, FB_BLANK_POWERDOWN); + ams369fg06_power(lcd, BACKLIGHT_POWER_OFF); } static struct spi_driver ams369fg06_driver = { From patchwork Mon Jun 24 15:19:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709729 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B2585C3064D for ; Mon, 24 Jun 2024 15:21:01 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 070BB10E4C2; Mon, 24 Jun 2024 15:20:55 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 857FB10E4B3 for ; Mon, 24 Jun 2024 15:20:40 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 296C721AA2; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A06F113AA4; Mon, 24 Jun 2024 15:20:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id QBfEJcaOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:38 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 04/17] backlight: corgi-lcd: Use backlight power constants Date: Mon, 24 Jun 2024 17:19:59 +0200 Message-ID: <20240624152033.25016-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 296C721AA2 X-Rspamd-Action: no action X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Only change the driver's backlight device, but leave the LCD device as-is. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/corgi_lcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index aad1680c9075..e4fcfbe38dc6 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c @@ -526,7 +526,7 @@ static int corgi_lcd_probe(struct spi_device *spi) return PTR_ERR(lcd->bl_dev); lcd->bl_dev->props.brightness = pdata->default_intensity; - lcd->bl_dev->props.power = FB_BLANK_UNBLANK; + lcd->bl_dev->props.power = BACKLIGHT_POWER_ON; ret = setup_gpio_backlight(lcd, pdata); if (ret) @@ -547,7 +547,7 @@ static void corgi_lcd_remove(struct spi_device *spi) { struct corgi_lcd *lcd = spi_get_drvdata(spi); - lcd->bl_dev->props.power = FB_BLANK_UNBLANK; + lcd->bl_dev->props.power = BACKLIGHT_POWER_ON; lcd->bl_dev->props.brightness = 0; backlight_update_status(lcd->bl_dev); corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN); From patchwork Mon Jun 24 15:20:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709732 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 43DE4C30659 for ; Mon, 24 Jun 2024 15:21:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C385010E4C6; Mon, 24 Jun 2024 15:20:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="OomKApW1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="GBY3ZMKh"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="OomKApW1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="GBY3ZMKh"; dkim-atps=neutral Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3D59510E4B6 for ; Mon, 24 Jun 2024 15:20:41 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BED891F833; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242439; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FWQ9rEI80QCBFf/qKWxScFU6ulM0RLJFEWtPXOxovD0=; b=OomKApW1JPIngJ6sn9C9lnB9m2MLzbchXlQVV0Oqb4HEwZZaPi22ldl7LycX53bsJahMPF xWGi9RWtnzcSBSP2ujzs2E25u9wEm5J46p5Cf2/4Mjnswk9FmcmTClfTkSaWVF6BTAogkp rXA00YKUTRGBx5cwKtIpeOBEhVomecg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242439; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FWQ9rEI80QCBFf/qKWxScFU6ulM0RLJFEWtPXOxovD0=; b=GBY3ZMKhEttjiesYWZ5thJoNMSuzn7iU12EIdtO8GcGuVadN299UJeTYX7oYPE6akTjTrY BAcHtBwL5Kf+LuCQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242439; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FWQ9rEI80QCBFf/qKWxScFU6ulM0RLJFEWtPXOxovD0=; b=OomKApW1JPIngJ6sn9C9lnB9m2MLzbchXlQVV0Oqb4HEwZZaPi22ldl7LycX53bsJahMPF xWGi9RWtnzcSBSP2ujzs2E25u9wEm5J46p5Cf2/4Mjnswk9FmcmTClfTkSaWVF6BTAogkp rXA00YKUTRGBx5cwKtIpeOBEhVomecg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242439; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FWQ9rEI80QCBFf/qKWxScFU6ulM0RLJFEWtPXOxovD0=; b=GBY3ZMKhEttjiesYWZ5thJoNMSuzn7iU12EIdtO8GcGuVadN299UJeTYX7oYPE6akTjTrY BAcHtBwL5Kf+LuCQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 3D97213AA4; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WJfBDceOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:39 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 05/17] backlight: gpio-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:00 +0200 Message-ID: <20240624152033.25016-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RLbaz54pzrc9psah3tsaj8ddaq)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij --- drivers/video/backlight/gpio_backlight.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/video/backlight/gpio_backlight.c b/drivers/video/backlight/gpio_backlight.c index 4476c317ce29..728a546904b0 100644 --- a/drivers/video/backlight/gpio_backlight.c +++ b/drivers/video/backlight/gpio_backlight.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -81,12 +80,12 @@ static int gpio_backlight_probe(struct platform_device *pdev) /* Set the initial power state */ if (!of_node || !of_node->phandle) /* Not booted with device tree or no phandle link to the node */ - bl->props.power = def_value ? FB_BLANK_UNBLANK - : FB_BLANK_POWERDOWN; + bl->props.power = def_value ? BACKLIGHT_POWER_ON + : BACKLIGHT_POWER_OFF; else if (gpiod_get_value_cansleep(gbl->gpiod) == 0) - bl->props.power = FB_BLANK_POWERDOWN; + bl->props.power = BACKLIGHT_POWER_OFF; else - bl->props.power = FB_BLANK_UNBLANK; + bl->props.power = BACKLIGHT_POWER_ON; bl->props.brightness = 1; From patchwork Mon Jun 24 15:20:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709735 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 34A14C30659 for ; Mon, 24 Jun 2024 15:21:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1A34810E4C9; Mon, 24 Jun 2024 15:20:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="cOrVLEWU"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Znvd7wIn"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cOrVLEWU"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Znvd7wIn"; dkim-atps=neutral Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0F55810E4B7 for ; Mon, 24 Jun 2024 15:20:42 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A0CD41F83A; Mon, 24 Jun 2024 15:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242440; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0tQArUGUeDj7B2Nt0MW902STX9GUrSoE6NAFt0eeQMg=; b=cOrVLEWUdQ7iUFXqBLQGD3Aj+kGUdEj/RHIEo/zSwG5UtEXpwaQDc+sZtgWw/9ju8TqTW4 k1TAE7uVwxanCSSMNBSPhJF+uxVUCcPsDejkoGdQeVGje0uyuuzLBdv6AEM242hZBaPunL xt7wdAxejRBrmj+A2Rfv1S5RLScb/tE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242440; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0tQArUGUeDj7B2Nt0MW902STX9GUrSoE6NAFt0eeQMg=; b=Znvd7wIn0paxtd7VEQr0Y3F3fgL/gnzDJHpZEvq+YTpSCfitvA2Bs7Y8i78IRgwcu0XSRt NpJHpIgQFG73IUAQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242440; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0tQArUGUeDj7B2Nt0MW902STX9GUrSoE6NAFt0eeQMg=; b=cOrVLEWUdQ7iUFXqBLQGD3Aj+kGUdEj/RHIEo/zSwG5UtEXpwaQDc+sZtgWw/9ju8TqTW4 k1TAE7uVwxanCSSMNBSPhJF+uxVUCcPsDejkoGdQeVGje0uyuuzLBdv6AEM242hZBaPunL xt7wdAxejRBrmj+A2Rfv1S5RLScb/tE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242440; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0tQArUGUeDj7B2Nt0MW902STX9GUrSoE6NAFt0eeQMg=; b=Znvd7wIn0paxtd7VEQr0Y3F3fgL/gnzDJHpZEvq+YTpSCfitvA2Bs7Y8i78IRgwcu0XSRt NpJHpIgQFG73IUAQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id D2CDA13ACD; Mon, 24 Jun 2024 15:20:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id yOwsMseOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:39 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 06/17] backlight: ipaq-micro-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:01 +0200 Message-ID: <20240624152033.25016-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RLbaz54pzrc9psah3tsaj8ddaq)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann Reviewed-by: Linus Walleij --- drivers/video/backlight/ipaq_micro_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/ipaq_micro_bl.c b/drivers/video/backlight/ipaq_micro_bl.c index f595b8c8cbb2..19ff66e444bc 100644 --- a/drivers/video/backlight/ipaq_micro_bl.c +++ b/drivers/video/backlight/ipaq_micro_bl.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -42,7 +41,7 @@ static const struct backlight_ops micro_bl_ops = { static const struct backlight_properties micro_bl_props = { .type = BACKLIGHT_RAW, .max_brightness = 255, - .power = FB_BLANK_UNBLANK, + .power = BACKLIGHT_POWER_ON, .brightness = 64, }; From patchwork Mon Jun 24 15:20:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709727 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id EDA11C2BD09 for ; Mon, 24 Jun 2024 15:20:58 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C79B110E4BE; Mon, 24 Jun 2024 15:20:53 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id A289710E4B7 for ; Mon, 24 Jun 2024 15:20:42 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 781A71F839; Mon, 24 Jun 2024 15:20:41 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id A6A9613AA4; Mon, 24 Jun 2024 15:20:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id KGdYJ8iOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:40 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 07/17] backlight: journada_bl: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:02 +0200 Message-ID: <20240624152033.25016-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 781A71F839 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/jornada720_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/jornada720_bl.c b/drivers/video/backlight/jornada720_bl.c index 066d0dc98f60..e28d2c071798 100644 --- a/drivers/video/backlight/jornada720_bl.c +++ b/drivers/video/backlight/jornada720_bl.c @@ -7,7 +7,6 @@ #include #include -#include #include #include #include @@ -121,7 +120,7 @@ static int jornada_bl_probe(struct platform_device *pdev) return ret; } - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; bd->props.brightness = BL_DEF_BRIGHT; /* * note. make sure max brightness is set otherwise From patchwork Mon Jun 24 15:20:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709736 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 294D4C2BD09 for ; Mon, 24 Jun 2024 15:21:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B4E7110E4CC; Mon, 24 Jun 2024 15:21:00 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id E5A0C10E4B8 for ; Mon, 24 Jun 2024 15:20:43 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 9289A21A6C; Mon, 24 Jun 2024 15:20:42 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 7DD3F13ACD; Mon, 24 Jun 2024 15:20:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id qPRyHcmOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:41 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 08/17] backlight: kb3886-bl: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:03 +0200 Message-ID: <20240624152033.25016-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 9289A21A6C X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/kb3886_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/kb3886_bl.c b/drivers/video/backlight/kb3886_bl.c index 55794b239cff..050b5c21f4a8 100644 --- a/drivers/video/backlight/kb3886_bl.c +++ b/drivers/video/backlight/kb3886_bl.c @@ -10,9 +10,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -151,7 +151,7 @@ static int kb3886bl_probe(struct platform_device *pdev) platform_set_drvdata(pdev, kb3886_backlight_device); - kb3886_backlight_device->props.power = FB_BLANK_UNBLANK; + kb3886_backlight_device->props.power = BACKLIGHT_POWER_ON; kb3886_backlight_device->props.brightness = machinfo->default_intensity; backlight_update_status(kb3886_backlight_device); From patchwork Mon Jun 24 15:20:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709730 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 1524CC2D0D1 for ; Mon, 24 Jun 2024 15:21:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0F42A10E4C3; Mon, 24 Jun 2024 15:20:55 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="r0xVBbBf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="tStuB+gL"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="r0xVBbBf"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="tStuB+gL"; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id C3B1010E4B8 for ; Mon, 24 Jun 2024 15:20:44 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 82D232198F; Mon, 24 Jun 2024 15:20:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242443; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eW33RKsOzPElPDu8ypGq45XLJtPeU8TrSkFM1are/1Y=; b=r0xVBbBfKrnXGNpMcO9pbVdEhGWB5+JTj2xR0EfIhymzAvvRJn3dvf92d/vnu9dEfCz2q0 ZHhv0PDJLNPoImuAwUzmxc8SpXlOorfM6kGkKpOgNx2JwlhgV9nC+mcNfKmJF/KI7Gzcff RYu4mhazKEcDarr28xfadX85EzdKv+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242443; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eW33RKsOzPElPDu8ypGq45XLJtPeU8TrSkFM1are/1Y=; b=tStuB+gLXnfR6q02wrI0GEZJv9jewWctg1ETr0MyheXJ8T9Rj3eJXLjpuR02lUROjOvJQm RLnXiLsxRf20baDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242443; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eW33RKsOzPElPDu8ypGq45XLJtPeU8TrSkFM1are/1Y=; b=r0xVBbBfKrnXGNpMcO9pbVdEhGWB5+JTj2xR0EfIhymzAvvRJn3dvf92d/vnu9dEfCz2q0 ZHhv0PDJLNPoImuAwUzmxc8SpXlOorfM6kGkKpOgNx2JwlhgV9nC+mcNfKmJF/KI7Gzcff RYu4mhazKEcDarr28xfadX85EzdKv+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242443; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eW33RKsOzPElPDu8ypGq45XLJtPeU8TrSkFM1are/1Y=; b=tStuB+gLXnfR6q02wrI0GEZJv9jewWctg1ETr0MyheXJ8T9Rj3eJXLjpuR02lUROjOvJQm RLnXiLsxRf20baDw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id C0A6313AA4; Mon, 24 Jun 2024 15:20:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WHzBLcqOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:42 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 09/17] backlight: ktd253-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:04 +0200 Message-ID: <20240624152033.25016-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RLbaz54pzrc9psah3tsaj8ddaq)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/ktd253-backlight.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/backlight/ktd253-backlight.c b/drivers/video/backlight/ktd253-backlight.c index d7d43454f64a..327b4ee75254 100644 --- a/drivers/video/backlight/ktd253-backlight.c +++ b/drivers/video/backlight/ktd253-backlight.c @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include @@ -190,10 +189,10 @@ static int ktd253_backlight_probe(struct platform_device *pdev) /* When we just enable the GPIO line we set max brightness */ if (brightness) { bl->props.brightness = brightness; - bl->props.power = FB_BLANK_UNBLANK; + bl->props.power = BACKLIGHT_POWER_ON; } else { bl->props.brightness = 0; - bl->props.power = FB_BLANK_POWERDOWN; + bl->props.power = BACKLIGHT_POWER_OFF; } ktd253->bl = bl; From patchwork Mon Jun 24 15:20:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709723 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id B8107C2BD09 for ; Mon, 24 Jun 2024 15:20:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CEFDC10E4B6; Mon, 24 Jun 2024 15:20:52 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 74BAB10E4C2 for ; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 1DA60219D4; Mon, 24 Jun 2024 15:20:44 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9298F13ACD; Mon, 24 Jun 2024 15:20:43 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id MD5YIMuOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:43 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 10/17] backlight: led-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:05 +0200 Message-ID: <20240624152033.25016-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 1DA60219D4 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/led_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/led_bl.c b/drivers/video/backlight/led_bl.c index 032f8bddf872..c7aefcd6e4e3 100644 --- a/drivers/video/backlight/led_bl.c +++ b/drivers/video/backlight/led_bl.c @@ -200,8 +200,8 @@ static int led_bl_probe(struct platform_device *pdev) props.type = BACKLIGHT_RAW; props.max_brightness = priv->max_brightness; props.brightness = priv->default_brightness; - props.power = (priv->default_brightness > 0) ? FB_BLANK_POWERDOWN : - FB_BLANK_UNBLANK; + props.power = (priv->default_brightness > 0) ? BACKLIGHT_POWER_OFF : + BACKLIGHT_POWER_ON; priv->bl_dev = backlight_device_register(dev_name(&pdev->dev), &pdev->dev, priv, &led_bl_ops, &props); if (IS_ERR(priv->bl_dev)) { From patchwork Mon Jun 24 15:20:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709734 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 45505C2D0D1 for ; Mon, 24 Jun 2024 15:21:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id ED5B710E4C7; Mon, 24 Jun 2024 15:20:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="HOrfX2By"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2AgYmPt5"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="HOrfX2By"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2AgYmPt5"; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id E626D10E4BB for ; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A448E21AC2; Mon, 24 Jun 2024 15:20:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242444; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eG9Arpf6LMy9QXcypvzf0GeWM8+A5ZTWVogpaAkn96Y=; b=HOrfX2ByP+PSf+KgmkvBZu71ZgCEjN6533VjraojTjUCMCin1RQjmUUJ00U/HwKK0wW0UZ v6nIK30CU3t3RKWpni2L3nL2uBmkNLqGNDKelQ+9iwwxX7RZvT+R4g5yXsF6/3mvYmJClK kTp3ZXxAaIUMeojcGMYAzEmj7p5qLqI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242444; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eG9Arpf6LMy9QXcypvzf0GeWM8+A5ZTWVogpaAkn96Y=; b=2AgYmPt5bCmZOwDdGUIYD0FPWO1t0ySVReChcQfiX1iNOE/QNmbgv7XRiEjVyYCqskyZsv CjRhbUm1tJfwtfCA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242444; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eG9Arpf6LMy9QXcypvzf0GeWM8+A5ZTWVogpaAkn96Y=; b=HOrfX2ByP+PSf+KgmkvBZu71ZgCEjN6533VjraojTjUCMCin1RQjmUUJ00U/HwKK0wW0UZ v6nIK30CU3t3RKWpni2L3nL2uBmkNLqGNDKelQ+9iwwxX7RZvT+R4g5yXsF6/3mvYmJClK kTp3ZXxAaIUMeojcGMYAzEmj7p5qLqI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242444; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eG9Arpf6LMy9QXcypvzf0GeWM8+A5ZTWVogpaAkn96Y=; b=2AgYmPt5bCmZOwDdGUIYD0FPWO1t0ySVReChcQfiX1iNOE/QNmbgv7XRiEjVyYCqskyZsv CjRhbUm1tJfwtfCA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 2AF5913AA4; Mon, 24 Jun 2024 15:20:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id EP7BB8yOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:44 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 11/17] backlight: lm3533-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:06 +0200 Message-ID: <20240624152033.25016-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,imap1.dmz-prg2.suse.org:helo]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RLbaz54pzrc9psah3tsaj8ddaq)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lm3533_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/lm3533_bl.c b/drivers/video/backlight/lm3533_bl.c index 3e10d480cb7f..5d06f8ca976c 100644 --- a/drivers/video/backlight/lm3533_bl.c +++ b/drivers/video/backlight/lm3533_bl.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include @@ -344,7 +343,7 @@ static void lm3533_bl_remove(struct platform_device *pdev) dev_dbg(&bd->dev, "%s\n", __func__); - bd->props.power = FB_BLANK_POWERDOWN; + bd->props.power = BACKLIGHT_POWER_OFF; bd->props.brightness = 0; lm3533_ctrlbank_disable(&bl->cb); From patchwork Mon Jun 24 15:20:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709731 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 2E31DC3065A for ; Mon, 24 Jun 2024 15:21:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AE52910E4C5; Mon, 24 Jun 2024 15:20:58 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id DE39910E4B6 for ; Mon, 24 Jun 2024 15:20:46 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4136E1F839; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id B496413ACD; Mon, 24 Jun 2024 15:20:44 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id UEHkKsyOeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:44 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 12/17] backlight: mp3309c: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:07 +0200 Message-ID: <20240624152033.25016-13-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 4136E1F839 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/mp3309c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/mp3309c.c b/drivers/video/backlight/mp3309c.c index a28036c964af..88bc296968e9 100644 --- a/drivers/video/backlight/mp3309c.c +++ b/drivers/video/backlight/mp3309c.c @@ -358,7 +358,7 @@ static int mp3309c_probe(struct i2c_client *client) props.max_brightness = pdata->max_brightness; props.scale = BACKLIGHT_SCALE_LINEAR; props.type = BACKLIGHT_RAW; - props.power = FB_BLANK_UNBLANK; + props.power = BACKLIGHT_POWER_ON; chip->bl = devm_backlight_device_register(dev, "mp3309c", dev, chip, &mp3309c_bl_ops, &props); if (IS_ERR(chip->bl)) @@ -388,7 +388,7 @@ static void mp3309c_remove(struct i2c_client *client) struct mp3309c_chip *chip = i2c_get_clientdata(client); struct backlight_device *bl = chip->bl; - bl->props.power = FB_BLANK_POWERDOWN; + bl->props.power = BACKLIGHT_POWER_OFF; bl->props.brightness = 0; backlight_update_status(chip->bl); } From patchwork Mon Jun 24 15:20:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709726 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 91F02C3064D for ; Mon, 24 Jun 2024 15:20:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96A0910E4BB; Mon, 24 Jun 2024 15:20:53 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 152E810E4B8 for ; Mon, 24 Jun 2024 15:20:47 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9F2631F830; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 47A7113AA4; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id cCdEEM2OeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:45 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 13/17] backlight: pandora-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:08 +0200 Message-ID: <20240624152033.25016-14-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: 9F2631F830 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/pandora_bl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/pandora_bl.c b/drivers/video/backlight/pandora_bl.c index 51faa889e01f..8a63ded0fa90 100644 --- a/drivers/video/backlight/pandora_bl.c +++ b/drivers/video/backlight/pandora_bl.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -43,7 +42,7 @@ static int pandora_backlight_update_status(struct backlight_device *bl) struct pandora_private *priv = bl_get_data(bl); u8 r; - if (bl->props.power != FB_BLANK_UNBLANK) + if (bl->props.power != BACKLIGHT_POWER_ON) brightness = 0; if (bl->props.state & BL_CORE_FBBLANK) brightness = 0; From patchwork Mon Jun 24 15:20:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709733 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 43E66C2BD09 for ; Mon, 24 Jun 2024 15:21:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02F5810E4C8; Mon, 24 Jun 2024 15:20:59 +0000 (UTC) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3394B10E4BE for ; Mon, 24 Jun 2024 15:20:47 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id ED60021ABE; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Authentication-Results: smtp-out1.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 9B1C213ACD; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 2OicJM2OeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:45 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 14/17] backlight: pcf50633-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:09 +0200 Message-ID: <20240624152033.25016-15-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Queue-Id: ED60021ABE X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Action: no action 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/pcf50633-backlight.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/video/backlight/pcf50633-backlight.c b/drivers/video/backlight/pcf50633-backlight.c index 540dd3380c81..157be2f366df 100644 --- a/drivers/video/backlight/pcf50633-backlight.c +++ b/drivers/video/backlight/pcf50633-backlight.c @@ -10,7 +10,6 @@ #include #include -#include #include #include @@ -53,7 +52,7 @@ static int pcf50633_bl_update_status(struct backlight_device *bl) if (bl->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK) || - bl->props.power != FB_BLANK_UNBLANK) + bl->props.power != BACKLIGHT_POWER_ON) new_brightness = 0; else if (bl->props.brightness < pcf_bl->brightness_limit) new_brightness = bl->props.brightness; @@ -106,7 +105,7 @@ static int pcf50633_bl_probe(struct platform_device *pdev) memset(&bl_props, 0, sizeof(bl_props)); bl_props.type = BACKLIGHT_RAW; bl_props.max_brightness = 0x3f; - bl_props.power = FB_BLANK_UNBLANK; + bl_props.power = BACKLIGHT_POWER_ON; if (pdata) { bl_props.brightness = pdata->default_brightness; From patchwork Mon Jun 24 15:20:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709725 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 474ADC2BD09 for ; Mon, 24 Jun 2024 15:20:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FAC410E4B8; Mon, 24 Jun 2024 15:20:53 +0000 (UTC) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7E56C10E4B6 for ; Mon, 24 Jun 2024 15:20:47 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 4F20D1F83C; Mon, 24 Jun 2024 15:20:46 +0000 (UTC) Authentication-Results: smtp-out2.suse.de; none Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F3BB313AA4; Mon, 24 Jun 2024 15:20:45 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0B1BOs2OeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:45 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 15/17] backlight: pwm-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:10 +0200 Message-ID: <20240624152033.25016-16-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Rspamd-Queue-Id: 4F20D1F83C X-Rspamd-Action: no action X-Spamd-Result: default: False [-4.00 / 50.00]; REPLY(-4.00)[] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/pwm_bl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 61d30bc98eea..e942908d1275 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c @@ -426,7 +426,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb) /* Not booted with device tree or no phandle link to the node */ if (!node || !node->phandle) - return FB_BLANK_UNBLANK; + return BACKLIGHT_POWER_ON; /* * If the driver is probed from the device tree and there is a @@ -434,7 +434,7 @@ static int pwm_backlight_initial_power_state(const struct pwm_bl_data *pb) * assume that another driver will enable the backlight at the * appropriate time. Therefore, if it is disabled, keep it so. */ - return active ? FB_BLANK_UNBLANK: FB_BLANK_POWERDOWN; + return active ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; } static int pwm_backlight_probe(struct platform_device *pdev) From patchwork Mon Jun 24 15:20:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709728 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 4436DC2D0D1 for ; Mon, 24 Jun 2024 15:21:00 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A482210E4C0; Mon, 24 Jun 2024 15:20:54 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="uDmhL3nt"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="F2VI+eWt"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="uDmhL3nt"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="F2VI+eWt"; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 11D9D10E4B6 for ; Mon, 24 Jun 2024 15:20:48 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id A484B21B1B; Mon, 24 Jun 2024 15:20:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242446; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LNcezCLGx0lTTITreFTkr6GAEb2YAiiqoWZrEhOECZg=; b=uDmhL3ntGVWiHlTPMGVtIRZFVfZr5mDJkbZ5P2GP166mtdRgLR794LvAL6raa8l6dP794z eEcvG3Rgeth6SnlVtsZU9weSrSuh3vVd8IcfBAyNFTIKQV12RsVHv41omm8pnkDKV8gw8+ vrvXcqIkH/wfh0H6z3EUBaJFsNYDdlU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242446; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LNcezCLGx0lTTITreFTkr6GAEb2YAiiqoWZrEhOECZg=; b=F2VI+eWtQidQaPcy0PH4tEZV1+BhCU8IV7J9dLmEX1K5ZbaQ65aRl/7MadPRHRcFvXx9W1 ZFYsYOGC+YnFbWAg== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242446; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LNcezCLGx0lTTITreFTkr6GAEb2YAiiqoWZrEhOECZg=; b=uDmhL3ntGVWiHlTPMGVtIRZFVfZr5mDJkbZ5P2GP166mtdRgLR794LvAL6raa8l6dP794z eEcvG3Rgeth6SnlVtsZU9weSrSuh3vVd8IcfBAyNFTIKQV12RsVHv41omm8pnkDKV8gw8+ vrvXcqIkH/wfh0H6z3EUBaJFsNYDdlU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242446; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LNcezCLGx0lTTITreFTkr6GAEb2YAiiqoWZrEhOECZg=; b=F2VI+eWtQidQaPcy0PH4tEZV1+BhCU8IV7J9dLmEX1K5ZbaQ65aRl/7MadPRHRcFvXx9W1 ZFYsYOGC+YnFbWAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 5649013ACD; Mon, 24 Jun 2024 15:20:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id WDbCE86OeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:46 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 16/17] backlight: rave-sp-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:11 +0200 Message-ID: <20240624152033.25016-17-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RLbaz54pzrc9psah3tsaj8ddaq)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/rave-sp-backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/rave-sp-backlight.c b/drivers/video/backlight/rave-sp-backlight.c index 05b5f003a3d1..e708a060a6e4 100644 --- a/drivers/video/backlight/rave-sp-backlight.c +++ b/drivers/video/backlight/rave-sp-backlight.c @@ -19,7 +19,7 @@ static int rave_sp_backlight_update_status(struct backlight_device *bd) { const struct backlight_properties *p = &bd->props; const u8 intensity = - (p->power == FB_BLANK_UNBLANK) ? p->brightness : 0; + (p->power == BACKLIGHT_POWER_ON) ? p->brightness : 0; struct rave_sp *sp = dev_get_drvdata(&bd->dev); u8 cmd[] = { [0] = RAVE_SP_CMD_SET_BACKLIGHT, From patchwork Mon Jun 24 15:20:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13709737 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id A0EE2C2BD09 for ; Mon, 24 Jun 2024 15:21:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B1CE310E4CB; Mon, 24 Jun 2024 15:21:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.b="iX6YeF3X"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Eq3vzRa6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="iX6YeF3X"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Eq3vzRa6"; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7020D10E4B6 for ; Mon, 24 Jun 2024 15:20:48 +0000 (UTC) Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 0616A21AB4; Mon, 24 Jun 2024 15:20:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242447; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wEc5/T6q6gu4EuBZrlJYWrG3bGXxPSbfxMZQIpG9es=; b=iX6YeF3X3tCTkQxSW//aO+yOVyIlpOtQ0FZz77Lf2EDhVvvKkImla/qYRFNGgzm3ZEhmEi S9zhanQLDuc13uWXzsBSGz3o1jkmuG8154aL2bdErespPkMxo19XgtjXc2snMwXj4P3u/v xJ1Uu8BZQBrMocxmtQSeg3XDJj0J8G8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242447; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wEc5/T6q6gu4EuBZrlJYWrG3bGXxPSbfxMZQIpG9es=; b=Eq3vzRa6QoUGa/W4aVWvX0ZpClc//7AIdS2D8CpDvV6SG1OUO5ebTZ7ScqhSjxfNxTLGQj DAQpMMR5eFRWoACA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1719242447; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wEc5/T6q6gu4EuBZrlJYWrG3bGXxPSbfxMZQIpG9es=; b=iX6YeF3X3tCTkQxSW//aO+yOVyIlpOtQ0FZz77Lf2EDhVvvKkImla/qYRFNGgzm3ZEhmEi S9zhanQLDuc13uWXzsBSGz3o1jkmuG8154aL2bdErespPkMxo19XgtjXc2snMwXj4P3u/v xJ1Uu8BZQBrMocxmtQSeg3XDJj0J8G8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1719242447; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8wEc5/T6q6gu4EuBZrlJYWrG3bGXxPSbfxMZQIpG9es=; b=Eq3vzRa6QoUGa/W4aVWvX0ZpClc//7AIdS2D8CpDvV6SG1OUO5ebTZ7ScqhSjxfNxTLGQj DAQpMMR5eFRWoACA== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id AABBE13AA4; Mon, 24 Jun 2024 15:20:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id eNBhKM6OeWbqGgAAD6G6ig (envelope-from ); Mon, 24 Jun 2024 15:20:46 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, sam@ravnborg.org, jingoohan1@gmail.com, deller@gmx.de, linus.walleij@linaro.org, f.suligoi@asem.it, ukleinek@kernel.org Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-pwm@vger.kernel.org, Thomas Zimmermann Subject: [PATCH v2 17/17] backlight: sky81452-backlight: Use backlight power constants Date: Mon, 24 Jun 2024 17:20:12 +0200 Message-ID: <20240624152033.25016-18-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240624152033.25016-1-tzimmermann@suse.de> References: <20240624152033.25016-1-tzimmermann@suse.de> MIME-Version: 1.0 X-Spamd-Result: default: False [-6.80 / 50.00]; REPLY(-4.00)[]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email]; RCPT_COUNT_TWELVE(0.00)[12]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,ravnborg.org,gmail.com,gmx.de,asem.it]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RLbaz54pzrc9psah3tsaj8ddaq)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de] 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/sky81452-backlight.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/sky81452-backlight.c b/drivers/video/backlight/sky81452-backlight.c index 19f9f84a9fd6..935043b67786 100644 --- a/drivers/video/backlight/sky81452-backlight.c +++ b/drivers/video/backlight/sky81452-backlight.c @@ -315,7 +315,7 @@ static void sky81452_bl_remove(struct platform_device *pdev) sysfs_remove_group(&bd->dev.kobj, &sky81452_bl_attr_group); - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; bd->props.brightness = 0; backlight_update_status(bd);