From patchwork Wed Jul 31 12:50:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748769 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1B16B1AE871; Wed, 31 Jul 2024 12:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430351; cv=none; b=HAQnRPUtHfCmzGDO2pzt33/Moevb7OmEaNiKZvBkJyVQl+WhjWtsemWBNQiIp82RhLjIXQz/b20iylyUxM2lkOn1irb5QVsKUqr4A/yhzBI75ee9ji8Ga/k8++6BxbV0RemL4mYtNZsQtZVl5BTtR50erQJS21eesIEZHzM3jKc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430351; c=relaxed/simple; bh=DgbWxqmnBXEzBmqKi2gftEds/huIZ6OxoeUCH93UYNs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=saHxSM0EfZL2LPzTUn7e0yM377y1yLjM6ZbtkBQvATNiDtw1KvTOg7LYM2Fg/PwnRvtOLGfyKDlRt79vhwa+dxNQypIw8iAqN9lceoqzPswfvWzIuQsuMcmbWF4TlQ+A/r5XfOE/xkEaPaxJa51TKV5gdeEChmMFinFbP9bA4xE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cmVLZ+Y2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=XiAVsI5B; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=cmVLZ+Y2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=XiAVsI5B; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cmVLZ+Y2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XiAVsI5B"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="cmVLZ+Y2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="XiAVsI5B" 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 46EAF1F82F; Wed, 31 Jul 2024 12:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZiFvgYG/vl6QJ5OWWiFKDnv9Tc/EKs1VY/3kOXuUzDU=; b=cmVLZ+Y27uZQ0FyqE/pujUE3/7Tq3DAZ2GP9gIKYteb1YzXpkWzLJFhIwDhTrAcTJsRpZ4 XHtnlebGqa7IbWKfoiXp7g2xQp9yHJJA9g8LmPlvbM1FglV/E3fDL1UXfTw8BiHg1nNAA3 jAb5zHyRie7KJo416TUOW8Pu+yBqpGQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZiFvgYG/vl6QJ5OWWiFKDnv9Tc/EKs1VY/3kOXuUzDU=; b=XiAVsI5B4aIcnhJbVZ96nlyuYV2qVNseE7kqYJOHyPh/2hjivWufdke6lQjin0innD6VJU 64c7daeuQJBlF7CA== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZiFvgYG/vl6QJ5OWWiFKDnv9Tc/EKs1VY/3kOXuUzDU=; b=cmVLZ+Y27uZQ0FyqE/pujUE3/7Tq3DAZ2GP9gIKYteb1YzXpkWzLJFhIwDhTrAcTJsRpZ4 XHtnlebGqa7IbWKfoiXp7g2xQp9yHJJA9g8LmPlvbM1FglV/E3fDL1UXfTw8BiHg1nNAA3 jAb5zHyRie7KJo416TUOW8Pu+yBqpGQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ZiFvgYG/vl6QJ5OWWiFKDnv9Tc/EKs1VY/3kOXuUzDU=; b=XiAVsI5B4aIcnhJbVZ96nlyuYV2qVNseE7kqYJOHyPh/2hjivWufdke6lQjin0innD6VJU 64c7daeuQJBlF7CA== 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 09A9D13AD8; Wed, 31 Jul 2024 12:52:25 +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 ONgMAYkzqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:25 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , "Lee, Chun-Yi" Subject: [PATCH 01/10] platform/x86: acer-wmi: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:51 +0200 Message-ID: <20240731125220.1147348-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spamd-Result: default: False [-3.10 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email,intel.com:email,suse.de:email,imap1.dmz-prg2.suse.org:helo] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: -3.10 Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: "Lee, Chun-Yi" Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/acer-wmi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 38c932df6446..349169d050c5 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -16,7 +16,6 @@ #include #include #include -#include #include #include #include @@ -1685,7 +1684,7 @@ static int acer_backlight_init(struct device *dev) acer_backlight_device = bd; - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; bd->props.brightness = read_brightness(bd); backlight_update_status(bd); return 0; From patchwork Wed Jul 31 12:50:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748766 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0E0131EB36; Wed, 31 Jul 2024 12:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430349; cv=none; b=nKgIvDRUmV9EA9B2DSpR8LduI3RoBsZpjZtNaS7uci5c4MJsvMesp6GoTqUE1KFk9yiWiNHXjI1vBTxAfxBZa5OvdoR3srazr+EXCheebmxwL4CXmFikQVQ/P5Cy78NLOel0jMtwSpp+9eF48l6bV1ri2dxW0XqNZIH6DfHsNfo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430349; c=relaxed/simple; bh=PokQl5XPxaOIJBEsp/c0pT7ZRUdcsXb7+YUuEcyeCus=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=DEDM26I4Hf5WHmsyo5GNSdnTH8PuBNOwkktuaeDQv9ZYBy4c4QD0d58wyJRkmocGFXVlNdvUJcDzJ8u1GcETgMrB1ELOZObi7wAPwO0dOoeJrn7n2Jxu1KF9xRuZBZsngNKm5a1nuyfizMn3I9LCHqdKtqvamAwXA9Mop2FN+NU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=NUa06B68; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QZx7Jqj6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=NUa06B68; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=QZx7Jqj6; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="NUa06B68"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QZx7Jqj6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="NUa06B68"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="QZx7Jqj6" 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 7884921AA8; Wed, 31 Jul 2024 12:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8NW1bKh8Pj9QK8QeM3EWnuOi+JRgFVluEIBDWmCdhTE=; b=NUa06B68K+D9KxpqIjmNdP34DOBoDfc3B9cUtamSW8LBARPjOazJ/ngDAh7tRQNcUguA+b mv51be0FZZzDfMdB25xDBFsmYiqiB7bUOkjBw8txcMc9OReBPaeSPv6SFvALeXTnsbjIDA xK9g4rGYM3RDbjV0CYLDGLzbXt/fAng= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8NW1bKh8Pj9QK8QeM3EWnuOi+JRgFVluEIBDWmCdhTE=; b=QZx7Jqj6NyWtT2Bvj6TgbRa2sXF1uWT33Vbnme3AFWY0V1/07FHMBZtVpkpG9ZTBuVFxDV IloFOpDUd2KYStBA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8NW1bKh8Pj9QK8QeM3EWnuOi+JRgFVluEIBDWmCdhTE=; b=NUa06B68K+D9KxpqIjmNdP34DOBoDfc3B9cUtamSW8LBARPjOazJ/ngDAh7tRQNcUguA+b mv51be0FZZzDfMdB25xDBFsmYiqiB7bUOkjBw8txcMc9OReBPaeSPv6SFvALeXTnsbjIDA xK9g4rGYM3RDbjV0CYLDGLzbXt/fAng= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8NW1bKh8Pj9QK8QeM3EWnuOi+JRgFVluEIBDWmCdhTE=; b=QZx7Jqj6NyWtT2Bvj6TgbRa2sXF1uWT33Vbnme3AFWY0V1/07FHMBZtVpkpG9ZTBuVFxDV IloFOpDUd2KYStBA== 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 4093B13297; Wed, 31 Jul 2024 12:52:25 +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 KKlmDokzqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:25 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Corentin Chary , "Luke D. Jones" Subject: [PATCH 02/10] platform/x86: asus-laptop: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:52 +0200 Message-ID: <20240731125220.1147348-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spamd-Result: default: False [-1.60 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; FREEMAIL_CC(0.00)[vger.kernel.org,suse.de,gmail.com,ljones.dev]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TAGGED_RCPT(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,intel.com:email,suse.de:email] X-Spam-Level: X-Spam-Flag: NO X-Spam-Score: -1.60 Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Corentin Chary Cc: "Luke D. Jones" Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/asus-laptop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c index ccb33d034e2a..9d7e6b712abf 100644 --- a/drivers/platform/x86/asus-laptop.c +++ b/drivers/platform/x86/asus-laptop.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -818,7 +817,7 @@ static int asus_backlight_init(struct asus_laptop *asus) asus->backlight_device = bd; bd->props.brightness = asus_read_brightness(bd); - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; backlight_update_status(bd); return 0; } From patchwork Wed Jul 31 12:50:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748765 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D57F51B143B; Wed, 31 Jul 2024 12:52:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430349; cv=none; b=T9RN+/ZQwen/hs8avNUrj+yH5uqHNsa2P0dnJkK6RCs41PEgB9nriOXXEAhUyY1S9TOYp0iQZvPFKAtfTqaO5phHcrLDLWYKD8RUJuTh0FQRUp+32j2HWRYWJlUPsbrrVizgRXuGTUKLpfTWO8q/WHx279xJjKKVjWbF9j9oIsQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430349; c=relaxed/simple; bh=3sprWo5PLLLBC1DmizsUiKGYzESy7qKO2V6j4+lhcQU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=XlXpkdPInpp0NxqvJg1OOCYv11Wk2a9uLKdhVDJJTuhuY82bZ51yfIDl4ybr2zc10pHzDf1KVSMPvnhTi1KtlXPsRR1hL7+IxPiScmhtqbZiV2JeB03SR/2piXAt/mlMG+K9LgAy8eFhiQsIa7+K7wJAzVEWbc1cmz3GKw25WHU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=sTpJjOK6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=P8lm4ZGY; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=sTpJjOK6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=P8lm4ZGY; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sTpJjOK6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="P8lm4ZGY"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sTpJjOK6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="P8lm4ZGY" 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 B72E21F833; Wed, 31 Jul 2024 12:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXwza+8UyFrONHHMLRuZEHjhjmBqC8saf1oKEiib1ew=; b=sTpJjOK6ILGQu8bhckPk1fH34s7jI3R/zKjvD/7MuBtCxlYXmpzN37QJ9AKKp5q/xicvvg 8ZzWA/B7oYLt5OKRMy5NX1i1YlmYptydC+0es1061r/4Llm9G8vZzg9X5mHDKo7Z13Ycvd 1RCOQebtS8nFFWgdXP/8ULyU0wOwE2g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXwza+8UyFrONHHMLRuZEHjhjmBqC8saf1oKEiib1ew=; b=P8lm4ZGYEXtMxR2P07ZJ1AjsZ/Mx+Oj0bToIyeRggPTia2sCkgACIZUtFogSRI1m8VNjWJ vSkpl0ii7275R/BQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXwza+8UyFrONHHMLRuZEHjhjmBqC8saf1oKEiib1ew=; b=sTpJjOK6ILGQu8bhckPk1fH34s7jI3R/zKjvD/7MuBtCxlYXmpzN37QJ9AKKp5q/xicvvg 8ZzWA/B7oYLt5OKRMy5NX1i1YlmYptydC+0es1061r/4Llm9G8vZzg9X5mHDKo7Z13Ycvd 1RCOQebtS8nFFWgdXP/8ULyU0wOwE2g= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430345; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yXwza+8UyFrONHHMLRuZEHjhjmBqC8saf1oKEiib1ew=; b=P8lm4ZGYEXtMxR2P07ZJ1AjsZ/Mx+Oj0bToIyeRggPTia2sCkgACIZUtFogSRI1m8VNjWJ vSkpl0ii7275R/BQ== 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 7EB2913AD8; Wed, 31 Jul 2024 12:52:25 +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 cMaXHYkzqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:25 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Corentin Chary , "Luke D. Jones" Subject: [PATCH 03/10] platform/x86: asus-nb-wmi: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:53 +0200 Message-ID: <20240731125220.1147348-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-1.60 / 50.00]; BAYES_HAM(-3.00)[100.00%]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; RCPT_COUNT_SEVEN(0.00)[7]; TAGGED_RCPT(0.00)[]; ARC_NA(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,suse.de,gmail.com,ljones.dev]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,imap1.dmz-prg2.suse.org:helo,suse.de:email] X-Spam-Flag: NO X-Spam-Score: -1.60 Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Corentin Chary Cc: "Luke D. Jones" Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/asus-nb-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/asus-nb-wmi.c b/drivers/platform/x86/asus-nb-wmi.c index fceffe2082ec..e20e241bda98 100644 --- a/drivers/platform/x86/asus-nb-wmi.c +++ b/drivers/platform/x86/asus-nb-wmi.c @@ -7,12 +7,12 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include #include #include -#include #include #include @@ -525,7 +525,7 @@ static void asus_nb_wmi_quirks(struct asus_wmi_driver *driver) dmi_check_system(asus_quirks); driver->quirks = quirks; - driver->panel_power = FB_BLANK_UNBLANK; + driver->panel_power = BACKLIGHT_POWER_ON; /* overwrite the wapf setting if the wapf paramater is specified */ if (wapf != -1) From patchwork Wed Jul 31 12:50:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748772 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2AF7D1B3748; Wed, 31 Jul 2024 12:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430357; cv=none; b=Wg0iISSWnLwUE5C5jtSkTdRmzA2EVIzjeNDZiRN2+B7Kaj+csC4oJhHtD5Rdzdvi0ByHvnTvgnAseLPGEHwdeREWmYwKHdN88UzetePCeF947k6zInxIAnw/3yMY+y8BDV7QNwU2ax4C4ZkwjFTRgEovEcC7f3Ia4v1cz2O+j1s= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430357; c=relaxed/simple; bh=gecRab97xdIQjGLDS/dPk+7Td0sq611oMBXCRh5sflE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ddsVuMDRWnq8tWLcP518fxeGk8BmjftiojhFlRK8mrHp7m68/IayTgdMhM1+rIt2OvNffzxe5QIOz0HN3Natm30sdsJkuEMqEMomZR/p9sx+SgoRTtugpsl9cgNgwPkIqvFHeZblIN9CZXZqrxA685P0zjJqm8ER499gK53AkIU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ujy/MoQw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=FHuHDC9E; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ujy/MoQw; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=FHuHDC9E; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ujy/MoQw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="FHuHDC9E"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ujy/MoQw"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="FHuHDC9E" 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 F3C0621AEA; Wed, 31 Jul 2024 12:52:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DPJSV2OiyVR33EaM00O4ZfycCar5OaIUtMqXpZ69k/I=; b=ujy/MoQwJFylg5zbPC/Jn+6ZkljjATaz+EhKX0PospAPge347NgXvYC3ZDq+obfkwddUbq jNm4UK+MEhlUirAdgerysijg/rmeDsP0qmbyBRWUJ8el+x0EZJG4/1DR1aqU0Z0eWjgR0w xbTZ95PIWVeJ1z5Wv3RQTxSdmxn8g+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DPJSV2OiyVR33EaM00O4ZfycCar5OaIUtMqXpZ69k/I=; b=FHuHDC9ELs1jSYG1zYOU02amuqnRk1qI9AgBGZG1ivvKXfXIY6WAxw/eCwWJWAy6w/Svgd SYKevdGWFranHLBA== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="ujy/MoQw"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=FHuHDC9E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DPJSV2OiyVR33EaM00O4ZfycCar5OaIUtMqXpZ69k/I=; b=ujy/MoQwJFylg5zbPC/Jn+6ZkljjATaz+EhKX0PospAPge347NgXvYC3ZDq+obfkwddUbq jNm4UK+MEhlUirAdgerysijg/rmeDsP0qmbyBRWUJ8el+x0EZJG4/1DR1aqU0Z0eWjgR0w xbTZ95PIWVeJ1z5Wv3RQTxSdmxn8g+k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DPJSV2OiyVR33EaM00O4ZfycCar5OaIUtMqXpZ69k/I=; b=FHuHDC9ELs1jSYG1zYOU02amuqnRk1qI9AgBGZG1ivvKXfXIY6WAxw/eCwWJWAy6w/Svgd SYKevdGWFranHLBA== 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 BD96313297; Wed, 31 Jul 2024 12:52:25 +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 AAv/LIkzqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:25 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Corentin Chary , "Luke D. Jones" Subject: [PATCH 04/10] platform/x86: asus-wmi: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:54 +0200 Message-ID: <20240731125220.1147348-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: F3C0621AEA X-Spam-Score: -3.81 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-3.81 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_TLS_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,suse.de,gmail.com,ljones.dev]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,suse.de:email,suse.de:dkim,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.de:+] Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Corentin Chary Cc: "Luke D. Jones" Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/asus-wmi.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index cc735931f97b..39fa651fc9a2 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -3860,7 +3859,7 @@ static int read_backlight_power(struct asus_wmi *asus) if (ret < 0) return ret; - return ret ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; + return ret ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; } static int read_brightness_max(struct asus_wmi *asus) @@ -3919,7 +3918,7 @@ static int update_bl_status(struct backlight_device *bd) power = read_backlight_power(asus); if (power != -ENODEV && bd->props.power != power) { - ctrl_param = !!(bd->props.power == FB_BLANK_UNBLANK); + ctrl_param = !!(bd->props.power == BACKLIGHT_POWER_ON); err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BACKLIGHT, ctrl_param, NULL); if (asus->driver->quirks->store_backlight_power) @@ -3978,7 +3977,7 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus) power = read_backlight_power(asus); if (power == -ENODEV) - power = FB_BLANK_UNBLANK; + power = BACKLIGHT_POWER_ON; else if (power < 0) return power; @@ -4036,7 +4035,7 @@ static int read_screenpad_backlight_power(struct asus_wmi *asus) if (ret < 0) return ret; /* 1 == powered */ - return ret ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; + return ret ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; } static int read_screenpad_brightness(struct backlight_device *bd) @@ -4049,7 +4048,7 @@ static int read_screenpad_brightness(struct backlight_device *bd) if (err < 0) return err; /* The device brightness can only be read if powered, so return stored */ - if (err == FB_BLANK_POWERDOWN) + if (err == BACKLIGHT_POWER_OFF) return asus->driver->screenpad_brightness - ASUS_SCREENPAD_BRIGHT_MIN; err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_SCREENPAD_LIGHT, &retval); @@ -4070,7 +4069,7 @@ static int update_screenpad_bl_status(struct backlight_device *bd) return power; if (bd->props.power != power) { - if (power != FB_BLANK_UNBLANK) { + if (power != BACKLIGHT_POWER_ON) { /* Only brightness > 0 can power it back on */ ctrl_param = asus->driver->screenpad_brightness - ASUS_SCREENPAD_BRIGHT_MIN; err = asus_wmi_set_devstate(ASUS_WMI_DEVID_SCREENPAD_LIGHT, @@ -4078,7 +4077,7 @@ static int update_screenpad_bl_status(struct backlight_device *bd) } else { err = asus_wmi_set_devstate(ASUS_WMI_DEVID_SCREENPAD_POWER, 0, NULL); } - } else if (power == FB_BLANK_UNBLANK) { + } else if (power == BACKLIGHT_POWER_ON) { /* Only set brightness if powered on or we get invalid/unsync state */ ctrl_param = bd->props.brightness + ASUS_SCREENPAD_BRIGHT_MIN; err = asus_wmi_set_devstate(ASUS_WMI_DEVID_SCREENPAD_LIGHT, ctrl_param, NULL); @@ -4108,7 +4107,7 @@ static int asus_screenpad_init(struct asus_wmi *asus) if (power < 0) return power; - if (power != FB_BLANK_POWERDOWN) { + if (power != BACKLIGHT_POWER_OFF) { err = asus_wmi_get_devstate(asus, ASUS_WMI_DEVID_SCREENPAD_LIGHT, &brightness); if (err < 0) return err; From patchwork Wed Jul 31 12:50:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748768 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF1B11B0127; Wed, 31 Jul 2024 12:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430351; cv=none; b=IXer7VcfiEoNxGfYiU51qbWSeiCwB8EolhIiVSlX8NHYFnP8w4hWDZ/OhpquxjsWD8jZ6KLnAtybK6oS/ydVZbqL3nTMwp0nNtW3/6lDIm1GtmabCTDf6ArBXvPa3u6eOIgOgHtvsIaOQq0987DWZPNl6NGGWFOfW9NJ6tzY9sc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430351; c=relaxed/simple; bh=UhSHaC5781NiSFWgFHpkh00rePUIc1gcl6ytzGJhJ1E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B5IGPVLEO5YABaKTm8fZzX5bI2lVVJ+7zbQNlWUQZG3Z1KXud2ynvoXs3JDF6pbncyFW+X0ARf8M+hd7Ek8TB2Ee3LR2oxHUCriD/hmacq8zQ1ziOK5WgjGNHYrmh5IVL6kcSMoA3PWrn/d9Imfyv1FhfMB8Uj/xR12or0HnrIM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2ZFTqNLc; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=0Sy80TGD; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=2ZFTqNLc; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=0Sy80TGD; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2ZFTqNLc"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="0Sy80TGD"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="2ZFTqNLc"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="0Sy80TGD" 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 3A3841F840; Wed, 31 Jul 2024 12:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlP/ZFCXOFkiIboAWN8+7O7xJ2U5dX/bxVwzuNygI/g=; b=2ZFTqNLcTGHoXmKWgMDBAxKRLnQTIrBiLzrPffMDloztNgikpeOxpNEcHoH5DkH/mHVhC/ HcGst+4KQ3ETVZZS3K7lFjfGj8F1nbtN7ITefEvD5FbRCo+k2HAK6T/x3OGDEMdvJkOc1G r1C/Cu2mVMxmrbm3cfA2qr7J3rAHaBg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlP/ZFCXOFkiIboAWN8+7O7xJ2U5dX/bxVwzuNygI/g=; b=0Sy80TGDK9q0yJoiGVg7eqrZ+FNyiB12CeWA1w9IWIcO6g9Vyh0/26urBmlK2C+bWmANSm xqQZX4hP+QLwwoBg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=2ZFTqNLc; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=0Sy80TGD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlP/ZFCXOFkiIboAWN8+7O7xJ2U5dX/bxVwzuNygI/g=; b=2ZFTqNLcTGHoXmKWgMDBAxKRLnQTIrBiLzrPffMDloztNgikpeOxpNEcHoH5DkH/mHVhC/ HcGst+4KQ3ETVZZS3K7lFjfGj8F1nbtN7ITefEvD5FbRCo+k2HAK6T/x3OGDEMdvJkOc1G r1C/Cu2mVMxmrbm3cfA2qr7J3rAHaBg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SlP/ZFCXOFkiIboAWN8+7O7xJ2U5dX/bxVwzuNygI/g=; b=0Sy80TGDK9q0yJoiGVg7eqrZ+FNyiB12CeWA1w9IWIcO6g9Vyh0/26urBmlK2C+bWmANSm xqQZX4hP+QLwwoBg== 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 0603E13AD8; Wed, 31 Jul 2024 12:52:26 +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 KNM2AIozqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:26 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Corentin Chary , "Luke D. Jones" Subject: [PATCH 05/10] platform/x86: eeepc-laptop: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:55 +0200 Message-ID: <20240731125220.1147348-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-0.81 / 50.00]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_TLS_ALL(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,suse.de,gmail.com,ljones.dev]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:dkim,intel.com:email]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.de:+] X-Spamd-Bar: / X-Rspamd-Queue-Id: 3A3841F840 X-Spam-Level: X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -0.81 Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Corentin Chary Cc: "Luke D. Jones" Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/eeepc-laptop.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/eeepc-laptop.c b/drivers/platform/x86/eeepc-laptop.c index 447364bed249..03319a80e114 100644 --- a/drivers/platform/x86/eeepc-laptop.c +++ b/drivers/platform/x86/eeepc-laptop.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -1137,7 +1136,7 @@ static int eeepc_backlight_init(struct eeepc_laptop *eeepc) } eeepc->backlight_device = bd; bd->props.brightness = read_brightness(bd); - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; backlight_update_status(bd); return 0; } From patchwork Wed Jul 31 12:50:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748773 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5B9E81B29B3; Wed, 31 Jul 2024 12:52:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430360; cv=none; b=K9RD2SodO1DY6iYHayV6wbk8XuoBs2YgcRwrZEbAMvvgYEbLqvuSS9VRpGjdT6PJiwLxA9F9ZZ3nwV1H58uNoQIyR+3kNMyubdl5TLQttslaZX/q2gznURsmPm/06bVBG6N4vs1006FbhgbzHA9xCjNaepi35BIxVl2bHZJILME= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430360; c=relaxed/simple; bh=ghIcj43pPmX/hrpOf6W2KGvuH1Kv6qQVduc+37OxUYs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HNPGgRHm9e2dbUVUWgzqPtz7ULer6goM/f6pSHvyZ/uPwWv3pYFF567u0ZcpXPydLXM/IiJi3btK/hITzUis8FnBsY36f+aVyLgRRGtFSCZp0MW8cXtQYRgNttE8eH6U+rM9GR1moQR8fN+yTLIR7sJX4boDozRqCJCtvGkX/WM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=HPXSd8eb; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=rcCvM3Ov; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=HPXSd8eb; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=rcCvM3Ov; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="HPXSd8eb"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rcCvM3Ov"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="HPXSd8eb"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="rcCvM3Ov" 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 7617421B32; Wed, 31 Jul 2024 12:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1B8vlYIUQ4JeRsr43JDhjtyxkNDxyQuUv2l0wh1KxQ8=; b=HPXSd8ebz020aZMYLWrJb6atB+L3w/LlP0zSPCFLw1LvLG/nsUKBRtOYgXrY2Mj6/kGj3E jwmbBen53RVjBxc541qT9i3BP9Aun4N3rxCwe8E1K7YR/H3T2OYyYk2+rdHi93/4r1kUuS bd3U1HPrj+3PIeywynXBCzrWwLeXsfo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1B8vlYIUQ4JeRsr43JDhjtyxkNDxyQuUv2l0wh1KxQ8=; b=rcCvM3Ovv6tUDzBjWdmu1CEDb2BTz6hvvyzlxEfweIzHqQdUsrpXJsRH4zLgbbBW3h6Evv rzPFGPzAA7OYDWAQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=HPXSd8eb; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=rcCvM3Ov DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1B8vlYIUQ4JeRsr43JDhjtyxkNDxyQuUv2l0wh1KxQ8=; b=HPXSd8ebz020aZMYLWrJb6atB+L3w/LlP0zSPCFLw1LvLG/nsUKBRtOYgXrY2Mj6/kGj3E jwmbBen53RVjBxc541qT9i3BP9Aun4N3rxCwe8E1K7YR/H3T2OYyYk2+rdHi93/4r1kUuS bd3U1HPrj+3PIeywynXBCzrWwLeXsfo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1B8vlYIUQ4JeRsr43JDhjtyxkNDxyQuUv2l0wh1KxQ8=; b=rcCvM3Ovv6tUDzBjWdmu1CEDb2BTz6hvvyzlxEfweIzHqQdUsrpXJsRH4zLgbbBW3h6Evv rzPFGPzAA7OYDWAQ== 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 406BF13297; Wed, 31 Jul 2024 12:52:26 +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 wHJkDoozqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:26 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Corentin Chary , "Luke D. Jones" Subject: [PATCH 06/10] platform/x86: eeepc-wmi: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:56 +0200 Message-ID: <20240731125220.1147348-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: 7617421B32 X-Spam-Score: -3.81 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-3.81 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; SUSPICIOUS_RECIPS(1.50)[]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; RCVD_TLS_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCPT_COUNT_SEVEN(0.00)[7]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,suse.de,gmail.com,ljones.dev]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,intel.com:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.de:+] Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Corentin Chary Cc: "Luke D. Jones" Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/eeepc-wmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/eeepc-wmi.c b/drivers/platform/x86/eeepc-wmi.c index 32d9f0ba6be3..37edb9ae67b8 100644 --- a/drivers/platform/x86/eeepc-wmi.c +++ b/drivers/platform/x86/eeepc-wmi.c @@ -13,13 +13,13 @@ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt +#include #include #include #include #include #include #include -#include #include #include "asus-wmi.h" @@ -192,7 +192,7 @@ static void eeepc_wmi_quirks(struct asus_wmi_driver *driver) driver->quirks = quirks; driver->quirks->wapf = -1; - driver->panel_power = FB_BLANK_UNBLANK; + driver->panel_power = BACKLIGHT_POWER_ON; } static struct asus_wmi_driver asus_wmi_driver = { From patchwork Wed Jul 31 12:50:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748767 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FCB81AB52C; Wed, 31 Jul 2024 12:52:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430350; cv=none; b=RZkpJedzGSRz9JGmbglwj3tZx33ndevck59UH0ldWYFjzptB1zhJURPvuRtOjEc0jEHdsDLnjxWVhzwXIKaj4Hvb9TAYJ3Sba0kI1AXMBM3JrAlI3rBkFhla84ISDy0bVKxnH7qIRb1uHBSHdzT+mYBB7xYaq8HO0jEzIjUQtGQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430350; c=relaxed/simple; bh=c4ILxJdkLC0JQH5MeBVWnWFSAdXuqGgPGgLdTY8FUxg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MV5haTGEEtSLsOylC/0DTf3l+RHKmk/3azIJMTx7AsGADZd/lVak1eHE1gz/BZPggntGV0NRwoxt07g8sdV6MEZy99EE+Vq5vPEumdoLRUeXAl24xe5f3o+iHt+8JGvzFEjIbAjiZPyrWNOsCkX0LQd6ZwH9fEKwu0ISM4LvDF4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mUVL5jW9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ganxhMy6; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=mUVL5jW9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ganxhMy6; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mUVL5jW9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ganxhMy6"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="mUVL5jW9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ganxhMy6" 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 AD47B21B39; Wed, 31 Jul 2024 12:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=51ECnNI3+l+HcwDq4ybBu67coDLy18mYG/8XZbu1qeY=; b=mUVL5jW9KigXBqThXHSgkCF/xNFte/hn/ETBJ9qcDDXFgs0pIlF03hN3/D2R2BxNU9ACAB dIBsGE2fkJmxFTUndUycXOoAdxsfbozKnHqMb6jfgn2BSiDfhLWQXlqdMIETXBn4N17QPq WDr2hVhUKQiIg3WIcZkmb/3Bth3cWps= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=51ECnNI3+l+HcwDq4ybBu67coDLy18mYG/8XZbu1qeY=; b=ganxhMy6ZoRR2FG5R92rask7UFcINuOdgVfm8E98zrSKeKEe5CFtjC842qBM3K2ZuQ6zqD 6iAgDgjwUR4x1TBQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=mUVL5jW9; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=ganxhMy6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=51ECnNI3+l+HcwDq4ybBu67coDLy18mYG/8XZbu1qeY=; b=mUVL5jW9KigXBqThXHSgkCF/xNFte/hn/ETBJ9qcDDXFgs0pIlF03hN3/D2R2BxNU9ACAB dIBsGE2fkJmxFTUndUycXOoAdxsfbozKnHqMb6jfgn2BSiDfhLWQXlqdMIETXBn4N17QPq WDr2hVhUKQiIg3WIcZkmb/3Bth3cWps= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=51ECnNI3+l+HcwDq4ybBu67coDLy18mYG/8XZbu1qeY=; b=ganxhMy6ZoRR2FG5R92rask7UFcINuOdgVfm8E98zrSKeKEe5CFtjC842qBM3K2ZuQ6zqD 6iAgDgjwUR4x1TBQ== 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 7DDF513AD8; Wed, 31 Jul 2024 12:52:26 +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 UJ9SHYozqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:26 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Jonathan Woithe Subject: [PATCH 07/10] platform/x86: fujitsu-laptop: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:57 +0200 Message-ID: <20240731125220.1147348-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: AD47B21B39 X-Spam-Score: -5.31 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-5.31 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,intel.com:email]; DKIM_TRACE(0.00)[suse.de:+] Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Jonathan Woithe Cc: Hans de Goede Cc: "Ilpo Järvinen" Acked-by: Jonathan Woithe --- drivers/platform/x86/fujitsu-laptop.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/fujitsu-laptop.c b/drivers/platform/x86/fujitsu-laptop.c index 968fc91bd5e4..ae992ac1ab4a 100644 --- a/drivers/platform/x86/fujitsu-laptop.c +++ b/drivers/platform/x86/fujitsu-laptop.c @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -356,7 +355,7 @@ static int bl_get_brightness(struct backlight_device *b) { struct acpi_device *device = bl_get_data(b); - return b->props.power == FB_BLANK_POWERDOWN ? 0 : get_lcd_level(device); + return b->props.power == BACKLIGHT_POWER_OFF ? 0 : get_lcd_level(device); } static int bl_update_status(struct backlight_device *b) @@ -364,7 +363,7 @@ static int bl_update_status(struct backlight_device *b) struct acpi_device *device = bl_get_data(b); if (fext) { - if (b->props.power == FB_BLANK_POWERDOWN) + if (b->props.power == BACKLIGHT_POWER_OFF) call_fext_func(fext, FUNC_BACKLIGHT, 0x1, BACKLIGHT_PARAM_POWER, BACKLIGHT_OFF); else @@ -933,9 +932,9 @@ static int acpi_fujitsu_laptop_add(struct acpi_device *device) acpi_video_get_backlight_type() == acpi_backlight_vendor) { if (call_fext_func(fext, FUNC_BACKLIGHT, 0x2, BACKLIGHT_PARAM_POWER, 0x0) == BACKLIGHT_OFF) - fujitsu_bl->bl_device->props.power = FB_BLANK_POWERDOWN; + fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_OFF; else - fujitsu_bl->bl_device->props.power = FB_BLANK_UNBLANK; + fujitsu_bl->bl_device->props.power = BACKLIGHT_POWER_ON; } ret = acpi_fujitsu_laptop_input_setup(device); From patchwork Wed Jul 31 12:50:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748771 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5614A1B29D8; Wed, 31 Jul 2024 12:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430354; cv=none; b=HGgh6aMn/s9ge0UV0Jm0soHVL77iMzFKvBKyYY6jDsi/cRU/9xRrYdSnFcNbZm9jzZlWZgV/FZilTQxjM9jkLCRpBGaq89u4VpbbooPeko9zQlIgZJqmH95VMuqriHQ1gf6uVYHTROyESRjt6jCuc6OTypFVTmj1CSAhKEsn0BM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430354; c=relaxed/simple; bh=bH3ylJcdtyYRK9glPloVDBV3LmVwKvy7Npprsi3adOM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FoVnrccZbO9FYZsF/Lzactw3hpiyURW+YpZxlZPiqg3mZxLCsPyoIIpVnknRU8watO73C1DsdccVE8DTN0yam9XCEPpEIt+HBxSPffxk1+QpZgZRIRYdQYRqpa5Fj9WXe7Jy9JCdSEGiKIiIWpxtcgAlZ9v7AyPNp1pHsKAfaRI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=s1GItmfr; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=36rhW0kG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=a14SWDtC; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=u6CXRY4+; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="s1GItmfr"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="36rhW0kG"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="a14SWDtC"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="u6CXRY4+" 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 E3BA91F842; Wed, 31 Jul 2024 12:52:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tr4kNUHbHzQ5DNSNEJzaf/1/iyjztVySrxxNivspKc0=; b=s1GItmfr7WZYPGtvefrFJ/vQCcngCjydFmtUuFFRBkDxsFcsc9bprREIn3NKa/D1hcZxI4 gjpRZ6kDzv6oMQ+tJHnuLw80w/4z3XZxA8NxLtiA+dY/oXUwEBA3SSoAkshoIeV5bVFBZD GZzSOQF2ammwoXIDYOsqTeeBeHGOqBs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tr4kNUHbHzQ5DNSNEJzaf/1/iyjztVySrxxNivspKc0=; b=36rhW0kGAlwG1akHlPEx2cMhRj+gpa4vcKADlWaKm8fX4BYCJyaqrc+HTFPb0gIl2pw/t+ MJ8J0Rm8wI1MjkDw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tr4kNUHbHzQ5DNSNEJzaf/1/iyjztVySrxxNivspKc0=; b=a14SWDtCqB5uYiELrtmKsQ4yIpK9XEkdlAs2lUiY4IDLTSYWmv9pEmZX6JzcX3WAKwUmRk tv0K699aDUvJMRY2rqERV1mV08iiVgKklECldM+qyTwptDFIbJUxX4npHXGjQlZM+eJp/l ZDk66ehpTJ3sw7qRr2bZWTdD0izB+Qg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430346; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tr4kNUHbHzQ5DNSNEJzaf/1/iyjztVySrxxNivspKc0=; b=u6CXRY4+zywJgxZ+yBo1/SQR7qY/dLwqIhKF1YSOODpQ4xVT52Ur5DJ5dUNZHGbVIwGH1C E8nmeLEg1HHSFCDw== 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 B453C13297; Wed, 31 Jul 2024 12:52:26 +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 6Gu9KoozqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:26 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Ike Panhc Subject: [PATCH 08/10] platform/x86: ideapad-laptop: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:58 +0200 Message-ID: <20240731125220.1147348-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-3.10 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[intel.com:email,imap1.dmz-prg2.suse.org:helo,suse.de:email] X-Spam-Flag: NO X-Spam-Score: -3.10 Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Ike Panhc Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/ideapad-laptop.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 1ace711f7442..8270925db03f 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -1256,7 +1255,7 @@ static int ideapad_backlight_update_status(struct backlight_device *blightdev) return err; err = write_ec_cmd(priv->adev->handle, VPCCMD_W_BL_POWER, - blightdev->props.power != FB_BLANK_POWERDOWN); + blightdev->props.power != BACKLIGHT_POWER_OFF); if (err) return err; @@ -1306,7 +1305,7 @@ static int ideapad_backlight_init(struct ideapad_private *priv) priv->blightdev = blightdev; blightdev->props.brightness = now; - blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; + blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; backlight_update_status(blightdev); @@ -1330,7 +1329,7 @@ static void ideapad_backlight_notify_power(struct ideapad_private *priv) if (read_ec_data(priv->adev->handle, VPCCMD_R_BL_POWER, &power)) return; - blightdev->props.power = power ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; + blightdev->props.power = power ? BACKLIGHT_POWER_ON : BACKLIGHT_POWER_OFF; } static void ideapad_backlight_notify_brightness(struct ideapad_private *priv) From patchwork Wed Jul 31 12:50:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748774 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 086FE1B3F16; Wed, 31 Jul 2024 12:52:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430363; cv=none; b=bR7DnLLz3DNxDnl2rTv8wlYWZvBe0r+YME3yWxQ86TZZX4kdFaF5Q0FSMlR4t6Gj3ycII3glqxcibzLvtUxpSR3nkSJkqXrMoLwbcpDAn8q1kcIKvDbzTxR4xe6FD2p6E57LTHpr7s3GTjumLvLoBaAusfeZ7lipaiA+w3ujcSY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430363; c=relaxed/simple; bh=vfNHS5PHcSuxuJHkQW+2q1CH48UuXmX98oPYHSQnyU0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kGorEp1F7bymOPnw8t3/e+hYXH3zSk1J6WLS+sVonQ7IG8FXowKSgJYGYNV5TteQZ9zQV90m/DwvRc4JnbFWLkteK/b2YaYVq9vXV9iTvRdq5imsOYzhcrH0tM34Qsty3DllRSQI6Ei15kyEJFFGz4x+OI6uQr2/o81WyczMxeI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=eUC/vWOH; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=T5mxWDkk; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=eUC/vWOH; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=T5mxWDkk; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="eUC/vWOH"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="T5mxWDkk"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="eUC/vWOH"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="T5mxWDkk" 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 2C7471F843; Wed, 31 Jul 2024 12:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bDH8nnmcEGhDe5szori77w5r0bZHcPyn19ZUySO+pcs=; b=eUC/vWOH0PQPfsg4A+cMyK9jB/jHP70OZC+qEmbPQQnd+kqdahPG8r0jrAH2xONd4dqQT1 o0UEYlYJbbysMrMkGm7JRUpqp5ZSPHW3CTTWK9owbbltvPN4Zv0iwb1ifAJd2JzqiBATNx XQa+tk/1MUyycPr9J38Ep24aRwqUR3c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bDH8nnmcEGhDe5szori77w5r0bZHcPyn19ZUySO+pcs=; b=T5mxWDkkDMICMV6h+mnVHVEg0+sYjk4Z2ZLHMxF2Yu4Jf6YHwzNKQH9YCd3Q7Sm7lUvK+K /tzzsxONajNlocBw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="eUC/vWOH"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=T5mxWDkk DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bDH8nnmcEGhDe5szori77w5r0bZHcPyn19ZUySO+pcs=; b=eUC/vWOH0PQPfsg4A+cMyK9jB/jHP70OZC+qEmbPQQnd+kqdahPG8r0jrAH2xONd4dqQT1 o0UEYlYJbbysMrMkGm7JRUpqp5ZSPHW3CTTWK9owbbltvPN4Zv0iwb1ifAJd2JzqiBATNx XQa+tk/1MUyycPr9J38Ep24aRwqUR3c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bDH8nnmcEGhDe5szori77w5r0bZHcPyn19ZUySO+pcs=; b=T5mxWDkkDMICMV6h+mnVHVEg0+sYjk4Z2ZLHMxF2Yu4Jf6YHwzNKQH9YCd3Q7Sm7lUvK+K /tzzsxONajNlocBw== 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 EA8D813AD8; Wed, 31 Jul 2024 12:52:26 +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 EIgCOIozqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:26 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 09/10] platform/x86: oaktrail: Use backlight power constants Date: Wed, 31 Jul 2024 14:50:59 +0200 Message-ID: <20240731125220.1147348-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Rspamd-Action: no action X-Rspamd-Queue-Id: 2C7471F843 X-Spam-Score: -5.31 X-Spam-Level: X-Spam-Flag: NO X-Spamd-Result: default: False [-5.31 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; MIME_TRACE(0.00)[0:+]; RCVD_VIA_SMTP_AUTH(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,intel.com:email,suse.de:email,suse.de:dkim]; DKIM_TRACE(0.00)[suse.de:+] Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/intel/oaktrail.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/platform/x86/intel/oaktrail.c b/drivers/platform/x86/intel/oaktrail.c index 217630f40c3f..265cef327b4f 100644 --- a/drivers/platform/x86/intel/oaktrail.c +++ b/drivers/platform/x86/intel/oaktrail.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -250,7 +249,7 @@ static int oaktrail_backlight_init(void) oaktrail_bl_device = bd; bd->props.brightness = get_backlight_brightness(bd); - bd->props.power = FB_BLANK_UNBLANK; + bd->props.power = BACKLIGHT_POWER_ON; backlight_update_status(bd); return 0; From patchwork Wed Jul 31 12:51:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13748770 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E01451B373C; Wed, 31 Jul 2024 12:52:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430353; cv=none; b=bFjd0uQ3vdCuwb0l0JRSOmZT3ruGmvzj5zM+n9b6iJ3zI3KTyNQw3g7GF/W6M4F4RL6Ng4LhJcaIvs9kPcyKx+O5meCJyOK/mLfOn/cFufTJRFI1IQu6xqX+IOdpGymAwdn3E3hZBLWfgA9cYV/MDxWE3yWTeV7zgud/JokEkQQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722430353; c=relaxed/simple; bh=jPNRfYvc3p5Ff7xKGx5V4dnx6zKau2j4YlKH+npVZqA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BcH3QpJgUitLB9pjQLXlU2zl9mW/f9OAHEfjyYhUx2ycYTthzo3/1XfPpKv2gxOjcM79BAA4hqVoTmdp2v+U0pmL5psQdPHHmJiNIWJOwkLjluc8534GM75ujA9PHcgi7z3/hIcFoMnfQQgCVQgs49R/Z61gJCy4OiEWp6z9DnE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c+PxEqef; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fU/GDxHZ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=c+PxEqef; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fU/GDxHZ; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c+PxEqef"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fU/GDxHZ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="c+PxEqef"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fU/GDxHZ" 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 582BD21B51; Wed, 31 Jul 2024 12:52:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DxU+AesFYUxrvsdAdk3sLZxuGllIUill+l6h2/H5VTs=; b=c+PxEqef6z3V0YpoW4laurvnFuzUcwQwlu7kw2aQxMRFCLdmrwQ5mB4+R5KrZEPn8Bm8qe ELDADfc9pE3EpfEvtbgVy7vTvGmXsGkaN1k/pJRRdZYi1Qm0Nl4DvPczgcSxOhPqREEplH fi34WF5BoEeyNHfwGFVKTVneCyzAynE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DxU+AesFYUxrvsdAdk3sLZxuGllIUill+l6h2/H5VTs=; b=fU/GDxHZvrT1SaPUcHjIaI5GXk5Id+8ldCj6raBjqtfdvt1wBbZo63AR8MLwD4y5aBdXiD QUvt9idY/GrBv1BQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=c+PxEqef; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="fU/GDxHZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DxU+AesFYUxrvsdAdk3sLZxuGllIUill+l6h2/H5VTs=; b=c+PxEqef6z3V0YpoW4laurvnFuzUcwQwlu7kw2aQxMRFCLdmrwQ5mB4+R5KrZEPn8Bm8qe ELDADfc9pE3EpfEvtbgVy7vTvGmXsGkaN1k/pJRRdZYi1Qm0Nl4DvPczgcSxOhPqREEplH fi34WF5BoEeyNHfwGFVKTVneCyzAynE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1722430347; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=DxU+AesFYUxrvsdAdk3sLZxuGllIUill+l6h2/H5VTs=; b=fU/GDxHZvrT1SaPUcHjIaI5GXk5Id+8ldCj6raBjqtfdvt1wBbZo63AR8MLwD4y5aBdXiD QUvt9idY/GrBv1BQ== 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 27B6B13297; Wed, 31 Jul 2024 12:52:27 +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 SIF0CIszqmYzVgAAD6G6ig (envelope-from ); Wed, 31 Jul 2024 12:52:27 +0000 From: Thomas Zimmermann To: hdegoede@redhat.com, ilpo.jarvinen@linux.intel.com Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Zimmermann , Corentin Chary Subject: [PATCH 10/10] platform/x86: samsung-laptop: Use backlight power constants Date: Wed, 31 Jul 2024 14:51:00 +0200 Message-ID: <20240731125220.1147348-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240731125220.1147348-1-tzimmermann@suse.de> References: <20240731125220.1147348-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-3.81 / 50.00]; BAYES_HAM(-3.00)[100.00%]; DWL_DNSWL_MED(-2.00)[suse.de:dkim]; SUSPICIOUS_RECIPS(1.50)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TAGGED_RCPT(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; FREEMAIL_CC(0.00)[vger.kernel.org,suse.de,gmail.com]; RCPT_COUNT_FIVE(0.00)[6]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:dkim,intel.com:email]; RCVD_COUNT_TWO(0.00)[2]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Action: no action X-Spam-Flag: NO X-Spam-Score: -3.81 X-Rspamd-Queue-Id: 582BD21B51 Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann Cc: Corentin Chary Cc: Hans de Goede Cc: "Ilpo Järvinen" --- drivers/platform/x86/samsung-laptop.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 3d2f8e758369..0d3e3ca20b1b 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include @@ -554,7 +553,7 @@ static int update_status(struct backlight_device *bd) set_brightness(samsung, bd->props.brightness); - if (bd->props.power == FB_BLANK_UNBLANK) + if (bd->props.power == BACKLIGHT_POWER_ON) sabi_set_commandb(samsung, commands->set_backlight, 1); else sabi_set_commandb(samsung, commands->set_backlight, 0); @@ -1189,7 +1188,7 @@ static int __init samsung_backlight_init(struct samsung_laptop *samsung) samsung->backlight_device = bd; samsung->backlight_device->props.brightness = read_brightness(samsung); - samsung->backlight_device->props.power = FB_BLANK_UNBLANK; + samsung->backlight_device->props.power = BACKLIGHT_POWER_ON; backlight_update_status(samsung->backlight_device); return 0;