From patchwork Tue Aug 20 09:22:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769690 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 DDEB118A95C; Tue, 20 Aug 2024 09:35:01 +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=1724146503; cv=none; b=jGntzfvyiQsg0mx9fLVHsFu+bBx601wINr1q1LbZFRR3kK0S19f2a+0DsOZEDrquJW2koUx9VSnvhcDgRApbrjFT5rLcCPO+qY1YRsN8XE7+6aaSqnhiKE/E6/v4qMiszcVXi/VwHlz50+l2onuAuqFj5vht6wPDV9rRCUwQeXE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146503; c=relaxed/simple; bh=8htW52eocGo7Q/Y0CHMuwLgGtd94hHMoYZJ9mWvlhJ8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=BtDdIjYjP4lXlJSOjxAaF3f65DGJUHJvRfK1r7jmipUxvQBZM9boaw+vZe6i8dRUpIZ04rXshJsl3m3xrA0pZ/iqJ/d1LQ3IiwgMP1DAC5O9xWG5tIlmEqawmcrqLVRt+IFsfkvj6a4Yvv8yTxjlflYKcPaUEKZII3WKts3lDVY= 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=tLf/Y8Lu; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=u2OFS3Sn; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=tLf/Y8Lu; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=u2OFS3Sn; 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="tLf/Y8Lu"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="u2OFS3Sn"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tLf/Y8Lu"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="u2OFS3Sn" 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 178451FFC8; Tue, 20 Aug 2024 09:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146500; 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=RdYJKJBzIuJjmmFlZR1srYPPFdL6Wytap1BTJ9bD9YE=; b=tLf/Y8Luu1c0nMqYb7IT8+MAc3LbQALDPqTH6gsOMvC9qLfMUWjtO995BgvyTZ8djJcWDn ilFP4DtDFL3Axa+OhtudXlURoMytFu0VMbYTvGqPhjyT+4SavWGhI0KSPzcBZwRHyR7RYi sE+sUBarzR9lIE9jw75ffXwysZ4Q7nQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146500; 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=RdYJKJBzIuJjmmFlZR1srYPPFdL6Wytap1BTJ9bD9YE=; b=u2OFS3SnWkU8dy1WFlB/8tIon03NpjGoe7IWousttdZ1IpLcVKnc1K7R3vxANOAi+0uy3e 808N9UxrehAjs9CQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146500; 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=RdYJKJBzIuJjmmFlZR1srYPPFdL6Wytap1BTJ9bD9YE=; b=tLf/Y8Luu1c0nMqYb7IT8+MAc3LbQALDPqTH6gsOMvC9qLfMUWjtO995BgvyTZ8djJcWDn ilFP4DtDFL3Axa+OhtudXlURoMytFu0VMbYTvGqPhjyT+4SavWGhI0KSPzcBZwRHyR7RYi sE+sUBarzR9lIE9jw75ffXwysZ4Q7nQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146500; 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=RdYJKJBzIuJjmmFlZR1srYPPFdL6Wytap1BTJ9bD9YE=; b=u2OFS3SnWkU8dy1WFlB/8tIon03NpjGoe7IWousttdZ1IpLcVKnc1K7R3vxANOAi+0uy3e 808N9UxrehAjs9CQ== 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 926BA13AFE; Tue, 20 Aug 2024 09:34:59 +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 iKvxIENjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:34:59 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 01/28] backlight: lcd: Rearrange code in fb_notifier_callback() Date: Tue, 20 Aug 2024 11:22:39 +0200 Message-ID: <20240820093452.68270-2-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCVD_COUNT_TWO(0.00)[2]; RCPT_COUNT_TWELVE(0.00)[16]; MIME_TRACE(0.00)[0:+]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: First aqcuire the ops_lock and do al tests while holing it. Rearranges the code in lcd's fb_notifier_callback() to resemble the callback in the backlight module. This will simplify later changes to these tests. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lcd.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index ceec90ca758b..0cd0fa1b24f9 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -29,21 +29,25 @@ static int fb_notifier_callback(struct notifier_block *self, { struct lcd_device *ld; struct fb_event *evdata = data; + struct fb_info *info = evdata->info; ld = container_of(self, struct lcd_device, fb_notif); + mutex_lock(&ld->ops_lock); + if (!ld->ops) - return 0; + goto out; + if (ld->ops->check_fb && !ld->ops->check_fb(ld, evdata->info)) + goto out; - mutex_lock(&ld->ops_lock); - if (!ld->ops->check_fb || ld->ops->check_fb(ld, evdata->info)) { - if (event == FB_EVENT_BLANK) { - if (ld->ops->set_power) - ld->ops->set_power(ld, *(int *)evdata->data); - } else { - if (ld->ops->set_mode) - ld->ops->set_mode(ld, evdata->data); - } + if (event == FB_EVENT_BLANK) { + if (ld->ops->set_power) + ld->ops->set_power(ld, *(int *)evdata->data); + } else { + if (ld->ops->set_mode) + ld->ops->set_mode(ld, evdata->data); } + +out: mutex_unlock(&ld->ops_lock); return 0; } From patchwork Tue Aug 20 09:22:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769691 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 6157718B46D; Tue, 20 Aug 2024 09:35:02 +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=1724146504; cv=none; b=rguYxTVVw4EPxdGUcdmIxLf0yt7GZU52hZBuUtesQjVsKk0v9pZA491KvvyPNsFcnmB76z6pNnw75qR3N8HnkmBJZ0hI0rhY7C7R/B1gn3KJi7cRsI9GTNZF8LlUjETkyDUFhOnarfKqftMh41pqdZD7hWZWSnwnEODow7tVHyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146504; c=relaxed/simple; bh=bxkwR+gKTVUd2geHfByJ7hzu9D32K6p9OOT/NtwbgzI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=F+fcSFiQJhvu4IGAbQXflo1uMyVX7Cv+XQqi8W5hI6Sf/PTehTxv2ujmfPC1jprKaH3yYyvO4K9Fyk5v/mgcdobEBijjmYSs+ITnrzkFqG2OA797hnbYq6GKPu6+td+t4fvv7cz9WGDaArK3baygrKKemIw+qa7QvA9P7Bz5el8= 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=UvDWMN6/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=jU55NKha; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=UvDWMN6/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=jU55NKha; 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="UvDWMN6/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jU55NKha"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="UvDWMN6/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="jU55NKha" 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 7D15F22509; Tue, 20 Aug 2024 09:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146500; 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=zfoDWSf8/KpMvUgri33pZdUHWlpxp8R6PeDH0tG5gmE=; b=UvDWMN6/69sjtVCU7n2/z7zQ+kr3dJ1HiWrdam6IGsdHts/TVqzMEBXfEnDb0wFU0xeUuc NZxIkvNwyQu2RpM+FH+m8LIEVBqtYP6GMkDzpXBalXbh5H78a6Dmy3tQFv3zFrCJr/6c5f yMDw+msxs1KTJJjGDsSvlP9uytChqWA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146500; 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=zfoDWSf8/KpMvUgri33pZdUHWlpxp8R6PeDH0tG5gmE=; b=jU55NKhaSF95uI/ftzLX5/cvMrTLKvBLJF7mHWXcVVhzKdm0zsXD1nGsuujZeFmVQILjUE 5cWsu//HRsOlvLBg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b="UvDWMN6/"; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=jU55NKha DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146500; 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=zfoDWSf8/KpMvUgri33pZdUHWlpxp8R6PeDH0tG5gmE=; b=UvDWMN6/69sjtVCU7n2/z7zQ+kr3dJ1HiWrdam6IGsdHts/TVqzMEBXfEnDb0wFU0xeUuc NZxIkvNwyQu2RpM+FH+m8LIEVBqtYP6GMkDzpXBalXbh5H78a6Dmy3tQFv3zFrCJr/6c5f yMDw+msxs1KTJJjGDsSvlP9uytChqWA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146500; 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=zfoDWSf8/KpMvUgri33pZdUHWlpxp8R6PeDH0tG5gmE=; b=jU55NKhaSF95uI/ftzLX5/cvMrTLKvBLJF7mHWXcVVhzKdm0zsXD1nGsuujZeFmVQILjUE 5cWsu//HRsOlvLBg== 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 1E99E13770; Tue, 20 Aug 2024 09:35:00 +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 qKQ5BkRjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:00 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 02/28] backlight: lcd: Test against struct fb_info.lcd_dev Date: Tue, 20 Aug 2024 11:22:40 +0200 Message-ID: <20240820093452.68270-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 7D15F22509 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Add struct fb_info.lcd_dev for fbdev drivers to store a reference to their lcd device. Update the lcd's fb_notifier_callback() to test for this field. The lcd module can now detect if an lcd device belongs to an fbdev device. This works similar to the bl_dev for backlights and will allow for the removal of the check_fb callback from several fbdev driver's lcd devices. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lcd.c | 3 +++ include/linux/fb.h | 13 +++++++++++++ 2 files changed, 16 insertions(+) diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 0cd0fa1b24f9..43a6752ec27f 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -30,6 +30,7 @@ static int fb_notifier_callback(struct notifier_block *self, struct lcd_device *ld; struct fb_event *evdata = data; struct fb_info *info = evdata->info; + struct lcd_device *fb_lcd = fb_lcd_device(info); ld = container_of(self, struct lcd_device, fb_notif); mutex_lock(&ld->ops_lock); @@ -38,6 +39,8 @@ static int fb_notifier_callback(struct notifier_block *self, goto out; if (ld->ops->check_fb && !ld->ops->check_fb(ld, evdata->info)) goto out; + if (fb_lcd && fb_lcd != ld) + goto out; if (event == FB_EVENT_BLANK) { if (ld->ops->set_power) diff --git a/include/linux/fb.h b/include/linux/fb.h index 865dad03e73e..bf1893616e9c 100644 --- a/include/linux/fb.h +++ b/include/linux/fb.h @@ -21,6 +21,7 @@ struct fb_info; struct file; struct i2c_adapter; struct inode; +struct lcd_device; struct module; struct notifier_block; struct page; @@ -480,6 +481,13 @@ struct fb_info { struct mutex bl_curve_mutex; u8 bl_curve[FB_BACKLIGHT_LEVELS]; #endif + + /* + * Assigned LCD device; set before framebuffer + * registration, remove after unregister + */ + struct lcd_device *lcd_dev; + #ifdef CONFIG_FB_DEFERRED_IO struct delayed_work deferred_work; unsigned long npagerefs; @@ -753,6 +761,11 @@ static inline struct backlight_device *fb_bl_device(struct fb_info *info) } #endif +static inline struct lcd_device *fb_lcd_device(struct fb_info *info) +{ + return info->lcd_dev; +} + /* fbmon.c */ #define FB_MAXTIMINGS 0 #define FB_VSYNCTIMINGS 1 From patchwork Tue Aug 20 09:22:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769692 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 A185C18C018; Tue, 20 Aug 2024 09:35:02 +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=1724146504; cv=none; b=ts6LJOQzjKQqqN0b5+Q/jpPJhqV46Ot6Gh42cCVu0KXYUgJd9XxpUk1AqWEbzRsKeeoKY/36lZ/CwSe9h0Rl/y0dVcTTm708w4mwuHmR9ehCpFSz/gBb/mFlqhwWPYbjVzHj2JObrDVnqX6g8GW+R2FEI84+n+K6S3gdkNA3TQ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146504; c=relaxed/simple; bh=hO+9/peRBRSOdRKYxz3cRAB9PYRVvZF1O3GdneUrT1Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VP8ypwwrNiEyZ4mhSwvzXvU6plnfBUkgKnP8Qs6MRPt5P0wfRX4u2q2pAVGj/AMrUxstcwsBjNSz1ZjTddss4NWor6nirYJXM+Nl+0UecxmnhSSSgn6aNi5+M4pKe65EkKAQZZ2sVANbYLCxM/nw40WY93YWSPqLSvKLeubP3+o= 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=ttrkV99W; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IdhlVyWN; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ttrkV99W; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=IdhlVyWN; 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="ttrkV99W"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IdhlVyWN"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ttrkV99W"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="IdhlVyWN" 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 DEC611FFC7; Tue, 20 Aug 2024 09:35:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146500; 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=12WOr2Ic7YY7MSE30hYZeg06cAskBzKrUPGQ1N0jNZ0=; b=ttrkV99WAkowS1AsPbapvlTuUEEKyTKMNk6mZmDEEI1C5LsqVM5U8Ixfd892DU6sIo77ZX s5FEMIEAaLDpUs1tKE3KLsuF31rEatNvLOXufuwDPOCpvixno2enIv74Jv+xEMbheB7Pyx pfbIPQv5Dy9I6cKmKNqmKMXRQYIUDdM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146500; 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=12WOr2Ic7YY7MSE30hYZeg06cAskBzKrUPGQ1N0jNZ0=; b=IdhlVyWNn4Bwt9UqkZ++PX9SML1oiwTb477Bb5K/W0subaHSv1P5rq6kSOkENgfu1EPC7f mbTUCZS2MpxOTmBg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=ttrkV99W; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=IdhlVyWN DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146500; 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=12WOr2Ic7YY7MSE30hYZeg06cAskBzKrUPGQ1N0jNZ0=; b=ttrkV99WAkowS1AsPbapvlTuUEEKyTKMNk6mZmDEEI1C5LsqVM5U8Ixfd892DU6sIo77ZX s5FEMIEAaLDpUs1tKE3KLsuF31rEatNvLOXufuwDPOCpvixno2enIv74Jv+xEMbheB7Pyx pfbIPQv5Dy9I6cKmKNqmKMXRQYIUDdM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146500; 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=12WOr2Ic7YY7MSE30hYZeg06cAskBzKrUPGQ1N0jNZ0=; b=IdhlVyWNn4Bwt9UqkZ++PX9SML1oiwTb477Bb5K/W0subaHSv1P5rq6kSOkENgfu1EPC7f mbTUCZS2MpxOTmBg== 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 81C6013AFE; Tue, 20 Aug 2024 09:35:00 +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 0MN6HkRjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:00 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 03/28] backlight: lcd: Add LCD_POWER_ constants for power states Date: Tue, 20 Aug 2024 11:22:41 +0200 Message-ID: <20240820093452.68270-4-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: DEC611FFC7 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Duplicate FB_BLANK_ constants as LCD_POWER_ constants in the lcd header file. Allows lcd drivers to avoid including the fbdev header file and removes a compile-time dependency between the two subsystems. The new LCD_POWER_ constants have the same values as their FB_BLANK_ counterparts. Hence semantics does not change and the lcd drivers can be converted one by one. Each instance of FB_BLANK_UNBLANK becomes LCD_POWER_ON, each of FB_BLANK_POWERDOWN becomes LCD_POWER_OFF, FB_BLANK_NORMAL becomes LCD_POWER_REDUCED and FB_BLANK_VSYNC_SUSPEND becomes LCD_POWER_REDUCED_VSYNC_SUSPEND. Lcd code or drivers do not use FB_BLANK_HSYNC_SUSPEND, so no new constants for this is being added. The tokens LCD_POWER_REDUCED and LCD_POWER_REDUCED_VSYNC_SUSPEND are deprecated and drivers should replace them with LCD_POWER_ON and LCD_POWER_OFF. See also commit a1cacb8a8e70 ("backlight: Add BACKLIGHT_POWER_ constants for power states"), which added similar constants fro backlight drivers. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lcd.c | 22 +++++++++++++++++++++- include/linux/lcd.h | 5 +++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 43a6752ec27f..edd5ccb7a43a 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -20,6 +20,24 @@ #if defined(CONFIG_FB) || (defined(CONFIG_FB_MODULE) && \ defined(CONFIG_LCD_CLASS_DEVICE_MODULE)) +static int to_lcd_power(int fb_blank) +{ + switch (fb_blank) { + case FB_BLANK_UNBLANK: + return LCD_POWER_ON; + /* deprecated; TODO: should become 'off' */ + case FB_BLANK_NORMAL: + return LCD_POWER_REDUCED; + case FB_BLANK_VSYNC_SUSPEND: + return LCD_POWER_REDUCED_VSYNC_SUSPEND; + /* 'off' */ + case FB_BLANK_HSYNC_SUSPEND: + case FB_BLANK_POWERDOWN: + default: + return LCD_POWER_OFF; + } +} + /* This callback gets called when something important happens inside a * framebuffer driver. We're looking if that important event is blanking, * and if it is, we're switching lcd power as well ... @@ -43,8 +61,10 @@ static int fb_notifier_callback(struct notifier_block *self, goto out; if (event == FB_EVENT_BLANK) { + int power = to_lcd_power(*(int *)evdata->data); + if (ld->ops->set_power) - ld->ops->set_power(ld, *(int *)evdata->data); + ld->ops->set_power(ld, power); } else { if (ld->ops->set_mode) ld->ops->set_mode(ld, evdata->data); diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 68703a51dc53..dfcc54d327f5 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -14,6 +14,11 @@ #include #include +#define LCD_POWER_ON (0) +#define LCD_POWER_REDUCED (1) // deprecated; don't use in new code +#define LCD_POWER_REDUCED_VSYNC_SUSPEND (2) // deprecated; don't use in new code +#define LCD_POWER_OFF (4) + /* Notes on locking: * * lcd_device->ops_lock is an internal backlight lock protecting the ops From patchwork Tue Aug 20 09:22:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769694 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 5D0B318C03A; Tue, 20 Aug 2024 09:35:03 +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=1724146505; cv=none; b=RdrL+GmK/zG27uaK9OuYmgjPnlr8/Mdv7Bw9YyXEh2djNmE4BoRKYlRqa0mRPIXTCiX9AEm4wdZjXSmsNZaf1XK3DhxlExAKDNlSbUbxZUVMUqqG58zbhkGAatL2Lq0K0EQW0Uoi0SjiW5wwym/fgNvjD6NuEc9G3SjPjfcsMa0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146505; c=relaxed/simple; bh=zwTqRzqpTVRe+7T2EeH4gb/ECL5IzfVFuQtaj2mE3u8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=biBfLcVFr2k4H+W73h1eswJ/gwNDKANzhyTq56WD+pAw20n1pYnuYiAj7C+Vtb/fd5gKz+7wg/GX8M1JBv120hRnkopwVVhWE3YQayiR4FyRo1lfq/R4b/9tuyZDewjvwRElzREV4T0Pmj5+QJ24Xy4/oUNlZXb9n3PGz1Ag+20= 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=aoDWDqjR; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UkFUG//u; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=aoDWDqjR; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UkFUG//u; 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="aoDWDqjR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UkFUG//u"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="aoDWDqjR"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UkFUG//u" 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 51497224AC; Tue, 20 Aug 2024 09:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146501; 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=eGZ+ViguUmUpMrae3BhjsSznkdXVFzEDIrQ+3tfdhD0=; b=aoDWDqjRWIeUII8IfE9ROjhSVnf7FQJHUeLpL31lJFacEzlmnXVbpOQ8Qe3dTx3j+Wl2lo HjeDLL6rzNHJQjj4sS4mtWigkwdsWTp21oKIfuUQotTDmZaPuRlNuFMbMNbkCQ9xQVYxri N4V9fVbPbR8pN2Kn62IRtfuDsot0ZMY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146501; 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=eGZ+ViguUmUpMrae3BhjsSznkdXVFzEDIrQ+3tfdhD0=; b=UkFUG//ub26wG9UlNLN50ue3G5FM0BeNeQkuP1rI34pDvQsfiUC0Hbx2bmko2Z+IOURScW P33pIwmYNGlRVZCg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=aoDWDqjR; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b="UkFUG//u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146501; 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=eGZ+ViguUmUpMrae3BhjsSznkdXVFzEDIrQ+3tfdhD0=; b=aoDWDqjRWIeUII8IfE9ROjhSVnf7FQJHUeLpL31lJFacEzlmnXVbpOQ8Qe3dTx3j+Wl2lo HjeDLL6rzNHJQjj4sS4mtWigkwdsWTp21oKIfuUQotTDmZaPuRlNuFMbMNbkCQ9xQVYxri N4V9fVbPbR8pN2Kn62IRtfuDsot0ZMY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146501; 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=eGZ+ViguUmUpMrae3BhjsSznkdXVFzEDIrQ+3tfdhD0=; b=UkFUG//ub26wG9UlNLN50ue3G5FM0BeNeQkuP1rI34pDvQsfiUC0Hbx2bmko2Z+IOURScW P33pIwmYNGlRVZCg== 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 E418413770; Tue, 20 Aug 2024 09:35:00 +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 4Nd/NkRjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:00 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 04/28] backlight: corgi_lcd: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:42 +0200 Message-ID: <20240820093452.68270-5-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 51497224AC X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/corgi_lcd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index e4fcfbe38dc6..35c3fd3281ca 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c @@ -24,7 +24,7 @@ #include #include -#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) +#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) /* Register Addresses */ #define RESCTL_ADRS 0x00 @@ -455,7 +455,7 @@ static int corgi_lcd_suspend(struct device *dev) corgibl_flags |= CORGIBL_SUSPENDED; corgi_bl_set_intensity(lcd, 0); - corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_POWERDOWN); + corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF); return 0; } @@ -464,7 +464,7 @@ static int corgi_lcd_resume(struct device *dev) struct corgi_lcd *lcd = dev_get_drvdata(dev); corgibl_flags &= ~CORGIBL_SUSPENDED; - corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK); + corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON); backlight_update_status(lcd->bl_dev); return 0; } @@ -513,7 +513,7 @@ static int corgi_lcd_probe(struct spi_device *spi) if (IS_ERR(lcd->lcd_dev)) return PTR_ERR(lcd->lcd_dev); - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = LCD_POWER_OFF; lcd->mode = (pdata) ? pdata->init_mode : CORGI_LCD_MODE_VGA; memset(&props, 0, sizeof(struct backlight_properties)); @@ -535,7 +535,7 @@ static int corgi_lcd_probe(struct spi_device *spi) lcd->kick_battery = pdata->kick_battery; spi_set_drvdata(spi, lcd); - corgi_lcd_set_power(lcd->lcd_dev, FB_BLANK_UNBLANK); + corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_ON); backlight_update_status(lcd->bl_dev); lcd->limit_mask = pdata->limit_mask; @@ -550,7 +550,7 @@ static void corgi_lcd_remove(struct spi_device *spi) 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); + corgi_lcd_set_power(lcd->lcd_dev, LCD_POWER_OFF); } static struct spi_driver corgi_lcd_driver = { From patchwork Tue Aug 20 09:22:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769693 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 696AF18A952; Tue, 20 Aug 2024 09:35:03 +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=1724146504; cv=none; b=KgrYt9UENxo2MD6ncKoaQiGrTG3ow1e705On06XTa9ErsztL5mM1Yf8Yf/mLmJJm3kZQdU59GZPbb4/ueABh+miShvTPAflhgcsvd+qT69PoXkJmdjWx1xbCxckkjmww8VwND558BGMC/EZV0bOJzQr7cxtrkW6ycwLUqexmETo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146504; c=relaxed/simple; bh=a4j/zCB3LonyNSm1Cg1mFxOXAPFIuLS4h9WLwIG776Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=PT4ifmjOFk1K3jhye+E0qS1+sfOr5h3sqpiogk74BjiLfTCwyDOsZvREwU6fYTttmprr9O5tzy+FmVW2xW3674OOgpZOHY5OJVDhX4XI4wgx1oMI8Q1+bw7u2gGlu+BbrthKA65DP+woe3Uun60Pouuw6OqLcACx81Ih5jA2W1A= 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=zBzdtIw/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=lT2X/hq/; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zBzdtIw/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=lT2X/hq/; 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="zBzdtIw/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lT2X/hq/"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zBzdtIw/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lT2X/hq/" 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 C097D224E2; Tue, 20 Aug 2024 09:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146501; 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=C8RjHLtGUGznPny8uWoKkT9lDQHyybnApAofaOhEFU8=; b=zBzdtIw/LgmpKa0bGvkeIE8osCuZoYVUUirjDSDWRjBbCTCLxHB/v/vdVq8FPBYwKR9o87 7ACmVIobNjH3MmHNx24BaFY9LQt29bCG1fOz7w3m4tPCOZCTTmmAY92nI4lH5UMT+yimIp B6inVpT5GDgsC6ZCdP16m/wzP1Mq7rM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146501; 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=C8RjHLtGUGznPny8uWoKkT9lDQHyybnApAofaOhEFU8=; b=lT2X/hq/EGGlF5zA0drE03IEBpMpfBqUbY/YvnvZ49HkumYMFzy8p57uR9IQnHGV/bM5gi 6bEVIoEfZ5UROLAA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146501; 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=C8RjHLtGUGznPny8uWoKkT9lDQHyybnApAofaOhEFU8=; b=zBzdtIw/LgmpKa0bGvkeIE8osCuZoYVUUirjDSDWRjBbCTCLxHB/v/vdVq8FPBYwKR9o87 7ACmVIobNjH3MmHNx24BaFY9LQt29bCG1fOz7w3m4tPCOZCTTmmAY92nI4lH5UMT+yimIp B6inVpT5GDgsC6ZCdP16m/wzP1Mq7rM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146501; 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=C8RjHLtGUGznPny8uWoKkT9lDQHyybnApAofaOhEFU8=; b=lT2X/hq/EGGlF5zA0drE03IEBpMpfBqUbY/YvnvZ49HkumYMFzy8p57uR9IQnHGV/bM5gi 6bEVIoEfZ5UROLAA== 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 5782513AFE; Tue, 20 Aug 2024 09:35:01 +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 yE4qFEVjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:01 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 05/28] backlight: hx8357: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:43 +0200 Message-ID: <20240820093452.68270-6-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/hx8357.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c index cdd7b7686723..61a57d38700f 100644 --- a/drivers/video/backlight/hx8357.c +++ b/drivers/video/backlight/hx8357.c @@ -532,7 +532,7 @@ static int hx8369_lcd_init(struct lcd_device *lcdev) return 0; } -#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) +#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) static int hx8357_set_power(struct lcd_device *lcdev, int power) { From patchwork Tue Aug 20 09:22:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769695 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 2FD9418C32D; Tue, 20 Aug 2024 09:35:03 +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=1724146505; cv=none; b=dajjrnM4pOL1C1a/wUHz1GUWh6N9uBN39p1yGZzvJfvkug92uSjas4QdmgD3GuPl1ZlWvscRZsXDfy9s59s4OJ3yWGOLDMCHYKec1TYd5+j10wTrcXeCziS+9dGKIKQAroxUGPsW5hWmDnIzEx4HVMI1DCYhuqLqnI8kvr+Po68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146505; c=relaxed/simple; bh=Jlpm9S34M0xnhFy9Nc5mC+t/j1LqE8WtCccH0R0auMQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KRRROZMKhsEf9gKxdMwNaBLM9FlgYeddZVKxZviSI5SwgqoVClqjqHeZlgSXUC25teRsSjO/OSVLBqdMF5/X6/cYFdjD31s1HN6zx8Ber5MlwgrchvhI2f48z8hyaFNIdLEV1gBym/OxTLrXcn0nbklMf3P5rIaKQJzf5ZREJdU= 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=Q0zFiOh6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6WSGggca; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Q0zFiOh6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=6WSGggca; 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="Q0zFiOh6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6WSGggca"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Q0zFiOh6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="6WSGggca" 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 330CB2257F; Tue, 20 Aug 2024 09:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146502; 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=qGuoG0grcL5zeyINwuFzsAdWI0SDH5KECH5wbmGURFQ=; b=Q0zFiOh6tCoA0Ysf7ZzpQYtqS6kjjzDxZhnx8LxVZFw7kELKn7Rm8tScBxY3dFiez/jb5Q 5ezjs88hRvjvvCJAljWux2mizBCFHnEXG0taH3GvOW/s4zzz6g1r/awASy0C2OMk2KLKIP JJAeSBCEB7wO+Io4UQL7fkLzT89/Y0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146502; 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=qGuoG0grcL5zeyINwuFzsAdWI0SDH5KECH5wbmGURFQ=; b=6WSGggcaxsHoSH9BHBYH//Lqi9a3u2ACPOGHEa+fX1fE+1EvHbNFqW4g12IGs4R7WDJ9w9 4J1K0oIvm81bd/BQ== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146502; 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=qGuoG0grcL5zeyINwuFzsAdWI0SDH5KECH5wbmGURFQ=; b=Q0zFiOh6tCoA0Ysf7ZzpQYtqS6kjjzDxZhnx8LxVZFw7kELKn7Rm8tScBxY3dFiez/jb5Q 5ezjs88hRvjvvCJAljWux2mizBCFHnEXG0taH3GvOW/s4zzz6g1r/awASy0C2OMk2KLKIP JJAeSBCEB7wO+Io4UQL7fkLzT89/Y0Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146502; 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=qGuoG0grcL5zeyINwuFzsAdWI0SDH5KECH5wbmGURFQ=; b=6WSGggcaxsHoSH9BHBYH//Lqi9a3u2ACPOGHEa+fX1fE+1EvHbNFqW4g12IGs4R7WDJ9w9 4J1K0oIvm81bd/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 C85A313770; Tue, 20 Aug 2024 09:35:01 +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 YENkL0VjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:01 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 06/28] backlight: ili922x: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:44 +0200 Message-ID: <20240820093452.68270-7-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/ili922x.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/ili922x.c b/drivers/video/backlight/ili922x.c index 7683e209ad6b..5e1bf0c5831f 100644 --- a/drivers/video/backlight/ili922x.c +++ b/drivers/video/backlight/ili922x.c @@ -8,7 +8,6 @@ * memory is cyclically updated over the RGB interface. */ -#include #include #include #include @@ -119,7 +118,7 @@ #define CMD_BUFSIZE 16 -#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) +#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) #define set_tx_byte(b) (tx_invert ? ~(b) : b) @@ -513,7 +512,7 @@ static int ili922x_probe(struct spi_device *spi) ili922x_display_init(spi); - ili->power = FB_BLANK_POWERDOWN; + ili->power = LCD_POWER_OFF; lcd = devm_lcd_device_register(&spi->dev, "ili922xlcd", &spi->dev, ili, &ili922x_ops); @@ -525,7 +524,7 @@ static int ili922x_probe(struct spi_device *spi) ili->ld = lcd; spi_set_drvdata(spi, ili); - ili922x_lcd_power(ili, FB_BLANK_UNBLANK); + ili922x_lcd_power(ili, LCD_POWER_ON); return 0; } From patchwork Tue Aug 20 09:22:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769696 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 69E8E18C335; Tue, 20 Aug 2024 09:35:04 +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=1724146506; cv=none; b=dkjslEOtB7ajjDEsAOillUDUh2GxDnwAPXWa0KsXuz1BIMHJnXNpfRS0iWeD9OGBJqEFEIG51LpZKzV+aEQzn7+5zwJp+tMwOmi18yNJSJLc2n7iNwOonCmcbYCD/SjgObqObh1BySHpsiYaaspagG5ijya/9yJ31QeJdit6s3I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146506; c=relaxed/simple; bh=3t1KncPrzEQCETO5Dcpf/FWeTV1oUjF8e+F4DUCsZls=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qMNsnFef8DDtsw7UbYqcEWl0nCdcZA4ZYNulZGw1DRiWhgO41Gg8ij+glQGGiFFnmFRVpwDaEpvLOFxC2Ud6BUfh5+7OoEKwUBgBFotH3k4ZgEoEw39FFf4XU3/uKlqSTROnRZ/DUOEeWCf9END/dehkVKCOQyWKxi54hcZS550= 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=tucuGKcX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BjGrD95e; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=tucuGKcX; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=BjGrD95e; 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="tucuGKcX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BjGrD95e"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="tucuGKcX"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="BjGrD95e" 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 9E8912253C; Tue, 20 Aug 2024 09:35:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146502; 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=Vc0oSdYwNPuT4YePHAttBkJ8X8lZEvKJKOd984+7yMM=; b=tucuGKcX5yp6tfDMyqH97Y9EfM4+x04bSRtvhp4T8bfPQ82JH0wAmK4BZ61vuc1XuNleaU WelL4QDBFMP2PuHgKrseyNXOVPMQrAaj9SXW/aWyWQLfjnkS6lNHP6do3fZBE03Mkg1h/D psZemsG98g7iZwor6O0RV3A6LM1tyoU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146502; 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=Vc0oSdYwNPuT4YePHAttBkJ8X8lZEvKJKOd984+7yMM=; b=BjGrD95e7NN1DR4VUsMyiR5Du7aoIIWU0CMrqEMgmvy4rpWjKa1pKPudPHJQzQm+EHz+td fqr/P30HvMdzvbDw== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146502; 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=Vc0oSdYwNPuT4YePHAttBkJ8X8lZEvKJKOd984+7yMM=; b=tucuGKcX5yp6tfDMyqH97Y9EfM4+x04bSRtvhp4T8bfPQ82JH0wAmK4BZ61vuc1XuNleaU WelL4QDBFMP2PuHgKrseyNXOVPMQrAaj9SXW/aWyWQLfjnkS6lNHP6do3fZBE03Mkg1h/D psZemsG98g7iZwor6O0RV3A6LM1tyoU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146502; 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=Vc0oSdYwNPuT4YePHAttBkJ8X8lZEvKJKOd984+7yMM=; b=BjGrD95e7NN1DR4VUsMyiR5Du7aoIIWU0CMrqEMgmvy4rpWjKa1pKPudPHJQzQm+EHz+td fqr/P30HvMdzvbDw== 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 38BC113AFE; Tue, 20 Aug 2024 09:35:02 +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 aFWaDEZjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:02 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 07/28] backlight: ili9320: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:45 +0200 Message-ID: <20240820093452.68270-8-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/ili9320.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/video/backlight/ili9320.c b/drivers/video/backlight/ili9320.c index 3e318d1891b6..2df96a882119 100644 --- a/drivers/video/backlight/ili9320.c +++ b/drivers/video/backlight/ili9320.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -121,7 +120,7 @@ static inline int ili9320_power_off(struct ili9320 *lcd) return 0; } -#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) +#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) static int ili9320_power(struct ili9320 *lcd, int power) { @@ -223,7 +222,7 @@ int ili9320_probe_spi(struct spi_device *spi, ili->dev = dev; ili->client = client; - ili->power = FB_BLANK_POWERDOWN; + ili->power = LCD_POWER_OFF; ili->platdata = cfg; spi_set_drvdata(spi, ili); @@ -241,7 +240,7 @@ int ili9320_probe_spi(struct spi_device *spi, dev_info(dev, "initialising %s\n", client->name); - ret = ili9320_power(ili, FB_BLANK_UNBLANK); + ret = ili9320_power(ili, LCD_POWER_ON); if (ret != 0) { dev_err(dev, "failed to set lcd power state\n"); return ret; @@ -253,7 +252,7 @@ EXPORT_SYMBOL_GPL(ili9320_probe_spi); void ili9320_remove(struct ili9320 *ili) { - ili9320_power(ili, FB_BLANK_POWERDOWN); + ili9320_power(ili, LCD_POWER_OFF); } EXPORT_SYMBOL_GPL(ili9320_remove); @@ -262,7 +261,7 @@ int ili9320_suspend(struct ili9320 *lcd) { int ret; - ret = ili9320_power(lcd, FB_BLANK_POWERDOWN); + ret = ili9320_power(lcd, LCD_POWER_OFF); if (lcd->platdata->suspend == ILI9320_SUSPEND_DEEP) { ili9320_write(lcd, ILI9320_POWER1, lcd->power1 | @@ -282,7 +281,7 @@ int ili9320_resume(struct ili9320 *lcd) if (lcd->platdata->suspend == ILI9320_SUSPEND_DEEP) ili9320_write(lcd, ILI9320_POWER1, 0x00); - return ili9320_power(lcd, FB_BLANK_UNBLANK); + return ili9320_power(lcd, LCD_POWER_ON); } EXPORT_SYMBOL_GPL(ili9320_resume); #endif @@ -290,7 +289,7 @@ EXPORT_SYMBOL_GPL(ili9320_resume); /* Power down all displays on reboot, poweroff or halt */ void ili9320_shutdown(struct ili9320 *lcd) { - ili9320_power(lcd, FB_BLANK_POWERDOWN); + ili9320_power(lcd, LCD_POWER_OFF); } EXPORT_SYMBOL_GPL(ili9320_shutdown); From patchwork Tue Aug 20 09:22:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769698 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 BBD0E18C324; Tue, 20 Aug 2024 09:35:05 +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=1724146507; cv=none; b=sIFLXoMkkKkCdcVdelDCOVUAuK6LI+cw27TMtdfPtmd/Xgo0uIGoFZ84NqUSiTloi9dsO/876XODWpdssNNaVJLer8eGpntVP9FBqv+jt0VkJupxOH7vntiDm0hsx2JGeAGd1ctu8DCSwjX4Sj1vnL7y9KBuxSvvbHfBg42Ahqg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146507; c=relaxed/simple; bh=yh4aVLCRXBVEwAKEww3sQVXtItNOblCjVBhWK1cXGSg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qaDdaP0hgigRiqqtXlkCrPuHATeMPR+enBI4I5syEDncVQmKw8IhLUGiuPHPV616FrdUEa6WuqTZjWVzFHWC39r03SU9du4EpUUZmBAFW7Q0/8qqpvZCRLw+bhCOVT27KL2NrqD1DHyCIQdb5ISto1ec65DwcGrGRlLlVWAklk4= 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=1ohjI5pi; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=lRGDdloL; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=1ohjI5pi; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=lRGDdloL; 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="1ohjI5pi"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lRGDdloL"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="1ohjI5pi"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lRGDdloL" 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 1C915225A0; Tue, 20 Aug 2024 09:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146503; 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=9VBuhFWDmP89amXM5eVckHRfabPXS0JZBp6E7kbYxIw=; b=1ohjI5piOBDtuKQvJLBkhYrpP4S2XY6H0VxmS8Owpx0sO3KmozavL5CflWMWB/dCcr80IU 0miFQrvOMYfvL4T93PvqMaDvxGgyqx2t8d4VRuUfaDD1Z8Lex4+A9zif2iOFgSK39CvVQT Xjwsno4t9OuCgetulJz77hwtT7envtU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146503; 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=9VBuhFWDmP89amXM5eVckHRfabPXS0JZBp6E7kbYxIw=; b=lRGDdloL5LfjeNbVAxOKNojd9gAli/IOTQotlwTA6YN7CiJANMgfecm4v4/R5huKkm1Z6c fEVfP+GKGQKOu5BQ== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=1ohjI5pi; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=lRGDdloL DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146503; 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=9VBuhFWDmP89amXM5eVckHRfabPXS0JZBp6E7kbYxIw=; b=1ohjI5piOBDtuKQvJLBkhYrpP4S2XY6H0VxmS8Owpx0sO3KmozavL5CflWMWB/dCcr80IU 0miFQrvOMYfvL4T93PvqMaDvxGgyqx2t8d4VRuUfaDD1Z8Lex4+A9zif2iOFgSK39CvVQT Xjwsno4t9OuCgetulJz77hwtT7envtU= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146503; 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=9VBuhFWDmP89amXM5eVckHRfabPXS0JZBp6E7kbYxIw=; b=lRGDdloL5LfjeNbVAxOKNojd9gAli/IOTQotlwTA6YN7CiJANMgfecm4v4/R5huKkm1Z6c fEVfP+GKGQKOu5BQ== 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 A45D313770; Tue, 20 Aug 2024 09:35:02 +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 ONvjJkZjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:02 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 08/28] backlight: jornada720_lcd: Include for IOMEM() macro Date: Tue, 20 Aug 2024 11:22:46 +0200 Message-ID: <20240820093452.68270-9-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 1C915225A0 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Avoids the proxy include via . Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/jornada720_lcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c index 5c64fa61e810..73278f6ace64 100644 --- a/drivers/video/backlight/jornada720_lcd.c +++ b/drivers/video/backlight/jornada720_lcd.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include From patchwork Tue Aug 20 09:22:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769697 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 34A1C18C348; Tue, 20 Aug 2024 09:35:05 +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=1724146506; cv=none; b=UKRci/SLfukP1kyxp95NT7jAwTYPveEslHbZGVDcV95jqyt+pxXnow1wPdYmZLB+WVxpfzqzzgxTLtf192pusbbHkceawiJ7FH1yoMobPenO+0Wk/Ty04vTV6wuEWXuu+lbskRmZwXwIU8bxozN5TQ1XIJ9fUM6bTVckEcOErs8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146506; c=relaxed/simple; bh=I6H5qPfuHX3+llqg+7c+q1Vtpf9vbBr1YkjJcM2ahDw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=cU3Fc7SrOSIlCmUexcHYaV6Mo/wDr6meuhws4B97P2dEJZK7WriE4SwCaF2rCqnh22LhSWjfPqZxKJzuCQsYZ+sX8nSJ1yugFJ93ApzzcMnjopsOGyM/CkfJpQSMgrpLqTWczxiTA4oSlU5nSWDaCv3ro4Ku7IqoGXCe5YuCTxc= 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=0LFYL42A; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=1lt4Ib6M; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0LFYL42A; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=1lt4Ib6M; 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="0LFYL42A"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1lt4Ib6M"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0LFYL42A"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1lt4Ib6M" 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 81F691FFCB; Tue, 20 Aug 2024 09:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146503; 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=51r7acza8wHc05J64PIX5ANoj2cb6ZBtIfWBALg7ASc=; b=0LFYL42AwZL7KdMpoSzY9fYkah3lJjaRpu+xqAi5h3JR+xi1SoNDnOG3T5LPhzZWKUyeoG e5RHUW5RDGYLZksTPLv2M+WG39OgxmU2r9660r5+WXoehg10SA686ScHVTjCpbglwqTyNY Nj+79NK4OiILKZGpHuPnlcUlFgipBTw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146503; 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=51r7acza8wHc05J64PIX5ANoj2cb6ZBtIfWBALg7ASc=; b=1lt4Ib6MgG7IhcFnRR851TWdCxIo6xsx8oNfjvO1/Ky/9XKB4NylESlLOBVmdfPk0IuEcg VYZK6Km4sQWBy6Dg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146503; 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=51r7acza8wHc05J64PIX5ANoj2cb6ZBtIfWBALg7ASc=; b=0LFYL42AwZL7KdMpoSzY9fYkah3lJjaRpu+xqAi5h3JR+xi1SoNDnOG3T5LPhzZWKUyeoG e5RHUW5RDGYLZksTPLv2M+WG39OgxmU2r9660r5+WXoehg10SA686ScHVTjCpbglwqTyNY Nj+79NK4OiILKZGpHuPnlcUlFgipBTw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146503; 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=51r7acza8wHc05J64PIX5ANoj2cb6ZBtIfWBALg7ASc=; b=1lt4Ib6MgG7IhcFnRR851TWdCxIo6xsx8oNfjvO1/Ky/9XKB4NylESlLOBVmdfPk0IuEcg VYZK6Km4sQWBy6Dg== 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 2218213AFE; Tue, 20 Aug 2024 09:35:03 +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 yNUjB0djxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:03 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 09/28] backlight: jornada720_lcd: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:47 +0200 Message-ID: <20240820093452.68270-10-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; 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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/jornada720_lcd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c index 73278f6ace64..31a52dee9060 100644 --- a/drivers/video/backlight/jornada720_lcd.c +++ b/drivers/video/backlight/jornada720_lcd.c @@ -6,7 +6,6 @@ */ #include -#include #include #include #include @@ -24,14 +23,14 @@ static int jornada_lcd_get_power(struct lcd_device *ld) { - return PPSR & PPC_LDD2 ? FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN; + return PPSR & PPC_LDD2 ? LCD_POWER_ON : LCD_POWER_OFF; } static int jornada_lcd_get_contrast(struct lcd_device *ld) { int ret; - if (jornada_lcd_get_power(ld) != FB_BLANK_UNBLANK) + if (jornada_lcd_get_power(ld) != LCD_POWER_ON) return 0; jornada_ssp_start(); @@ -72,7 +71,7 @@ static int jornada_lcd_set_contrast(struct lcd_device *ld, int value) static int jornada_lcd_set_power(struct lcd_device *ld, int power) { - if (power != FB_BLANK_UNBLANK) { + if (power != LCD_POWER_ON) { PPSR &= ~PPC_LDD2; PPDR |= PPC_LDD2; } else { @@ -107,7 +106,7 @@ static int jornada_lcd_probe(struct platform_device *pdev) /* lets set our default values */ jornada_lcd_set_contrast(lcd_device, LCD_DEF_CONTRAST); - jornada_lcd_set_power(lcd_device, FB_BLANK_UNBLANK); + jornada_lcd_set_power(lcd_device, LCD_POWER_ON); /* give it some time to startup */ msleep(100); From patchwork Tue Aug 20 09:22:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769699 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 B304818A952; Tue, 20 Aug 2024 09:35:05 +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=1724146507; cv=none; b=GJSvVbaBWfNfz9KcFWH86iHfrw2tK5SMnc6pt86o/VCQx6QR6ZXG/k2fXaHV6sw23Xb4o7O8oPKWuyeH0vXm3MtFD5n1T2tHVTC+mangyAZx4SBTGHwML94bsIUKw2canayXW7K6kRBYAjjBrNv9E8VrfYkUrRzeAgWQN9Oawu8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146507; c=relaxed/simple; bh=b6cexZNe2/ptChvLO54l5aw8Lu8BNz6QbG+lsRTGJAU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pheIa34NQcOFrMAQwWWhLtc3G/BeGcBe8slJn9JM5nBtUcis2XwdL7UyAqiBG8+GDXlR542wKMf0c7BOyyO7FIF618gmoAoIP50nzyjQPqVqrTPbP70V4BYf/n4hQZwYoQTfo0VGDlEsqWtVE+mcjPMDdzs2horf8Dl0KBnUh5A= 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=CmdJTkjV; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ehkrBKf2; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=VrnH5eF6; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=KSBV65o8; 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="CmdJTkjV"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ehkrBKf2"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VrnH5eF6"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="KSBV65o8" 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 E2BE51FFCC; Tue, 20 Aug 2024 09:35:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146504; 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=t0T2kwmTQqz3SW/2uupIOOVDm1drAWUI9+jqkQEb1Vg=; b=CmdJTkjVYXsJS0DhS6SgQ8jOnB+WARfLwv0Z4bjs2T46Wahu/sjO4+XEpirdSK45wR/Lpe zvcg/6jnigqm7zXseJynLFkYqJsS8TOi1ArFazOLTEq58ZXt4kELBkzDGd217Mdbd9SZCB vX9QyEAZ7t1dGnyX2idw4MAVtW1RpBE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146504; 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=t0T2kwmTQqz3SW/2uupIOOVDm1drAWUI9+jqkQEb1Vg=; b=ehkrBKf2n9ncC8RMFdc0FjV9RTsRo9Wk5ItDE0AABvTgAudKadcpc+nWdooaxif47XLsTn uwjeEfjMT3gS8YAQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=VrnH5eF6; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=KSBV65o8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146503; 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=t0T2kwmTQqz3SW/2uupIOOVDm1drAWUI9+jqkQEb1Vg=; b=VrnH5eF6kkHVv4xsVJqgTvOLcg37GsaH9wDrywsIKyrIWTFQjrhtaiu/qZNXqDBf68A+46 uv09t/tYKxwhtZkVh2xlS+JqH8rfD2TaTN/rGbKCpOt4UmPsOPqZoorIH8s6n5L80YXR+x emAZKulhdfReomK32SZO7jaPe9xENdI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146503; 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=t0T2kwmTQqz3SW/2uupIOOVDm1drAWUI9+jqkQEb1Vg=; b=KSBV65o8F1+Y2K7o7ri7lTgz9c2U9ylAo2icZe2fF1lFRC2VecoxWA/iamGzui4M3SNl70 MD+LrgffBzg1tyAQ== 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 8790213770; Tue, 20 Aug 2024 09:35:03 +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 mOveH0djxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:03 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 10/28] backlight: l4f00242t03: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:48 +0200 Message-ID: <20240820093452.68270-11-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: E2BE51FFCC X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/l4f00242t03.c | 32 +++++++++++++-------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c index dd0874f8c7ff..5b5887607f16 100644 --- a/drivers/video/backlight/l4f00242t03.c +++ b/drivers/video/backlight/l4f00242t03.c @@ -112,40 +112,40 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power) const u16 slpin = 0x10; const u16 disoff = 0x28; - if (power <= FB_BLANK_NORMAL) { - if (priv->lcd_state <= FB_BLANK_NORMAL) { + if (power <= LCD_POWER_REDUCED) { + if (priv->lcd_state <= LCD_POWER_REDUCED) { /* Do nothing, the LCD is running */ - } else if (priv->lcd_state < FB_BLANK_POWERDOWN) { + } else if (priv->lcd_state < LCD_POWER_OFF) { dev_dbg(&spi->dev, "Resuming LCD\n"); spi_write(spi, (const u8 *)&slpout, sizeof(u16)); msleep(60); spi_write(spi, (const u8 *)&dison, sizeof(u16)); } else { - /* priv->lcd_state == FB_BLANK_POWERDOWN */ + /* priv->lcd_state == LCD_POWER_OFF */ l4f00242t03_lcd_init(spi); - priv->lcd_state = FB_BLANK_VSYNC_SUSPEND; + priv->lcd_state = LCD_POWER_REDUCED_VSYNC_SUSPEND; l4f00242t03_lcd_power_set(priv->ld, power); } - } else if (power < FB_BLANK_POWERDOWN) { - if (priv->lcd_state <= FB_BLANK_NORMAL) { + } else if (power < LCD_POWER_OFF) { + if (priv->lcd_state <= LCD_POWER_REDUCED) { /* Send the display in standby */ dev_dbg(&spi->dev, "Standby the LCD\n"); spi_write(spi, (const u8 *)&disoff, sizeof(u16)); msleep(60); spi_write(spi, (const u8 *)&slpin, sizeof(u16)); - } else if (priv->lcd_state < FB_BLANK_POWERDOWN) { + } else if (priv->lcd_state < LCD_POWER_OFF) { /* Do nothing, the LCD is already in standby */ } else { - /* priv->lcd_state == FB_BLANK_POWERDOWN */ + /* priv->lcd_state == LCD_POWER_OFF */ l4f00242t03_lcd_init(spi); - priv->lcd_state = FB_BLANK_UNBLANK; + priv->lcd_state = LCD_POWER_ON; l4f00242t03_lcd_power_set(ld, power); } } else { - /* power == FB_BLANK_POWERDOWN */ - if (priv->lcd_state != FB_BLANK_POWERDOWN) { + /* power == LCD_POWER_OFF */ + if (priv->lcd_state != LCD_POWER_OFF) { /* Clear the screen before shutting down */ spi_write(spi, (const u8 *)&disoff, sizeof(u16)); msleep(60); @@ -209,8 +209,8 @@ static int l4f00242t03_probe(struct spi_device *spi) /* Init the LCD */ l4f00242t03_lcd_init(spi); - priv->lcd_state = FB_BLANK_VSYNC_SUSPEND; - l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_UNBLANK); + priv->lcd_state = LCD_POWER_REDUCED_VSYNC_SUSPEND; + l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_ON); dev_info(&spi->dev, "Epson l4f00242t03 lcd probed.\n"); @@ -221,7 +221,7 @@ static void l4f00242t03_remove(struct spi_device *spi) { struct l4f00242t03_priv *priv = spi_get_drvdata(spi); - l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN); + l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_OFF); } static void l4f00242t03_shutdown(struct spi_device *spi) @@ -229,7 +229,7 @@ static void l4f00242t03_shutdown(struct spi_device *spi) struct l4f00242t03_priv *priv = spi_get_drvdata(spi); if (priv) - l4f00242t03_lcd_power_set(priv->ld, FB_BLANK_POWERDOWN); + l4f00242t03_lcd_power_set(priv->ld, LCD_POWER_OFF); } From patchwork Tue Aug 20 09:22:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769700 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 0621C18C358; Tue, 20 Aug 2024 09:35:05 +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=1724146507; cv=none; b=QadYqcXujPXx3AdyNhskjXrxGPco9WoHHVeH0tCJB46A7VAqDDnksoWmxedcpi7n529aLuysx6kjMLz+pNUtl6f8NJvuVahDGr+ikVoCk32+h9eJ2kmWaLrufJWNnEl/nd1DVkyup9w0vi2afgp8V8BWZTmvFiiDYjJzP84GBPE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146507; c=relaxed/simple; bh=XKdxtPpHNfW7MrLsu2v96hY5kAx1IlR8ckf8LVvP2T4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=l+Zout1jthwMLhcNYSfw0+TkZ1ZOJYzokf9wU3l4VzXG378dwxHnR50dJNtf5HbjQ/yi1lhny0zlZtEtCRpUkSEwiPS1rFGAG4Sa2BqW+DawTfQcf/X6isrLjvYSFsaVmEk5CFEQ+IZdGKgZSRMsd4mIGLaho28ALjDwV+hwowg= 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=ydUttb3q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=yjb5+Ele; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ydUttb3q; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=yjb5+Ele; 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="ydUttb3q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="yjb5+Ele"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ydUttb3q"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="yjb5+Ele" 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 507F21FFCD; Tue, 20 Aug 2024 09:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146504; 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=W8gqg9IK6mu7XoSOow6pCGBRFL4qW/0GEnyMslozgJU=; b=ydUttb3qXWFCw5SdDs6j37LoFk4wNTcYc0ZIzm/MIRK0YCwI6TPBYLvdJtVZThjqrFnXE1 y8GyWVBBPvmSpE1QB9aGBDupSivSDO6DWxDpciQ0Z5auSUyuUfTFXgTN8JcH8dwwBMe8Ft +YqY4SfX2smBnbWaSXDX0CXBsl5hS/E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146504; 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=W8gqg9IK6mu7XoSOow6pCGBRFL4qW/0GEnyMslozgJU=; b=yjb5+EleAsFR7UBtX5U65N279E4BH0E4AKqTiOsjZzlkv+lh2d7qoGrRmX/0QFbVvWdZsQ yzKksezKhv0hUYAw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146504; 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=W8gqg9IK6mu7XoSOow6pCGBRFL4qW/0GEnyMslozgJU=; b=ydUttb3qXWFCw5SdDs6j37LoFk4wNTcYc0ZIzm/MIRK0YCwI6TPBYLvdJtVZThjqrFnXE1 y8GyWVBBPvmSpE1QB9aGBDupSivSDO6DWxDpciQ0Z5auSUyuUfTFXgTN8JcH8dwwBMe8Ft +YqY4SfX2smBnbWaSXDX0CXBsl5hS/E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146504; 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=W8gqg9IK6mu7XoSOow6pCGBRFL4qW/0GEnyMslozgJU=; b=yjb5+EleAsFR7UBtX5U65N279E4BH0E4AKqTiOsjZzlkv+lh2d7qoGrRmX/0QFbVvWdZsQ yzKksezKhv0hUYAw== 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 E7C5113AFE; Tue, 20 Aug 2024 09:35:03 +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 CCVzN0djxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:03 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 11/28] backlight: lms283gf05: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:49 +0200 Message-ID: <20240820093452.68270-12-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lms283gf05.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c index a65490e83d3d..c8b7eeeb333e 100644 --- a/drivers/video/backlight/lms283gf05.c +++ b/drivers/video/backlight/lms283gf05.c @@ -126,7 +126,7 @@ static int lms283gf05_power_set(struct lcd_device *ld, int power) struct lms283gf05_state *st = lcd_get_data(ld); struct spi_device *spi = st->spi; - if (power <= FB_BLANK_NORMAL) { + if (power <= LCD_POWER_REDUCED) { if (st->reset) lms283gf05_reset(st->reset); lms283gf05_toggle(spi, disp_initseq, ARRAY_SIZE(disp_initseq)); From patchwork Tue Aug 20 09:22:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769701 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 9577518C903; Tue, 20 Aug 2024 09:35:06 +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=1724146508; cv=none; b=WpAUc6b3ab/O647rywFqaejfw9+wYu6EjAH5L+5/axlMYzIChvPc6aJNWNpPCYJJ0rl9FMBz9jBZkvgVnrSyLLvvCZ5uSWCCaeBpTSowV71XmJxhcNNkwSGTYDh+8toI+Ftx/GBe0ytsVjlYTAsapEIHJ669xDNdWnY/lqSvDj8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146508; c=relaxed/simple; bh=cCL6aw27bRYYv+cSuFS2d/QuzdT5Ik+AYktCg9+qS1s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mLq+gCAewrRxHMgMpQ1c0kaYGgupy+S749LAwih+O5YBzDzR/yd552S91puNi+SdHH0SDut0GX36dDhVL6G0KFANFLuIKzBM0kg/odfldAiup0TzALnGA7QFzkP0vN2JHMlseSbhCMVXC/UPZPl5TlUFa905I/nkocqTs62Ds7o= 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=ynlRHsHN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WTWXPg/O; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=ynlRHsHN; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=WTWXPg/O; 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="ynlRHsHN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WTWXPg/O"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ynlRHsHN"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="WTWXPg/O" 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 BD78F1FFCE; Tue, 20 Aug 2024 09:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146504; 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=ylXcg7hQpl9B7BPpMQT1PSLnP6o/skM5SNbFc5bA958=; b=ynlRHsHN0HPD9UMGIyWdgUkqxCa+Qxx+UeYjpMj8TO+iKlW+GcPgtd1KJpkyVAgjNJ533+ JR8ad0mffWFGfI0z/xkDdrtepdi4rDULbfHawB2LVNtp633UkHGmLfcz9uM6o4TWpPRI6P dwXBnO5l7GyHGCkWNoie5zfbYYNwr/8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146504; 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=ylXcg7hQpl9B7BPpMQT1PSLnP6o/skM5SNbFc5bA958=; b=WTWXPg/O7K/DMbyagfhGLckqXX+HfEcvvVyqiLbOORg5MLb+Y0ce7+nN+uh5EHZDJ4SVyY PUf8sY7UmHIhU0Dg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146504; 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=ylXcg7hQpl9B7BPpMQT1PSLnP6o/skM5SNbFc5bA958=; b=ynlRHsHN0HPD9UMGIyWdgUkqxCa+Qxx+UeYjpMj8TO+iKlW+GcPgtd1KJpkyVAgjNJ533+ JR8ad0mffWFGfI0z/xkDdrtepdi4rDULbfHawB2LVNtp633UkHGmLfcz9uM6o4TWpPRI6P dwXBnO5l7GyHGCkWNoie5zfbYYNwr/8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146504; 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=ylXcg7hQpl9B7BPpMQT1PSLnP6o/skM5SNbFc5bA958=; b=WTWXPg/O7K/DMbyagfhGLckqXX+HfEcvvVyqiLbOORg5MLb+Y0ce7+nN+uh5EHZDJ4SVyY PUf8sY7UmHIhU0Dg== 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 5600A13770; Tue, 20 Aug 2024 09:35:04 +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 SNPLE0hjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:04 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 12/28] backlight: lms501kf03: Remove unnecessary include of Date: Tue, 20 Aug 2024 11:22:50 +0200 Message-ID: <20240820093452.68270-13-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: This lcd driver is independent from the backlight code. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lms501kf03.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c index 8aebe0af3391..e051e6b6036e 100644 --- a/drivers/video/backlight/lms501kf03.c +++ b/drivers/video/backlight/lms501kf03.c @@ -6,7 +6,6 @@ * Author: Jingoo Han */ -#include #include #include #include From patchwork Tue Aug 20 09:22:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769704 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 088F218C335; Tue, 20 Aug 2024 09:35:06 +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=1724146509; cv=none; b=YDQZ7IgHC3mBn2BdaVpbA0KmSWFNUrEHjlazcM3ePkgqmQXWFmoSFxzudRGIlppn1ZL6fh284Rpc/UO4guNLIbttvpXj6L88SfmmjV/NS/myN4fo+09hQTBuffPfAyuM9RnP124bX2SVRlP0e/k4ZBuRsTLUwDVOtZjVWNDHu68= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146509; c=relaxed/simple; bh=iqB6wigtj3SwnzdWciq7BKUl3eZQxRAS/+o0Gwo7BEg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LcPYkkND+NQWFd1c3OQzAwLiP3hp49OBJfWzFYqgLnKtbmkh3vLR0RwN0NvXO3tnH3faPjAPB6Cta+qfE1AnJUzyJPQpAP9kMh0k2ricdJ4bFR7YRY64cM5xwfbppe4y81I6S4SXUF8ssmTLBgzJegsiMx3BF8Fp3xG+FsYetAE= 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=CF8gUMrH; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=5trSQq8y; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=CF8gUMrH; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=5trSQq8y; 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="CF8gUMrH"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="5trSQq8y"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="CF8gUMrH"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="5trSQq8y" 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 36365225AA; Tue, 20 Aug 2024 09:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146505; 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=gX91yI4Op6D2w4gSixX1FdiFGxsmbU0zNWwnCvimueU=; b=CF8gUMrHyNy0kWWnPqL61sUvKYDO6UIUYWCxSvOs00X/JVQZ9qlaafrJNYf8cCweDJGC4u JoIKdUUQAe/iywGN61lI9pVGusnl3OyKzKfmmP76YbNWzV8Ei8Sd8E5pbyGxbybrySnAa4 aPlSEX13rUrvsNPudVRATVUSO7BdpN0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146505; 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=gX91yI4Op6D2w4gSixX1FdiFGxsmbU0zNWwnCvimueU=; b=5trSQq8y/Hrp55Z5o4tEyMjkP3oUlk3wMhWmAo5M2V2PH3t4PfM9uEaegFcxxHPVzXL9ZU LGzrjQjqpIKLTTCw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=CF8gUMrH; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=5trSQq8y DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146505; 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=gX91yI4Op6D2w4gSixX1FdiFGxsmbU0zNWwnCvimueU=; b=CF8gUMrHyNy0kWWnPqL61sUvKYDO6UIUYWCxSvOs00X/JVQZ9qlaafrJNYf8cCweDJGC4u JoIKdUUQAe/iywGN61lI9pVGusnl3OyKzKfmmP76YbNWzV8Ei8Sd8E5pbyGxbybrySnAa4 aPlSEX13rUrvsNPudVRATVUSO7BdpN0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146505; 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=gX91yI4Op6D2w4gSixX1FdiFGxsmbU0zNWwnCvimueU=; b=5trSQq8y/Hrp55Z5o4tEyMjkP3oUlk3wMhWmAo5M2V2PH3t4PfM9uEaegFcxxHPVzXL9ZU LGzrjQjqpIKLTTCw== 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 C312B13AFE; Tue, 20 Aug 2024 09:35:04 +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 sE10LkhjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:04 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 13/28] backlight: lms501kf03: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:51 +0200 Message-ID: <20240820093452.68270-14-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 36365225AA X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lms501kf03.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c index e051e6b6036e..28721b48b4c7 100644 --- a/drivers/video/backlight/lms501kf03.c +++ b/drivers/video/backlight/lms501kf03.c @@ -7,7 +7,6 @@ */ #include -#include #include #include #include @@ -205,7 +204,7 @@ static int lms501kf03_ldi_disable(struct lms501kf03 *lcd) static int lms501kf03_power_is_on(int power) { - return (power) <= FB_BLANK_NORMAL; + return (power) <= LCD_POWER_REDUCED; } static int lms501kf03_power_on(struct lms501kf03 *lcd) @@ -294,8 +293,8 @@ static int lms501kf03_set_power(struct lcd_device *ld, int power) { struct lms501kf03 *lcd = lcd_get_data(ld); - if (power != FB_BLANK_UNBLANK && power != FB_BLANK_POWERDOWN && - power != FB_BLANK_NORMAL) { + if (power != LCD_POWER_ON && power != LCD_POWER_OFF && + power != LCD_POWER_REDUCED) { dev_err(lcd->dev, "power value should be 0, 1 or 4.\n"); return -EINVAL; } @@ -349,11 +348,11 @@ static int lms501kf03_probe(struct spi_device *spi) * current lcd status is powerdown and then * it enables lcd panel. */ - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = LCD_POWER_OFF; - lms501kf03_power(lcd, FB_BLANK_UNBLANK); + lms501kf03_power(lcd, LCD_POWER_ON); } else { - lcd->power = FB_BLANK_UNBLANK; + lcd->power = LCD_POWER_ON; } spi_set_drvdata(spi, lcd); @@ -367,7 +366,7 @@ static void lms501kf03_remove(struct spi_device *spi) { struct lms501kf03 *lcd = spi_get_drvdata(spi); - lms501kf03_power(lcd, FB_BLANK_POWERDOWN); + lms501kf03_power(lcd, LCD_POWER_OFF); } #ifdef CONFIG_PM_SLEEP @@ -381,16 +380,16 @@ static int lms501kf03_suspend(struct device *dev) * when lcd panel is suspend, lcd panel becomes off * regardless of status. */ - return lms501kf03_power(lcd, FB_BLANK_POWERDOWN); + return lms501kf03_power(lcd, LCD_POWER_OFF); } static int lms501kf03_resume(struct device *dev) { struct lms501kf03 *lcd = dev_get_drvdata(dev); - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = LCD_POWER_OFF; - return lms501kf03_power(lcd, FB_BLANK_UNBLANK); + return lms501kf03_power(lcd, LCD_POWER_ON); } #endif @@ -401,7 +400,7 @@ static void lms501kf03_shutdown(struct spi_device *spi) { struct lms501kf03 *lcd = spi_get_drvdata(spi); - lms501kf03_power(lcd, FB_BLANK_POWERDOWN); + lms501kf03_power(lcd, LCD_POWER_OFF); } static struct spi_driver lms501kf03_driver = { From patchwork Tue Aug 20 09:22:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769702 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 4352018C018; Tue, 20 Aug 2024 09:35:07 +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=1724146508; cv=none; b=CDRczIfFIvZ1xIZUyX/l9YugGFj7o4gvBDBeYLn3569CgrkgthrWsvNTNQWI7okcIBSAgFpwke30Sac564cpzusURS5jR3I/QDQ9NmRXqWToG0gyuGgJpMckN/VOGEl/IC2lz484t7PZTyFh3x5HE+u1tOVMOyBgZTr0Ih4+79M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146508; c=relaxed/simple; bh=9FJhUxiDFcOCNEfhJhmOp4SANisizVdRy6bI6LeGuN4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FKdxBi4o4p8n50XFWXVG5BFFkFarDc0am1ZIP7MqHEbz2L0NdwJeapkWJQxa1aEAHwfiUpG6kCwwjitwipKeQYZovUHtKaQc9eEU+7O8cD9kSrJkIZoMdcfJuoFddJK3pN7SBYcghw7RGYbUri96CQe4lQYfg94DykEcdGLveB8= 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=kceSStU7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fwi1sle0; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=kceSStU7; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fwi1sle0; 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="kceSStU7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fwi1sle0"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="kceSStU7"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fwi1sle0" 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 91D3A1FFCF; Tue, 20 Aug 2024 09:35:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146505; 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=JlHClxVlB0wR5ulw4rVzp0kpT3nJf/fx0/Y25IZ3Wyk=; b=kceSStU7BMEtnq418OAQWxMsjXQBxWVkqSfueTT3jTtR1a1KHrz/BLs48C4luI8XNDEgxG qjMPPzAsMerUBFvA5AKJ43C5GDSMCL/zgZhAmMnu5XbGUfPTUIaqHWn7fIgFe0fXuifpBN CjxiuKwOBNEMYwWKr5Sw3w0xXsAtj1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146505; 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=JlHClxVlB0wR5ulw4rVzp0kpT3nJf/fx0/Y25IZ3Wyk=; b=fwi1sle0Qrc3F4t/cgsSV9micDzs7ASyaFDZUu319oHOz2EYL3/OO+rYluzQ0HeiPbrUQs AgzUD8Z6gtypFvBw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=kceSStU7; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fwi1sle0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146505; 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=JlHClxVlB0wR5ulw4rVzp0kpT3nJf/fx0/Y25IZ3Wyk=; b=kceSStU7BMEtnq418OAQWxMsjXQBxWVkqSfueTT3jTtR1a1KHrz/BLs48C4luI8XNDEgxG qjMPPzAsMerUBFvA5AKJ43C5GDSMCL/zgZhAmMnu5XbGUfPTUIaqHWn7fIgFe0fXuifpBN CjxiuKwOBNEMYwWKr5Sw3w0xXsAtj1w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146505; 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=JlHClxVlB0wR5ulw4rVzp0kpT3nJf/fx0/Y25IZ3Wyk=; b=fwi1sle0Qrc3F4t/cgsSV9micDzs7ASyaFDZUu319oHOz2EYL3/OO+rYluzQ0HeiPbrUQs AgzUD8Z6gtypFvBw== 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 32DB513770; Tue, 20 Aug 2024 09:35:05 +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 YC4HC0ljxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:05 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 14/28] backlight: ltv350qv: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:52 +0200 Message-ID: <20240820093452.68270-15-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 91D3A1FFCF X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/ltv350qv.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c index cdc4c087f230..c919b0fe4cd9 100644 --- a/drivers/video/backlight/ltv350qv.c +++ b/drivers/video/backlight/ltv350qv.c @@ -6,7 +6,6 @@ */ #include #include -#include #include #include #include @@ -15,7 +14,7 @@ #include "ltv350qv.h" -#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) +#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) struct ltv350qv { struct spi_device *spi; @@ -233,7 +232,7 @@ static int ltv350qv_probe(struct spi_device *spi) return -ENOMEM; lcd->spi = spi; - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = LCD_POWER_OFF; lcd->buffer = devm_kzalloc(&spi->dev, 8, GFP_KERNEL); if (!lcd->buffer) return -ENOMEM; @@ -245,7 +244,7 @@ static int ltv350qv_probe(struct spi_device *spi) lcd->ld = ld; - ret = ltv350qv_power(lcd, FB_BLANK_UNBLANK); + ret = ltv350qv_power(lcd, LCD_POWER_ON); if (ret) return ret; @@ -258,7 +257,7 @@ static void ltv350qv_remove(struct spi_device *spi) { struct ltv350qv *lcd = spi_get_drvdata(spi); - ltv350qv_power(lcd, FB_BLANK_POWERDOWN); + ltv350qv_power(lcd, LCD_POWER_OFF); } #ifdef CONFIG_PM_SLEEP @@ -266,14 +265,14 @@ static int ltv350qv_suspend(struct device *dev) { struct ltv350qv *lcd = dev_get_drvdata(dev); - return ltv350qv_power(lcd, FB_BLANK_POWERDOWN); + return ltv350qv_power(lcd, LCD_POWER_OFF); } static int ltv350qv_resume(struct device *dev) { struct ltv350qv *lcd = dev_get_drvdata(dev); - return ltv350qv_power(lcd, FB_BLANK_UNBLANK); + return ltv350qv_power(lcd, LCD_POWER_ON); } #endif @@ -284,7 +283,7 @@ static void ltv350qv_shutdown(struct spi_device *spi) { struct ltv350qv *lcd = spi_get_drvdata(spi); - ltv350qv_power(lcd, FB_BLANK_POWERDOWN); + ltv350qv_power(lcd, LCD_POWER_OFF); } static struct spi_driver ltv350qv_driver = { From patchwork Tue Aug 20 09:22:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769703 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 937A218CBFC; Tue, 20 Aug 2024 09:35:07 +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=1724146509; cv=none; b=oOo2eO6LiUxrvWHZa6GLBZqwUj9k0TSoxAWeUgns73MQL5j3Mb33j5SzsLvt7CKCXQ3cbN6t+TmF8V/oOxSavgVhAOLnuojSzMPVT2+vzE3IUiejn9FtY38xEuPWNk6hHYzRHcJPXjp+cXkGxl1QoeB1e0L538Bm0NBSC4JM9qA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146509; c=relaxed/simple; bh=zP+U3n7fgWsu3BlENtcBBqZNiFPkb0qxhosi9R/2/7M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VhhxCzuMdtpF7p622AN4Iz7j2y4WrKSxW9gRvbq2W9W99rqOnnelkDAaZGNt7vaRKAGoc5J1Hp5Yww/Eg2R0MKuaQsQ2yLfCOS2W5oZYF0ktcocVAmki84q7gxNZrkkXLXnMdi4mSzYSoeCbtQQbyugXfB9jwoKt/TiDoqX1VxA= 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=Bs/HupYq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=lD+o5kZn; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=Bs/HupYq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=lD+o5kZn; 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="Bs/HupYq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lD+o5kZn"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="Bs/HupYq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="lD+o5kZn" 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 00BC81FFD0; Tue, 20 Aug 2024 09:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146506; 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=i4j6MXpEvcW8BwOzb35DyKgwOAyAHiF6T0pH+QwK6F0=; b=Bs/HupYquVb1kOM0sZySwH1lgvqWYZxibku48Vy7knb8UHSbtL2xBKbYFXMoXuZ1LrCcp/ iPsyYTtIFKytjSxle2VCN0RpBNMpX+S9iBwyXdPNNtgu4xIC7KSEAD5WOz0SlgngDa/fm3 i4hI7OTMdTfUiFElYzk+diKxod9Fp04= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146506; 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=i4j6MXpEvcW8BwOzb35DyKgwOAyAHiF6T0pH+QwK6F0=; b=lD+o5kZnCer2qkaHFFodk0zypIVCUpB+K2HPryYmFa2/mWWQZDrp4iLWcs9QTsEVW6EhA3 utNa3PmIQY9Zz7Ag== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146506; 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=i4j6MXpEvcW8BwOzb35DyKgwOAyAHiF6T0pH+QwK6F0=; b=Bs/HupYquVb1kOM0sZySwH1lgvqWYZxibku48Vy7knb8UHSbtL2xBKbYFXMoXuZ1LrCcp/ iPsyYTtIFKytjSxle2VCN0RpBNMpX+S9iBwyXdPNNtgu4xIC7KSEAD5WOz0SlgngDa/fm3 i4hI7OTMdTfUiFElYzk+diKxod9Fp04= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146506; 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=i4j6MXpEvcW8BwOzb35DyKgwOAyAHiF6T0pH+QwK6F0=; b=lD+o5kZnCer2qkaHFFodk0zypIVCUpB+K2HPryYmFa2/mWWQZDrp4iLWcs9QTsEVW6EhA3 utNa3PmIQY9Zz7Ag== 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 95C2213AFE; Tue, 20 Aug 2024 09:35:05 +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 uKlhI0ljxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:05 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 15/28] backlight: otm3225a: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:53 +0200 Message-ID: <20240820093452.68270-16-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/otm3225a.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/backlight/otm3225a.c b/drivers/video/backlight/otm3225a.c index efe52fa08b07..5c6575f23ea8 100644 --- a/drivers/video/backlight/otm3225a.c +++ b/drivers/video/backlight/otm3225a.c @@ -189,7 +189,7 @@ static int otm3225a_set_power(struct lcd_device *ld, int power) if (power == dd->power) return 0; - if (power > FB_BLANK_UNBLANK) + if (power > LCD_POWER_ON) otm3225a_write(dd->spi, display_off, ARRAY_SIZE(display_off)); else otm3225a_write(dd->spi, display_on, ARRAY_SIZE(display_on)); From patchwork Tue Aug 20 09:22:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769705 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 6EFFB18C00F; Tue, 20 Aug 2024 09:35:08 +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=1724146509; cv=none; b=AHhWmdD2Kzn1/0icnk3VKwJHoFmgq3uMqqk6CghyitzthB67Y4/9xAu5PlRI/KCM8h2RgOVoMAaWaA0LA7ZO3xn1T+WzyBQDUbIJ9RlQwR2aIOUb5HEbR3hPLw9ysZwccOYa4RRb0gQnLgDqfygTjzWHl+mZFOrjkoYTrIoxPsI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146509; c=relaxed/simple; bh=DxDf1zsQbetdovU8JbjOM0B9B6XVxIcaM4WZWxQgZfw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hNUp9cN22OD6UGqPfD2iSgw7RiCjlMnwIkSxvwmZQWGlreqGnbQfuPnUme8AQkyovmKQ6y6kPE8BghTVK29VK2cxXNxv8ESwMNTNMjDhwLwsGzhC1h7JEHXYZCU9qK+s3LFlOcpXnG2HCsbWG8mv2gFfmcBSJRhop2hnrXyKnT0= 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=1TI+FpX9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=y6y2F8TG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=1TI+FpX9; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=y6y2F8TG; 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="1TI+FpX9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="y6y2F8TG"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="1TI+FpX9"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="y6y2F8TG" 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 703E11FFD1; Tue, 20 Aug 2024 09:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146506; 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=MjbhB8/GIHRogDfxfQJnk09tWcgbJ7P8qGEWnzsjrt0=; b=1TI+FpX9g9FnSMu5VofFR16u6slF0sxMsjIkc7TlBP8PgVESWpzklgjpq5WWcbkWE15jbe 82wuGgwunzAMZqgF9m2lTNxt6QM/M7lbhkoVikmMWymr9OK8DI7+OJ7AkxwL2oZRlq7gbG ChLgRUmQ+RHyxMhByVcGkPcHIOhK7Yk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146506; 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=MjbhB8/GIHRogDfxfQJnk09tWcgbJ7P8qGEWnzsjrt0=; b=y6y2F8TGJmaHcHICfwQt2ZDS3s1+7Pm5ZJ2FllmWeDJ4iHBxlXQaiA7TbtH4NJnqATX7tV HEkSSZXJpOVLR2DA== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=1TI+FpX9; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=y6y2F8TG DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146506; 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=MjbhB8/GIHRogDfxfQJnk09tWcgbJ7P8qGEWnzsjrt0=; b=1TI+FpX9g9FnSMu5VofFR16u6slF0sxMsjIkc7TlBP8PgVESWpzklgjpq5WWcbkWE15jbe 82wuGgwunzAMZqgF9m2lTNxt6QM/M7lbhkoVikmMWymr9OK8DI7+OJ7AkxwL2oZRlq7gbG ChLgRUmQ+RHyxMhByVcGkPcHIOhK7Yk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146506; 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=MjbhB8/GIHRogDfxfQJnk09tWcgbJ7P8qGEWnzsjrt0=; b=y6y2F8TGJmaHcHICfwQt2ZDS3s1+7Pm5ZJ2FllmWeDJ4iHBxlXQaiA7TbtH4NJnqATX7tV HEkSSZXJpOVLR2DA== 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 0596613770; Tue, 20 Aug 2024 09:35:06 +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 uOsuAEpjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:06 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 16/28] backlight: platform_lcd: Remove include statement for Date: Tue, 20 Aug 2024 11:22:54 +0200 Message-ID: <20240820093452.68270-17-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 703E11FFD1 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: This lcd driver does not depend on backlight interfaces. Remove the include statement. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/platform_lcd.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index b0af612834a7..08d0ff400d88 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -10,7 +10,6 @@ #include #include #include -#include #include #include From patchwork Tue Aug 20 09:22:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13769706 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 AF24F18C35E; Tue, 20 Aug 2024 09:35:08 +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=1724146510; cv=none; b=kHkcms3+M151e7Ntk2SMoA7nx2G7bVKqHr7nJk0aCEKnevvQJvympxWyVmPNL9pQE9M0dHFt9do4qLhNsDrqQJWXUHdZJdjuF91OiMzGfY+7IYCFXELuN0UfJyairugXHk7fa/dmj5S+t1SAbAtjqLyRgstsGdn23L1Nz6W6V3g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146510; c=relaxed/simple; bh=WlXe4iY9ZcqogIYH6rEicKr81o3HyN2VYxyFr8ESC58=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CYpkdQec9nGqhGX0UDBm3k9Uh/LX8ZgWnO+JNlAwi5yzj4F92KN1PATFrqTA7Jhc5lb1XhVU+LAng1acyQUA02wYMbXbTFv9kBOX9aY0jSor+LWTDRqyjs+/I0DxygjwraBgvIj6xnoRxxM68JXS3TkXGkU+DcSLwLYfKaAx8fg= 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=VyqKBazJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=06+SThGR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=VyqKBazJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=06+SThGR; 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="VyqKBazJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="06+SThGR"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="VyqKBazJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="06+SThGR" 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 D41A31FFD2; Tue, 20 Aug 2024 09:35:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146506; 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=Or+BrdX15TMdoqOhetrkQm8yWPCPiwdq4E9crt6sI4k=; b=VyqKBazJ1u4YZIFva+8W+eXYAeYlNGZpvuZRf1Ksa8KloldRtwCuv4q2rkFIgexv4em81R VhS6+IvZP0qHntLINo6xvq6ep1nSljliRmku3bRKvMnn2IKFnEGoAuEJQMMtLcSyqTJ/JF obyq1VME9Vk5o/jnlfqCgdPl14bWqgE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146506; 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=Or+BrdX15TMdoqOhetrkQm8yWPCPiwdq4E9crt6sI4k=; b=06+SThGRd3PJqkSXit0WDixVbD9jD8O7IwGYC6xII8HpBPW9zykD5CVPKz0xai2eiTaEtW RY0ubH7Qd8NYYiCw== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146506; 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=Or+BrdX15TMdoqOhetrkQm8yWPCPiwdq4E9crt6sI4k=; b=VyqKBazJ1u4YZIFva+8W+eXYAeYlNGZpvuZRf1Ksa8KloldRtwCuv4q2rkFIgexv4em81R VhS6+IvZP0qHntLINo6xvq6ep1nSljliRmku3bRKvMnn2IKFnEGoAuEJQMMtLcSyqTJ/JF obyq1VME9Vk5o/jnlfqCgdPl14bWqgE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146506; 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=Or+BrdX15TMdoqOhetrkQm8yWPCPiwdq4E9crt6sI4k=; b=06+SThGRd3PJqkSXit0WDixVbD9jD8O7IwGYC6xII8HpBPW9zykD5CVPKz0xai2eiTaEtW RY0ubH7Qd8NYYiCw== 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 76E7113AFE; Tue, 20 Aug 2024 09:35:06 +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 4LWAG0pjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:06 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 17/28] backlight: platform_lcd: Remove match_fb from struct plat_lcd_data Date: Tue, 20 Aug 2024 11:22:55 +0200 Message-ID: <20240820093452.68270-18-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to(RLr3u6jgwj9sedc854c38mga),to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO The match_fb callback in struct plat_lcd_data is unused. Remove it. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/platform_lcd.c | 4 ---- include/video/platform_lcd.h | 3 --- 2 files changed, 7 deletions(-) diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 08d0ff400d88..8b89d2f47df7 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -53,10 +53,6 @@ static int platform_lcd_set_power(struct lcd_device *lcd, int power) static int platform_lcd_match(struct lcd_device *lcd, struct fb_info *info) { struct platform_lcd *plcd = to_our_lcd(lcd); - struct plat_lcd_data *pdata = plcd->pdata; - - if (pdata->match_fb) - return pdata->match_fb(pdata, info); return plcd->us->parent == info->device; } diff --git a/include/video/platform_lcd.h b/include/video/platform_lcd.h index 6a95184a28c1..2bdf46519298 100644 --- a/include/video/platform_lcd.h +++ b/include/video/platform_lcd.h @@ -8,11 +8,8 @@ */ struct plat_lcd_data; -struct fb_info; struct plat_lcd_data { int (*probe)(struct plat_lcd_data *); void (*set_power)(struct plat_lcd_data *, unsigned int power); - int (*match_fb)(struct plat_lcd_data *, struct fb_info *); }; - From patchwork Tue Aug 20 09:22: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: 13769707 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 F189418CC0E; Tue, 20 Aug 2024 09:35:08 +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=1724146510; cv=none; b=bvvPyNfhXTyEu/w2pHEbrioHxEOhhYq0Ru8fcPL9GUEw6yIuFIh5XOgRyUvr7jjLWKukXho61kOfNxgJaqTdI+FKNG9OfPkSvyMLajiz4de4ihOoyu8l7leZ2BCVwPjAoh0jMqzRCUTJ0u81mdnRo91focdwvmEvu5Kd6QeI7/M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146510; c=relaxed/simple; bh=/46eCphgliNP8u/nMpL8muRHKB8awxz0fPXyrokpFjg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jvTMM3TqfGQmjK09304Ko1gtqhD1y757UFvllkEG5S28oxz8FAOzNN27EOyjhaFJbgfpKxopD9rTDs/BMSo60CajHa8tP8HBtPyuQO/uGjuAP+Ej1HES20sCK0/A/49rz2Zkzb5TUXwHWKgaqeyBnTnQRx/v0I6pKaUpfLYGjgU= 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=A/xBNwpy; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UvDHIO93; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=A/xBNwpy; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UvDHIO93; 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="A/xBNwpy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UvDHIO93"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="A/xBNwpy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UvDHIO93" 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 4D5551FFD3; Tue, 20 Aug 2024 09:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146507; 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=9yeqJo8xTifZVRDeElarBREsdwkqwrL7OT0CCQj2jWI=; b=A/xBNwpykrA18NPiXNZhKkSdj916sQX+u30Hzz5lD3ryagfz2SQ8//9OeCjK8r6Lw7s0IC O6LUOWmWX8NfnZGHjIC6acw+WKA9MUSUqBkOEU9/079+695eglKDvPEu3tBz8kmBOqe0K9 Qj3vePgKey2O+f9ljHXbAFrgO0uJxBc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146507; 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=9yeqJo8xTifZVRDeElarBREsdwkqwrL7OT0CCQj2jWI=; b=UvDHIO93kz7eBRn+Us0mbUXVHagfxxuieGLcrIfk3xONAuR/fWRoCSLxxRs9m3bmVEIAb+ 8oWNPoVMs0Yc7ECQ== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146507; 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=9yeqJo8xTifZVRDeElarBREsdwkqwrL7OT0CCQj2jWI=; b=A/xBNwpykrA18NPiXNZhKkSdj916sQX+u30Hzz5lD3ryagfz2SQ8//9OeCjK8r6Lw7s0IC O6LUOWmWX8NfnZGHjIC6acw+WKA9MUSUqBkOEU9/079+695eglKDvPEu3tBz8kmBOqe0K9 Qj3vePgKey2O+f9ljHXbAFrgO0uJxBc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146507; 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=9yeqJo8xTifZVRDeElarBREsdwkqwrL7OT0CCQj2jWI=; b=UvDHIO93kz7eBRn+Us0mbUXVHagfxxuieGLcrIfk3xONAuR/fWRoCSLxxRs9m3bmVEIAb+ 8oWNPoVMs0Yc7ECQ== 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 D8EB813770; Tue, 20 Aug 2024 09:35:06 +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 oJLBM0pjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:06 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 18/28] backlight: platform_lcd: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:56 +0200 Message-ID: <20240820093452.68270-19-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe),to(RLr3u6jgwj9sedc854c38mga)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/platform_lcd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 8b89d2f47df7..69a22d1a8a35 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -41,7 +41,7 @@ static int platform_lcd_set_power(struct lcd_device *lcd, int power) struct platform_lcd *plcd = to_our_lcd(lcd); int lcd_power = 1; - if (power == FB_BLANK_POWERDOWN || plcd->suspended) + if (power == LCD_POWER_OFF || plcd->suspended) lcd_power = 0; plcd->pdata->set_power(plcd->pdata, lcd_power); @@ -97,7 +97,7 @@ static int platform_lcd_probe(struct platform_device *pdev) } platform_set_drvdata(pdev, plcd); - platform_lcd_set_power(plcd->lcd, FB_BLANK_NORMAL); + platform_lcd_set_power(plcd->lcd, LCD_POWER_REDUCED); return 0; } From patchwork Tue Aug 20 09:22: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: 13769708 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 3BAAA18CC16; Tue, 20 Aug 2024 09:35:09 +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=1724146510; cv=none; b=M4b5S8JeXOWFKt99b21Zse2YHyU7rUX6BVz4gZjdcSQWpQyCpmpQXLbEuKkCjFUEQSxWSxnqyt0YbD0DJ24UDfkFsZ0QrDJYpMLggDtlUmokRXdW7stXEcqVu5wQ9o98CIxUHOs/w8spbtJ3z18L9n/Y2VlYMmsTdlr7me3AeZE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146510; c=relaxed/simple; bh=Q7MIgRmsxnI8V0JcvRW43Iw0FGd+ymDZC/S21G3/8Jw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ecIm8DPeGaThOCGKryvQrsLlwqspzF/jkzRlXH9DLlhlHCFSGrgnSLLhW+vkVQMJwxhpI8iHKPj9Vud9rml1ZxJqfsKOscs/fWr/x4xjFKQ7i9DcryhnrxALUN52QzkJMO0+XFIf6Op82Rv3qHIFz65pnPtVYmXSrvmlKhHUt2U= 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=I8H8l+s2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4ODsUpWy; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=I8H8l+s2; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=4ODsUpWy; 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="I8H8l+s2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4ODsUpWy"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="I8H8l+s2"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="4ODsUpWy" 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 A66B51FFD4; Tue, 20 Aug 2024 09:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146507; 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=yszzEScJjZotv3L1Gt+Uq/mk86GXKyxTlbBB5UlHLlI=; b=I8H8l+s2U4vaFV6hTtDMogV8HMUK0RxHsaCzwQklaJkM44d7lAFn4MLNqS+j6Wy9lt0We3 YBMdacrKxUg2Fbs5sOGXxCce1exl5wSemVtDyi7312ZOV6W5H+aWqUE6eG322pHuNHazqT 8R5pyoOAy6SI43EHHm2FTNdTnBjZehw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146507; 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=yszzEScJjZotv3L1Gt+Uq/mk86GXKyxTlbBB5UlHLlI=; b=4ODsUpWyz+IWv653NvXtkYGBxWtHG/qVRilZnFfF+wO6wtefie4hsmkhSiGNBEydYdXbGa KbmYZgA2EOZ2cjCQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=I8H8l+s2; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=4ODsUpWy DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146507; 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=yszzEScJjZotv3L1Gt+Uq/mk86GXKyxTlbBB5UlHLlI=; b=I8H8l+s2U4vaFV6hTtDMogV8HMUK0RxHsaCzwQklaJkM44d7lAFn4MLNqS+j6Wy9lt0We3 YBMdacrKxUg2Fbs5sOGXxCce1exl5wSemVtDyi7312ZOV6W5H+aWqUE6eG322pHuNHazqT 8R5pyoOAy6SI43EHHm2FTNdTnBjZehw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146507; 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=yszzEScJjZotv3L1Gt+Uq/mk86GXKyxTlbBB5UlHLlI=; b=4ODsUpWyz+IWv653NvXtkYGBxWtHG/qVRilZnFfF+wO6wtefie4hsmkhSiGNBEydYdXbGa KbmYZgA2EOZ2cjCQ== 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 47C5413AFE; Tue, 20 Aug 2024 09:35:07 +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 sJ9KEEtjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:07 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 19/28] backlight: tdo24m: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:57 +0200 Message-ID: <20240820093452.68270-20-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: A66B51FFD4 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to(RLr3u6jgwj9sedc854c38mga),to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/tdo24m.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index c413b3c68e95..a14a94114e9d 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c @@ -16,7 +16,7 @@ #include #include -#define POWER_IS_ON(pwr) ((pwr) <= FB_BLANK_NORMAL) +#define POWER_IS_ON(pwr) ((pwr) <= LCD_POWER_REDUCED) #define TDO24M_SPI_BUFF_SIZE (4) #define MODE_QVGA 0 @@ -354,7 +354,7 @@ static int tdo24m_probe(struct spi_device *spi) return -ENOMEM; lcd->spi_dev = spi; - lcd->power = FB_BLANK_POWERDOWN; + lcd->power = LCD_POWER_OFF; lcd->mode = MODE_VGA; /* default to VGA */ lcd->buf = devm_kzalloc(&spi->dev, TDO24M_SPI_BUFF_SIZE, GFP_KERNEL); @@ -390,7 +390,7 @@ static int tdo24m_probe(struct spi_device *spi) return PTR_ERR(lcd->lcd_dev); spi_set_drvdata(spi, lcd); - err = tdo24m_power(lcd, FB_BLANK_UNBLANK); + err = tdo24m_power(lcd, LCD_POWER_ON); if (err) return err; @@ -401,7 +401,7 @@ static void tdo24m_remove(struct spi_device *spi) { struct tdo24m *lcd = spi_get_drvdata(spi); - tdo24m_power(lcd, FB_BLANK_POWERDOWN); + tdo24m_power(lcd, LCD_POWER_OFF); } #ifdef CONFIG_PM_SLEEP @@ -409,14 +409,14 @@ static int tdo24m_suspend(struct device *dev) { struct tdo24m *lcd = dev_get_drvdata(dev); - return tdo24m_power(lcd, FB_BLANK_POWERDOWN); + return tdo24m_power(lcd, LCD_POWER_OFF); } static int tdo24m_resume(struct device *dev) { struct tdo24m *lcd = dev_get_drvdata(dev); - return tdo24m_power(lcd, FB_BLANK_UNBLANK); + return tdo24m_power(lcd, LCD_POWER_ON); } #endif @@ -427,7 +427,7 @@ static void tdo24m_shutdown(struct spi_device *spi) { struct tdo24m *lcd = spi_get_drvdata(spi); - tdo24m_power(lcd, FB_BLANK_POWERDOWN); + tdo24m_power(lcd, LCD_POWER_OFF); } static struct spi_driver tdo24m_driver = { From patchwork Tue Aug 20 09:22: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: 13769709 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 BE13A158DCE; Tue, 20 Aug 2024 09:35:09 +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=1724146511; cv=none; b=TtpBqjF+jozGkrqDvCuwzaep0dHvu6NJvhvPINS3KANXssOStoKdFhZaskFV05eF3eT79LWhLZ3u2MoxXyMTkTe1rogEc4gMUQtB23KJwnBh2VNE/Kz0q2GGKKEAo3+twxUQFhSvqoqSx1Fc2xJBZwSTkvQZlQEuKfPTWNYXvbs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146511; c=relaxed/simple; bh=VviNuR0IC02xdkBJdxkx8pHOhzTIAYrhE6Q4MVsbbrY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ntkvh6wl+5C+InGDIksLkXdNpca3fbtwsU+R1egxzg+i3UzdsrLhXxfmZbxjGdf8KPlVdQU5Qsr9nRLubcjS/gucvZVhrGfn0/QVrqX+4O39C0dKX4QdcMhIQZOO48zkVbQ8wuKehzSeamydtkbb6c27pjtz2cYEIuiX6aHzlFE= 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=N2iqKoyk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=SQF6IoDx; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=N2iqKoyk; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=SQF6IoDx; 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="N2iqKoyk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="SQF6IoDx"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="N2iqKoyk"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="SQF6IoDx" 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 14FC41FFD6; Tue, 20 Aug 2024 09:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146508; 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=hoAMQXS7nhRjUmGE2WCwR9P39djbCpWNGRizlFeXyW0=; b=N2iqKoykUUmbccj5Bt0beMZvqPN0V+lkpN1FAXMkuyWdmq28DoiczCLEo2eDxNCdzO5QNI OKYP9LdtHJNfrChMgfUElAWSxq4Te7OKq2gJCvU0/cEBKMc3Cy2izwc3SQUA0SKZBzI7vX V2Ni5rZVJ5/ecQ9S+5VrRaB5UQPeJzc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146508; 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=hoAMQXS7nhRjUmGE2WCwR9P39djbCpWNGRizlFeXyW0=; b=SQF6IoDxGz8uZIYd+y1KGqov9O4VHX3aKo2AwtB4+mfZJiM/Rm1Cm01iCNbjR62jVOIpyF WEMSi33XpAl1jbDQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=N2iqKoyk; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=SQF6IoDx DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146508; 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=hoAMQXS7nhRjUmGE2WCwR9P39djbCpWNGRizlFeXyW0=; b=N2iqKoykUUmbccj5Bt0beMZvqPN0V+lkpN1FAXMkuyWdmq28DoiczCLEo2eDxNCdzO5QNI OKYP9LdtHJNfrChMgfUElAWSxq4Te7OKq2gJCvU0/cEBKMc3Cy2izwc3SQUA0SKZBzI7vX V2Ni5rZVJ5/ecQ9S+5VrRaB5UQPeJzc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146508; 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=hoAMQXS7nhRjUmGE2WCwR9P39djbCpWNGRizlFeXyW0=; b=SQF6IoDxGz8uZIYd+y1KGqov9O4VHX3aKo2AwtB4+mfZJiM/Rm1Cm01iCNbjR62jVOIpyF WEMSi33XpAl1jbDQ== 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 AC47B13770; Tue, 20 Aug 2024 09:35:07 +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 AIrtKEtjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:07 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 20/28] fbdev: clps711x-fb: Replace check_fb in favor of struct fb_info.lcd_dev Date: Tue, 20 Aug 2024 11:22:58 +0200 Message-ID: <20240820093452.68270-21-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 14FC41FFD6 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:dkim,suse.de:mid,suse.de:email]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty),to(RLr3u6jgwj9sedc854c38mga)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in clps711x_lcd_ops obsolete. Remove it. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/clps711x-fb.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/video/fbdev/clps711x-fb.c b/drivers/video/fbdev/clps711x-fb.c index 6171a98a48fd..4340ea3b9660 100644 --- a/drivers/video/fbdev/clps711x-fb.c +++ b/drivers/video/fbdev/clps711x-fb.c @@ -162,13 +162,6 @@ static const struct fb_ops clps711x_fb_ops = { .fb_blank = clps711x_fb_blank, }; -static int clps711x_lcd_check_fb(struct lcd_device *lcddev, struct fb_info *fi) -{ - struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev); - - return (!fi || fi->par == cfb) ? 1 : 0; -} - static int clps711x_lcd_get_power(struct lcd_device *lcddev) { struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev); @@ -198,7 +191,6 @@ static int clps711x_lcd_set_power(struct lcd_device *lcddev, int blank) } static const struct lcd_ops clps711x_lcd_ops = { - .check_fb = clps711x_lcd_check_fb, .get_power = clps711x_lcd_get_power, .set_power = clps711x_lcd_set_power, }; @@ -325,16 +317,21 @@ static int clps711x_fb_probe(struct platform_device *pdev) if (ret) goto out_fb_dealloc_cmap; + lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb, + &clps711x_lcd_ops); + if (IS_ERR(lcd)) { + ret = PTR_ERR(lcd); + goto out_fb_dealloc_cmap; + } + + info->lcd_dev = lcd; + ret = register_framebuffer(info); if (ret) goto out_fb_dealloc_cmap; - lcd = devm_lcd_device_register(dev, "clps711x-lcd", dev, cfb, - &clps711x_lcd_ops); - if (!IS_ERR(lcd)) - return 0; + return 0; - ret = PTR_ERR(lcd); unregister_framebuffer(info); out_fb_dealloc_cmap: From patchwork Tue Aug 20 09:22: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: 13769710 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 4E2F218CC1B; Tue, 20 Aug 2024 09:35:10 +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=1724146511; cv=none; b=cV5cUo7c9tBF2rNDHHcZNSnp0wkih6tRZh5YZqWMX3HPtQzBsKd6yog4yRc/S+HlHJkvcwXeK8oZIaIsWhzN3TSMzAYATMbn/ds2KFP5aWyzws1PKpcxyCBjKJCONBI5aQO5aiQ7tXR6vAlSIUIt+WW2SwoM7LOJn9cAEwmGLCQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146511; c=relaxed/simple; bh=+ufyqFH2du0qPqwr3MnkFD+wpVz7AcHaH9lk49Ly60c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iP84tAcWCdW3aXGDdDdONe3zB34ECYIyuvZl3WeKlsFWXD9f/2kxpWOlWBod1qgvtAvdCqNZVgxGCUmcfzoqiATqsnByTiFiGZWpcy2V/QVaHWV4nWpZrYJjrBVroqj6DkmpTB3brIAgUhsE7RhTie6oV7LeSygiFLGNrUkDE/k= 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=P719YrHJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2g5qDEM+; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=P719YrHJ; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2g5qDEM+; 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="P719YrHJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2g5qDEM+"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="P719YrHJ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2g5qDEM+" 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 8215D1FFD7; Tue, 20 Aug 2024 09:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146508; 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=Ay42klCLzRB4fZiZJz9Y61eAt7QG/JAemwOmaxvi6Fk=; b=P719YrHJYnB6vPgt1SJRGpBTWABmDQOZ1xBg07Mf48UiDD0O61MYDG0AtEzy0w5chDIrBE 7ndexq4NMa7tbiexuFfhF/7v9btjzQDLuGWIZF8vgw3blxjKVPLeDpSJ/D1yS7qGkY9jTx 3VQ1OYLubQM/SJHbmjOwCggBod9WAWI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146508; 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=Ay42klCLzRB4fZiZJz9Y61eAt7QG/JAemwOmaxvi6Fk=; b=2g5qDEM+11d3QIAQjXgHyg13qOy75PfcQr1BE3vCxBedTLf+i6iqLrkuUD9U7pnt880QRu ejFhS3sG6P9OICAw== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=P719YrHJ; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=2g5qDEM+ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146508; 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=Ay42klCLzRB4fZiZJz9Y61eAt7QG/JAemwOmaxvi6Fk=; b=P719YrHJYnB6vPgt1SJRGpBTWABmDQOZ1xBg07Mf48UiDD0O61MYDG0AtEzy0w5chDIrBE 7ndexq4NMa7tbiexuFfhF/7v9btjzQDLuGWIZF8vgw3blxjKVPLeDpSJ/D1yS7qGkY9jTx 3VQ1OYLubQM/SJHbmjOwCggBod9WAWI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146508; 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=Ay42klCLzRB4fZiZJz9Y61eAt7QG/JAemwOmaxvi6Fk=; b=2g5qDEM+11d3QIAQjXgHyg13qOy75PfcQr1BE3vCxBedTLf+i6iqLrkuUD9U7pnt880QRu ejFhS3sG6P9OICAw== 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 1ABEE13AFE; Tue, 20 Aug 2024 09:35:08 +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 UM9dBUxjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:08 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 21/28] fbdev: clps711x-fb: Use lcd power constants Date: Tue, 20 Aug 2024 11:22:59 +0200 Message-ID: <20240820093452.68270-22-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 8215D1FFD7 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:dkim,suse.de:mid,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLk469idygq4891mojaqehp6ty),to(RLr3u6jgwj9sedc854c38mga)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/clps711x-fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/clps711x-fb.c b/drivers/video/fbdev/clps711x-fb.c index 4340ea3b9660..9e3df1df5ac4 100644 --- a/drivers/video/fbdev/clps711x-fb.c +++ b/drivers/video/fbdev/clps711x-fb.c @@ -168,9 +168,9 @@ static int clps711x_lcd_get_power(struct lcd_device *lcddev) if (!IS_ERR_OR_NULL(cfb->lcd_pwr)) if (!regulator_is_enabled(cfb->lcd_pwr)) - return FB_BLANK_NORMAL; + return LCD_POWER_REDUCED; - return FB_BLANK_UNBLANK; + return LCD_POWER_ON; } static int clps711x_lcd_set_power(struct lcd_device *lcddev, int blank) @@ -178,7 +178,7 @@ static int clps711x_lcd_set_power(struct lcd_device *lcddev, int blank) struct clps711x_fb_info *cfb = dev_get_drvdata(&lcddev->dev); if (!IS_ERR_OR_NULL(cfb->lcd_pwr)) { - if (blank == FB_BLANK_UNBLANK) { + if (blank == LCD_POWER_ON) { if (!regulator_is_enabled(cfb->lcd_pwr)) return regulator_enable(cfb->lcd_pwr); } else { From patchwork Tue Aug 20 09:23: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: 13769711 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 7B5AE18D620; Tue, 20 Aug 2024 09:35:10 +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=1724146512; cv=none; b=l3TQ3kXvf1CQhTD41keyt7UkyZI4R5BT9usguVCJQBetwCVrm37MAsFdfRzuoSqbBQE0JrE4oe4rQZx+SjnxLaO1Q3FYgemVQS9OGTG+Wix1E517qSIvz8569NH+IFUXRIvsUWbmRj+haQ9/FHQYWuQlNyyZI6uaWXAlffXfXXA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146512; c=relaxed/simple; bh=hQ76s/23Eor36MdlHRyXfblL3cMoXQq24LaJvIaVy7s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pt2R8ihcUvZqfIfFffASF6q7//mgcQ8LfK7yxX9q6gEvBhYLrj1pykjFZ26Hg8vnkBrAmsWMdWF2UpRzxXLTn6KgfGbO/90Yztk0toUMEofAW4U2/09g9RogHLP/pjy67dMMG1e9ovDBe73ZAJ1bSrobXYE/SCVBeeQk+22NMBM= 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=0EpemxFd; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=yGNJ8GmU; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=0EpemxFd; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=yGNJ8GmU; 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="0EpemxFd"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="yGNJ8GmU"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="0EpemxFd"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="yGNJ8GmU" 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 DBCFB225AD; Tue, 20 Aug 2024 09:35:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146508; 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=YTNANsIODSyg5pivT1qonEIrZsrgaPRMfEohzsWB42g=; b=0EpemxFdlGKUUk39hAGITZGYhIt75m4RD6j1l95olajrZ93Lp8GEvEFN0kTCahfqG7A4Y0 P0K4bgM8Jx+CgjWYqhO5EveJ4Wb06SclH0S+QExL/YLd0JA8q0E1BjBi52eIwWBsSzq5rd qaw9u8WlGuj34M3I60aJUb28J+x8LqE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146508; 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=YTNANsIODSyg5pivT1qonEIrZsrgaPRMfEohzsWB42g=; b=yGNJ8GmUjbEqx+hooWQN1hsWQcNczKU4A2iV4Ef1aO7/6ZPSWpgHvD9I3OGeo+t5H9nS5H AYqw9p8EV+nW9jDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146508; 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=YTNANsIODSyg5pivT1qonEIrZsrgaPRMfEohzsWB42g=; b=0EpemxFdlGKUUk39hAGITZGYhIt75m4RD6j1l95olajrZ93Lp8GEvEFN0kTCahfqG7A4Y0 P0K4bgM8Jx+CgjWYqhO5EveJ4Wb06SclH0S+QExL/YLd0JA8q0E1BjBi52eIwWBsSzq5rd qaw9u8WlGuj34M3I60aJUb28J+x8LqE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146508; 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=YTNANsIODSyg5pivT1qonEIrZsrgaPRMfEohzsWB42g=; b=yGNJ8GmUjbEqx+hooWQN1hsWQcNczKU4A2iV4Ef1aO7/6ZPSWpgHvD9I3OGeo+t5H9nS5H AYqw9p8EV+nW9jDA== 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 7D10513770; Tue, 20 Aug 2024 09:35:08 +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 uEZXHUxjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:08 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 22/28] fbdev: imxfb: Replace check_fb in favor of struct fb_info.lcd_dev Date: Tue, 20 Aug 2024 11:23:00 +0200 Message-ID: <20240820093452.68270-23-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; 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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to(RLr3u6jgwj9sedc854c38mga),to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in imxfb_lcd_ops obsolete. Remove it. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/imxfb.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 4ebfe9b9df60..88c117f29f7f 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -782,16 +782,6 @@ static int imxfb_of_read_mode(struct device *dev, struct device_node *np, return 0; } -static int imxfb_lcd_check_fb(struct lcd_device *lcddev, struct fb_info *fi) -{ - struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev); - - if (!fi || fi->par == fbi) - return 1; - - return 0; -} - static int imxfb_lcd_get_contrast(struct lcd_device *lcddev) { struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev); @@ -858,7 +848,6 @@ static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power) } static const struct lcd_ops imxfb_lcd_ops = { - .check_fb = imxfb_lcd_check_fb, .get_contrast = imxfb_lcd_get_contrast, .set_contrast = imxfb_lcd_set_contrast, .get_power = imxfb_lcd_get_power, @@ -1025,11 +1014,6 @@ static int imxfb_probe(struct platform_device *pdev) goto failed_cmap; imxfb_set_par(info); - ret = register_framebuffer(info); - if (ret < 0) { - dev_err(&pdev->dev, "failed to register framebuffer\n"); - goto failed_register; - } fbi->lcd_pwr = devm_regulator_get(&pdev->dev, "lcd"); if (PTR_ERR(fbi->lcd_pwr) == -EPROBE_DEFER) { @@ -1046,13 +1030,19 @@ static int imxfb_probe(struct platform_device *pdev) lcd->props.max_contrast = 0xff; + info->lcd_dev = lcd; + + ret = register_framebuffer(info); + if (ret < 0) { + dev_err(&pdev->dev, "failed to register framebuffer\n"); + goto failed_lcd; + } + imxfb_enable_controller(fbi); return 0; failed_lcd: - unregister_framebuffer(info); -failed_register: fb_dealloc_cmap(&info->cmap); failed_cmap: dma_free_wc(&pdev->dev, fbi->map_size, info->screen_buffer, From patchwork Tue Aug 20 09:23: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: 13769715 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 357F618DF64; Tue, 20 Aug 2024 09:35:12 +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=1724146514; cv=none; b=UxQ1cMB/PhNcrQShUuL5fvDUwDyVecUhXGmtnAeJgzUVB/StUk6mpeigy7uZi5riSTLh9uPzdcwiWNK9EfpJTYJkapqzV4Ow6CVU2E9iTyER1ElEynXlis9cmn+vaJAupU3ayYTbmRcZ6BuErpTN7RbhU18MdbqEZ0jYgzWpeRg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146514; c=relaxed/simple; bh=txu9/PSJ5v9C4p8JHaR5jD0e7aO0Nbnj5iopHPsaW5k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Owr7o+vh1INNg89++/8M3hX4WkPv/wn4AWDa6kmqrhvVZL7PmhJLcsv7z4TH4ds88WuV+TJRgAFxm4n6uqEq+9vzW44/JqtUjNvHCEwXqhP25bDuXAYG/zmyI0RnUrVwwzFvfP95is0wipm3x6bzR9giDWa6kOl2ukI2bXkCqAw= 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=SfevEho4; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=HqJVtlhl; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=D50kxF66; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=7OReGM9g; 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="SfevEho4"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="HqJVtlhl"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="D50kxF66"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="7OReGM9g" 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 49AAB225B1; Tue, 20 Aug 2024 09:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=VpG2TZF6xnwmW4yKSVKM8wu//ThgCXdqU0N3OrIkZjs=; b=SfevEho4RhY30Ogb/UxdpHUfufeUG/zooxyS2kgYx4TB5QRBCez3DalNCCjiiHcG/Z21WI f/mYu3ZXvdq+qZZswST4XXunBtwFI1DBBkf0rVFKqLBWDPfZCOn2ofNexXZ39KiJcg0/dP 8savuj5uRl6XZEpAaAXNgyH3NK8i6aI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=VpG2TZF6xnwmW4yKSVKM8wu//ThgCXdqU0N3OrIkZjs=; b=HqJVtlhllsrOzMxYMHtMwM633QSGnvHgTZ78E8rRTlr/JOQKXVuk+D+H3UnXTs1N8yzDT4 7y3MH2xPfBZI7uCA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146509; 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=VpG2TZF6xnwmW4yKSVKM8wu//ThgCXdqU0N3OrIkZjs=; b=D50kxF66cthK0W/9Vao+RiQPZLq/rcXF1UkbqVZo65Ml0hJgMyARZ6m/Rl2fQkU2CG7L+/ EvcqrXkNXUcInF0IazgQJ/N3jXoitRR0LCGljN62Werq0ndQxM2aXYZGkMMW3eh7gLuOmJ jOfbToProX4nKh+bArwFdHyBT7IYAYg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146509; 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=VpG2TZF6xnwmW4yKSVKM8wu//ThgCXdqU0N3OrIkZjs=; b=7OReGM9gLvrmYTmjH5DRAtHXYBb0o3/Q8/z7Xa40fRvhLo1ZjQ5aiLQp+z1NgtU/Ufx8so Z4a3f8YzJtCVr3BA== 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 E1C4C13AFE; Tue, 20 Aug 2024 09:35:08 +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 YJrtNUxjxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:08 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 23/28] fbdev: imxfb: Use lcd power constants Date: Tue, 20 Aug 2024 11:23:01 +0200 Message-ID: <20240820093452.68270-24-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[99.99%]; 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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:email,suse.de:mid]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe),to(RLr3u6jgwj9sedc854c38mga)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/imxfb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index 88c117f29f7f..97466e0c5877 100644 --- a/drivers/video/fbdev/imxfb.c +++ b/drivers/video/fbdev/imxfb.c @@ -814,9 +814,9 @@ static int imxfb_lcd_get_power(struct lcd_device *lcddev) if (!IS_ERR(fbi->lcd_pwr) && !regulator_is_enabled(fbi->lcd_pwr)) - return FB_BLANK_POWERDOWN; + return LCD_POWER_OFF; - return FB_BLANK_UNBLANK; + return LCD_POWER_ON; } static int imxfb_regulator_set(struct imxfb_info *fbi, int enable) @@ -842,7 +842,7 @@ static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power) struct imxfb_info *fbi = dev_get_drvdata(&lcddev->dev); if (!IS_ERR(fbi->lcd_pwr)) - return imxfb_regulator_set(fbi, power == FB_BLANK_UNBLANK); + return imxfb_regulator_set(fbi, power == LCD_POWER_ON); return 0; } From patchwork Tue Aug 20 09:23: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: 13769713 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 357A318DF63; Tue, 20 Aug 2024 09:35:12 +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=1724146513; cv=none; b=abtcsGTZCYbqRloR2MymnY147z5Tfwh3LEC8Svp3MbgjyDDW9lTGVgZtB0kZSXuS8+qsWpiL9LIQO/I/+wQ6VRX+DUBP7Cn+zyAItxLfOpGrsU1D0+mFa+7Nz4tapEEAzioUEwTLjfVE5IdofTJWxvzYDpS2/FLwETWF0DNyE5A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146513; c=relaxed/simple; bh=Igc8s1GNCsb288VL2gn7LLqu46IB8EvW6i8ICPan2Mg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jnCwgXvweqtt7Frpagpy7RJSAPk1/3M6/nxfWLSohyZKqeH83kbLK58QPtEHpNk4ao6B5/YSe7PasRI6sslpiT05Y6Hgvi4TlXe6uPXL0Xoyj8n0N5p8nPslvFsMHX2/2AgTS6Ph8HBXvF+Zmm80JbAoqbhqoLN1DMhf6ZDRVbg= 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=Qq9IC24/; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=2CRYBcIF; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gPuWUb3n; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=1bf2YfyD; 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="Qq9IC24/"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="2CRYBcIF"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gPuWUb3n"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="1bf2YfyD" 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 BEE2B225B4; Tue, 20 Aug 2024 09:35:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=anscDirCe0kDkiiMUDqa3Z/9pL9w2iv7UM9kq6z256U=; b=Qq9IC24/krLifMdKpRLK02tNDCyK7t6lIlI5f/XVNVzy+3GaDxqNG3PJ+LE2F1qy0xMQyj iamkokda7vdApvVm+tK4GtZcID4VKnMX2vsFADdtGrTVz5OM6K/CfI3fJ4cDEyKqvvUIlI mmHPWUD7CoJMyH2A73LrJLrRhkC09P8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=anscDirCe0kDkiiMUDqa3Z/9pL9w2iv7UM9kq6z256U=; b=2CRYBcIFakdSTQ2NbI9G35qTHq36zDdYWl5cqsd0T12HNtm5wmwlN4umnLzfWRjXbJTXb6 Fv6XIQL9f3FEiyDw== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=gPuWUb3n; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=1bf2YfyD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146509; 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=anscDirCe0kDkiiMUDqa3Z/9pL9w2iv7UM9kq6z256U=; b=gPuWUb3nW5mC/bpvAljkzSIX5ujb7bgwuooVm6WgoLRH5Ksosh90iDRBYiASaO0hXKKkPw zEAI46Fst6C47WM69KBE0wy5tuYk5hdz6wwfRLFDxggUwZkY5zQevrC3NadYWd4NYAD7uN wqJYnB6kBwjA6Hph07xT1tNUdx6DpVQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146509; 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=anscDirCe0kDkiiMUDqa3Z/9pL9w2iv7UM9kq6z256U=; b=1bf2YfyD5ph5z3ZQbCfmEfhBIyryj2dDl0lVP6ymeO/nAbsEo+cB50OJPhSsiRKUp6KBX/ ne2jSKvSNzhdAmDQ== 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 50E5013770; Tue, 20 Aug 2024 09:35:09 +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 qG53Ek1jxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:09 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 24/28] fbdev: omap: Use lcd power constants Date: Tue, 20 Aug 2024 11:23:02 +0200 Message-ID: <20240820093452.68270-25-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: BEE2B225B4 X-Spam-Level: X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:email,suse.de:dkim,suse.de:mid]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to(RLr3u6jgwj9sedc854c38mga),to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Rspamd-Action: no action X-Spam-Score: -3.01 X-Spam-Flag: NO Replace FB_BLANK_ constants with their counterparts from the lcd subsystem. The values are identical, so there's no change in functionality. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/omap/lcd_ams_delta.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/fbdev/omap/lcd_ams_delta.c b/drivers/video/fbdev/omap/lcd_ams_delta.c index 97e2b71b64d7..456e6e9e11a9 100644 --- a/drivers/video/fbdev/omap/lcd_ams_delta.c +++ b/drivers/video/fbdev/omap/lcd_ams_delta.c @@ -32,7 +32,7 @@ static struct gpio_desc *gpiod_ndisp; static int ams_delta_lcd_set_power(struct lcd_device *dev, int power) { - if (power == FB_BLANK_UNBLANK) { + if (power == LCD_POWER_ON) { if (!(ams_delta_lcd & AMS_DELTA_LCD_POWER)) { omap_writeb(ams_delta_lcd & AMS_DELTA_MAX_CONTRAST, OMAP_PWL_ENABLE); @@ -63,9 +63,9 @@ static int ams_delta_lcd_set_contrast(struct lcd_device *dev, int value) static int ams_delta_lcd_get_power(struct lcd_device *dev) { if (ams_delta_lcd & AMS_DELTA_LCD_POWER) - return FB_BLANK_UNBLANK; + return LCD_POWER_ON; else - return FB_BLANK_POWERDOWN; + return LCD_POWER_OFF; } static int ams_delta_lcd_get_contrast(struct lcd_device *dev) @@ -155,7 +155,7 @@ static int ams_delta_panel_probe(struct platform_device *pdev) #endif ams_delta_lcd_set_contrast(lcd_device, AMS_DELTA_DEFAULT_CONTRAST); - ams_delta_lcd_set_power(lcd_device, FB_BLANK_UNBLANK); + ams_delta_lcd_set_power(lcd_device, LCD_POWER_ON); omapfb_register_panel(&ams_delta_panel); return 0; From patchwork Tue Aug 20 09:23: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: 13769712 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 2156418D65D; Tue, 20 Aug 2024 09:35:12 +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=1724146513; cv=none; b=La7OU9ZGT6e9yjrquuuS8nWjIDpYfyKz30SjUlmYoblwLILbjfhzKBFHpkIx1GRhhYixz//vwr6mp0uYTwrsfBmqKR9oVeph+a1pmnbDnSJ1sNElIRIMMLa0isCh+5OVJv06Du1QthnuhqDFEnng34HxERqpmGI9ykal4amwvDw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146513; c=relaxed/simple; bh=2yl6Hso7HGBfHcI37MaTXCquafh2yLmgQUb1bUq1TtU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=kP9f1vE8zeBJH3qg3IZznkqgwJkaHTQ19qfDqX29C1DjZ1O0xqf+U2Km8HvH53AnHy54oiWCxP5DRM0Ki17Y3Gjz3eT1gkUfVng55mx4fhTvqsDCmcKJM6OFmWAm7RmrWtgEMapoMMrNY2BfaR62EfDmE57rZ+S8TnKO2tSbX2s= 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=jLofA7JD; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fmtUmkDZ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=jLofA7JD; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=fmtUmkDZ; 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="jLofA7JD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fmtUmkDZ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="jLofA7JD"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fmtUmkDZ" 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 28F9C1FFD8; Tue, 20 Aug 2024 09:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=L77ZX4ZusK24OhiJf9u5WYHoe5XJdoXRl6s07vCWReY=; b=jLofA7JDUOWUpogyiZWrBwvtESnxc1k5rODzOZsYVl7QH1+ZSflRVidR15YlzWvBHXB9nB BmU9H8DlqcN9fRw7vpQmMRrcTRnzSIrENS9LSePnFi1pXvA1QrO8Lg86JnbxwJqcQpjLIc yH6iNwyFF+Yph93tdeB8A2apV39J4tM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=L77ZX4ZusK24OhiJf9u5WYHoe5XJdoXRl6s07vCWReY=; b=fmtUmkDZjBNVsapr+cdVLVNhXUn3QLZJGgIHeahsfkc4q7xXEfWUidHMT6y4MwP39r//ds qV6ADGBBZL1EVQCg== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=jLofA7JD; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=fmtUmkDZ DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=L77ZX4ZusK24OhiJf9u5WYHoe5XJdoXRl6s07vCWReY=; b=jLofA7JDUOWUpogyiZWrBwvtESnxc1k5rODzOZsYVl7QH1+ZSflRVidR15YlzWvBHXB9nB BmU9H8DlqcN9fRw7vpQmMRrcTRnzSIrENS9LSePnFi1pXvA1QrO8Lg86JnbxwJqcQpjLIc yH6iNwyFF+Yph93tdeB8A2apV39J4tM= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=L77ZX4ZusK24OhiJf9u5WYHoe5XJdoXRl6s07vCWReY=; b=fmtUmkDZjBNVsapr+cdVLVNhXUn3QLZJGgIHeahsfkc4q7xXEfWUidHMT6y4MwP39r//ds qV6ADGBBZL1EVQCg== 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 B4BDC13B02; Tue, 20 Aug 2024 09:35:09 +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 GGf7Kk1jxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:09 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 25/28] HID: picoLCD: Replace check_fb in favor of struct fb_info.lcd_dev Date: Tue, 20 Aug 2024 11:23:03 +0200 Message-ID: <20240820093452.68270-26-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Rspamd-Queue-Id: 28F9C1FFD8 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; ARC_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; RCPT_COUNT_TWELVE(0.00)[16]; RCVD_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:dkim,suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo]; FROM_EQ_ENVFROM(0.00)[]; R_RATELIMIT(0.00)[to(RLr3u6jgwj9sedc854c38mga),to_ip_from(RLk469idygq4891mojaqehp6ty)]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Flag: NO X-Spam-Level: Store the lcd device in struct fb_info.lcd_dev. The lcd subsystem can now detect the lcd's fbdev device from this field. This makes the implementation of check_fb in picolcd_lcdops obsolete. Remove it. Signed-off-by: Thomas Zimmermann Acked-by: Jiri Kosina --- drivers/hid/hid-picolcd_fb.c | 4 ++++ drivers/hid/hid-picolcd_lcd.c | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/hid/hid-picolcd_fb.c b/drivers/hid/hid-picolcd_fb.c index 83e3409d170c..22188acfcbb0 100644 --- a/drivers/hid/hid-picolcd_fb.c +++ b/drivers/hid/hid-picolcd_fb.c @@ -497,6 +497,10 @@ int picolcd_init_framebuffer(struct picolcd_data *data) #endif #endif +#ifdef CONFIG_HID_PICOLCD_LCD + info->lcd_dev = data->lcd; +#endif + fbdata = info->par; spin_lock_init(&fbdata->lock); fbdata->picolcd = data; diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c index 061a33ba7b1d..318f19eac0e7 100644 --- a/drivers/hid/hid-picolcd_lcd.c +++ b/drivers/hid/hid-picolcd_lcd.c @@ -41,15 +41,9 @@ static int picolcd_set_contrast(struct lcd_device *ldev, int contrast) return 0; } -static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb) -{ - return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev)); -} - static const struct lcd_ops picolcd_lcdops = { .get_contrast = picolcd_get_contrast, .set_contrast = picolcd_set_contrast, - .check_fb = picolcd_check_lcd_fb, }; int picolcd_init_lcd(struct picolcd_data *data, struct hid_report *report) From patchwork Tue Aug 20 09:23: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: 13769714 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 3583D18DF65; Tue, 20 Aug 2024 09:35:12 +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=1724146514; cv=none; b=iMH9unUxecDf0szdSKatTiZF8Jrhrq46CBvXbe8/8GWhtqUMwbofQpivk8PT4N1A6a4JBrR/+L4HcsCAQLO6m1FC8xaG+NM/9T3yO32Kp8UeCxGx+IfiWuhjndy7xe4IfsuNgJen24bgIvXks9qMYfyAZRk11qAsZYbuzFXS7tw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146514; c=relaxed/simple; bh=zVAI5l+rvMvWthGssMub/cg8ZWuie4ndDMHr6d/5Idw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uIUR4Sjs4Fbg/wE79RAQM0ZvIL5+WESEUdxGA3re5i21L5Yfp7RISFCYiv18ekjoEKQdCxrAIndvs+AXN0BnEO0sThXxSTzGAICLWIHOxKkyxyCO5+tM3b9SG9ymOQl2DeNlnZlSOUmWutZRx2xeVBWjj66mC9LQTJ8m4ZgCKfI= 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=nNru4CrA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UFUt/JtZ; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=nNru4CrA; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=UFUt/JtZ; 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="nNru4CrA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UFUt/JtZ"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="nNru4CrA"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="UFUt/JtZ" 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 8F95C225B5; Tue, 20 Aug 2024 09:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=elrB9C7E2DmLnWiL3WWjuoe9Ak8wXSiKuHQyZVEZPBs=; b=nNru4CrAxSJR2RtgPw/YAYPseLz1rINlT7nulVPvZZskRaF2+YPVyNejg9mTz+hiAajVGx Dg0qiweHOCeJg3IZJ4DPwozhC0kszf3gqb8GKDWHjRch79N+HJje8dXt5u9Bh6Q/pCBS+a nTrV7pSlFgYRlXC3Fa11zVaziZNhmrI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=elrB9C7E2DmLnWiL3WWjuoe9Ak8wXSiKuHQyZVEZPBs=; b=UFUt/JtZnSb/JUlMmRqBMrOBb8EOfLnmGzC3sO42gZaWv3GnjsnpEMX3ZBFD4VTFIl2oNR eWi7cL47VbaT8KDA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=elrB9C7E2DmLnWiL3WWjuoe9Ak8wXSiKuHQyZVEZPBs=; b=nNru4CrAxSJR2RtgPw/YAYPseLz1rINlT7nulVPvZZskRaF2+YPVyNejg9mTz+hiAajVGx Dg0qiweHOCeJg3IZJ4DPwozhC0kszf3gqb8GKDWHjRch79N+HJje8dXt5u9Bh6Q/pCBS+a nTrV7pSlFgYRlXC3Fa11zVaziZNhmrI= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=elrB9C7E2DmLnWiL3WWjuoe9Ak8wXSiKuHQyZVEZPBs=; b=UFUt/JtZnSb/JUlMmRqBMrOBb8EOfLnmGzC3sO42gZaWv3GnjsnpEMX3ZBFD4VTFIl2oNR eWi7cL47VbaT8KDA== 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 2C29313B04; Tue, 20 Aug 2024 09:35:10 +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 IBWPCU5jxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:10 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 26/28] backlight: lcd: Replace check_fb with controls_device Date: Tue, 20 Aug 2024 11:23:04 +0200 Message-ID: <20240820093452.68270-27-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:mid,suse.de:email,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe),to(RLr3u6jgwj9sedc854c38mga)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: Rename check_fb in struct lcd_ops with controls_device. The callback is not independent from fbdev's struct fb_info and tests is an lcd device controls a hardware display device. The new naming and semantics follow similar funcionality for backlight devices. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/lcd.c | 2 +- drivers/video/backlight/platform_lcd.c | 11 +++++------ include/linux/lcd.h | 16 ++++++++++++---- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index edd5ccb7a43a..269ca9061df4 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -55,7 +55,7 @@ static int fb_notifier_callback(struct notifier_block *self, if (!ld->ops) goto out; - if (ld->ops->check_fb && !ld->ops->check_fb(ld, evdata->info)) + if (ld->ops->controls_device && !ld->ops->controls_device(ld, info->device)) goto out; if (fb_lcd && fb_lcd != ld) goto out; diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c index 69a22d1a8a35..c9fe50f4d8ed 100644 --- a/drivers/video/backlight/platform_lcd.c +++ b/drivers/video/backlight/platform_lcd.c @@ -9,7 +9,6 @@ #include #include -#include #include #include @@ -50,17 +49,17 @@ static int platform_lcd_set_power(struct lcd_device *lcd, int power) return 0; } -static int platform_lcd_match(struct lcd_device *lcd, struct fb_info *info) +static bool platform_lcd_controls_device(struct lcd_device *lcd, struct device *display_device) { struct platform_lcd *plcd = to_our_lcd(lcd); - return plcd->us->parent == info->device; + return plcd->us->parent == display_device; } static const struct lcd_ops platform_lcd_ops = { - .get_power = platform_lcd_get_power, - .set_power = platform_lcd_set_power, - .check_fb = platform_lcd_match, + .get_power = platform_lcd_get_power, + .set_power = platform_lcd_set_power, + .controls_device = platform_lcd_controls_device, }; static int platform_lcd_probe(struct platform_device *pdev) diff --git a/include/linux/lcd.h b/include/linux/lcd.h index dfcc54d327f5..8399b5ed48f2 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -35,7 +35,6 @@ */ struct lcd_device; -struct fb_info; struct lcd_properties { /* The maximum value for contrast (read-only) */ @@ -54,9 +53,18 @@ struct lcd_ops { int (*set_contrast)(struct lcd_device *, int contrast); /* Set LCD panel mode (resolutions ...) */ int (*set_mode)(struct lcd_device *, struct fb_videomode *); - /* Check if given framebuffer device is the one LCD is bound to; - return 0 if not, !=0 if it is. If NULL, lcd always matches the fb. */ - int (*check_fb)(struct lcd_device *, struct fb_info *); + + /* + * Check if the LCD controls the given display device. This + * operation is optional and if not implemented it is assumed that + * the display is always the one controlled by the LCD. + * + * RETURNS: + * + * If display_dev is NULL or display_dev matches the device controlled by + * the LCD, return true. Otherwise return false. + */ + bool (*controls_device)(struct lcd_device *lcd, struct device *display_device); }; struct lcd_device { From patchwork Tue Aug 20 09:23: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: 13769716 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 C3B7D18C009; Tue, 20 Aug 2024 09:35:12 +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=1724146514; cv=none; b=JGrq71i+DpuaxmSP86YrZ9/UuTOxkPkzAVilpsrHYxFludedwaEcnzC8m5ko6oG7UkO8yBaZlDWjOFcKInYwj8CpDvBYII80QhTfHi2JOwIOEpcW04zWpAhFqeWm+4LWeuNjUW5XAPqHpQkH5HgIYMNZ3xeHrLcKZZRju7x2czI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146514; c=relaxed/simple; bh=QT8xQV6RNSOd5l6dstb8UVKi+GWZJWO2fHIg1AxEC9c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c9UCh/ItHrdcZWrkHaVdPGqH+bCIJ7RdT4ITQ86U9NqrI2VyxUZxifrjSrKB08xjLYU1ka2oaf+uQu7hIvdWAYJOjTRdw/WkJ21x1UWzsY2OnGCPDfSHDDb05cF91Nicf4bPGLeiCadGKUGD04m8XDuWNUfoxJIX7h6DQ3Gk21Q= 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=uIYACor3; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=ZPGswT0t; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=zwUjRPb1; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=nClKwI/9; 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="uIYACor3"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="ZPGswT0t"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="zwUjRPb1"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="nClKwI/9" 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 F0D31225B7; Tue, 20 Aug 2024 09:35:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146511; 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=p63KhcGtKnHj155HSsgKo8Nh4/ILHUSpGMU5GB1JHh0=; b=uIYACor3QBrASZoCcAYb6l6PsKGxdLQwr+1CQMHh/idyfCaMsWrabGHuPKDWb7gPB9czs3 gFFgf1JxMetzxExp3M9VlVXUqEdgL1U+uUhKVmSw5jGdEY/GrkrTZgqiqDjAytCBw7OLFo X0szJ/YReTc/gNzmqrvHKC9xMAfR5VA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146511; 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=p63KhcGtKnHj155HSsgKo8Nh4/ILHUSpGMU5GB1JHh0=; b=ZPGswT0t1zaP+jmg7nxfbOalJMnwXJ5LyUI96IuFvVrUnYZRpf0MaPtfXxcgSiJWpfS+JQ T4GAfDY7PXVuXVAA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146510; 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=p63KhcGtKnHj155HSsgKo8Nh4/ILHUSpGMU5GB1JHh0=; b=zwUjRPb1jsvhci+8cYzCN9MV0MjGTBi5EGxDLEVSVFePJalB6pugVSLPvs9c22b4YyrJBQ OHEfcCxWLUjrqg9qhhn2rbxjIRfYeeF05dNhqB37ExKBm/VxBtkXMyWyBKckbZSsF8IXKY TgoLRJc/HsstWL1ADZ5ER9rcQl/Zo2U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146510; 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=p63KhcGtKnHj155HSsgKo8Nh4/ILHUSpGMU5GB1JHh0=; b=nClKwI/9x6dYCEfj3JG10kfXSrQERUPQk4tKn+qGUlkei7x+xCP8NGtzEbPdRhZzV31BF/ XxpM6mhYnwBmXTDQ== 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 92D5D13B10; Tue, 20 Aug 2024 09:35:10 +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 YBO6Ik5jxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:10 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 27/28] backlight: lcd: Remove struct fb_videomode from set_mode callback Date: Tue, 20 Aug 2024 11:23:05 +0200 Message-ID: <20240820093452.68270-28-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Level: X-Spamd-Result: default: False [-2.80 / 50.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]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; RCPT_COUNT_TWELVE(0.00)[16]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,suse.de:mid,imap1.dmz-prg2.suse.org:helo]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; RCVD_TLS_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; R_RATELIMIT(0.00)[to_ip_from(RL7eb4yoy35resap1sns3bbybe),to(RLr3u6jgwj9sedc854c38mga)]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Score: -2.80 X-Spam-Flag: NO Implementations of struct lcd_ops.set_mode only require the resolution from struct fb_videomode. Pass the xres and yres fields, but remove the dependency on the fbdev data structure. Signed-off-by: Thomas Zimmermann --- drivers/video/backlight/corgi_lcd.c | 5 ++--- drivers/video/backlight/lcd.c | 4 +++- drivers/video/backlight/tdo24m.c | 5 ++--- include/linux/lcd.h | 7 +++++-- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 35c3fd3281ca..69f49371ea35 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c @@ -17,7 +17,6 @@ #include #include #include -#include #include #include #include @@ -332,12 +331,12 @@ static void corgi_lcd_power_off(struct corgi_lcd *lcd) POWER1_VW_OFF | POWER1_GVSS_OFF | POWER1_VDD_OFF); } -static int corgi_lcd_set_mode(struct lcd_device *ld, struct fb_videomode *m) +static int corgi_lcd_set_mode(struct lcd_device *ld, u32 xres, u32 yres) { struct corgi_lcd *lcd = lcd_get_data(ld); int mode = CORGI_LCD_MODE_QVGA; - if (m->xres == 640 || m->xres == 480) + if (xres == 640 || xres == 480) mode = CORGI_LCD_MODE_VGA; if (lcd->mode == mode) diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 269ca9061df4..ed2095d54df9 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -66,8 +66,10 @@ static int fb_notifier_callback(struct notifier_block *self, if (ld->ops->set_power) ld->ops->set_power(ld, power); } else { + const struct fb_videomode *videomode = evdata->data; + if (ld->ops->set_mode) - ld->ops->set_mode(ld, evdata->data); + ld->ops->set_mode(ld, videomode->xres, videomode->yres); } out: diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c index a14a94114e9d..c04ee3d04d87 100644 --- a/drivers/video/backlight/tdo24m.c +++ b/drivers/video/backlight/tdo24m.c @@ -12,7 +12,6 @@ #include #include #include -#include #include #include @@ -308,12 +307,12 @@ static int tdo24m_get_power(struct lcd_device *ld) return lcd->power; } -static int tdo24m_set_mode(struct lcd_device *ld, struct fb_videomode *m) +static int tdo24m_set_mode(struct lcd_device *ld, u32 xres, u32 yres) { struct tdo24m *lcd = lcd_get_data(ld); int mode = MODE_QVGA; - if (m->xres == 640 || m->xres == 480) + if (xres == 640 || xres == 480) mode = MODE_VGA; if (lcd->mode == mode) diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 8399b5ed48f2..59a80b396a71 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -51,8 +51,11 @@ struct lcd_ops { int (*get_contrast)(struct lcd_device *); /* Set LCD panel contrast */ int (*set_contrast)(struct lcd_device *, int contrast); - /* Set LCD panel mode (resolutions ...) */ - int (*set_mode)(struct lcd_device *, struct fb_videomode *); + + /* + * Set LCD panel mode (resolutions ...) + */ + int (*set_mode)(struct lcd_device *lcd, u32 xres, u32 yres); /* * Check if the LCD controls the given display device. This From patchwork Tue Aug 20 09:23: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: 13769717 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 ECF6618C918; Tue, 20 Aug 2024 09:35:12 +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=1724146514; cv=none; b=QkAd3ltszeYjzxyCELMVW0mS83kYU6A1Q2WrABc0wEil0JufHNiTTvAWfWxwE3ByaBe7CQOhOFhpTyfl2RgyTVrRjiAmRWzoKPpg2i+Ix4ly5mgPeIgcqdPepJvptStX1FoTrgjWDxYV181MpFuaCJUzR5GrPHC1zAHxE4aXpSU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724146514; c=relaxed/simple; bh=/4dihsU/xlFpgnq6lqk5X0nm0Po3VNwUN4YZAAZHEuw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AMNkvCQIkDAbyz1RO9ynHezYtmwlynMgDCZFpu6oBkKE4oqtcyVyitJEjRCulZqxLxSq98MScQQyX4Czt0qviAPoAKZD7uoPiJTIcJvTrx7+Vi0iM06WBkiWyEwbwBg4mjQXjGcpkb6hNUDHlJZ0EB/94k+4BvURZpFyGIpDk40= 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=aRywnqQq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=TFBJknGR; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=aRywnqQq; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=TFBJknGR; 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="aRywnqQq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="TFBJknGR"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="aRywnqQq"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="TFBJknGR" 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 6A861225B6; Tue, 20 Aug 2024 09:35:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146511; 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=17S1lOwBlZ4ZwI5HR27QexSgcKc55keHcjdB1iyt98c=; b=aRywnqQqB1mofpGwIGjIZMuNYZMIfLlNsFSrPaHjPyWZIjOStnMAhcCcOCw39DgfJromJr X2SKj9AuWroHZ6at3hykRfd6f0BsvPfAY3S8ADWeaEqADk97v9UE75VBI4Wt+Wkk++RFrJ IlKxgV5hfJWSZh4E2K+eha4JC7rGopQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146511; 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=17S1lOwBlZ4ZwI5HR27QexSgcKc55keHcjdB1iyt98c=; b=TFBJknGRTk5K1DABWSmpaDZu9AryCZtMvBDccAH4tHoXae/ndh9Vj4HW5A7Q5IsuMvS0oW NNY7mxQUsdz/9WAA== Authentication-Results: smtp-out1.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1724146511; 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=17S1lOwBlZ4ZwI5HR27QexSgcKc55keHcjdB1iyt98c=; b=aRywnqQqB1mofpGwIGjIZMuNYZMIfLlNsFSrPaHjPyWZIjOStnMAhcCcOCw39DgfJromJr X2SKj9AuWroHZ6at3hykRfd6f0BsvPfAY3S8ADWeaEqADk97v9UE75VBI4Wt+Wkk++RFrJ IlKxgV5hfJWSZh4E2K+eha4JC7rGopQ= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1724146511; 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=17S1lOwBlZ4ZwI5HR27QexSgcKc55keHcjdB1iyt98c=; b=TFBJknGRTk5K1DABWSmpaDZu9AryCZtMvBDccAH4tHoXae/ndh9Vj4HW5A7Q5IsuMvS0oW NNY7mxQUsdz/9WAA== 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 0202C13770; Tue, 20 Aug 2024 09:35:10 +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 cCvoOk5jxGa3RAAAD6G6ig (envelope-from ); Tue, 20 Aug 2024 09:35:10 +0000 From: Thomas Zimmermann To: lee@kernel.org, daniel.thompson@linaro.org, jingoohan1@gmail.com, deller@gmx.de, bonbons@linux-vserver.org, jikos@kernel.org, bentiss@kernel.org, shc_work@mail.ru, s.hauer@pengutronix.de, kernel@pengutronix.de, shawnguo@kernel.org, festevam@gmail.com Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-omap@vger.kernel.org, Thomas Zimmermann Subject: [PATCH 28/28] backlight: lcd: Do not include in lcd header Date: Tue, 20 Aug 2024 11:23:06 +0200 Message-ID: <20240820093452.68270-29-tzimmermann@suse.de> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240820093452.68270-1-tzimmermann@suse.de> References: <20240820093452.68270-1-tzimmermann@suse.de> Precedence: bulk X-Mailing-List: linux-fbdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.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]; RCPT_COUNT_TWELVE(0.00)[16]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FREEMAIL_TO(0.00)[kernel.org,linaro.org,gmail.com,gmx.de,linux-vserver.org,mail.ru,pengutronix.de]; FUZZY_BLOCKED(0.00)[rspamd.com]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; R_RATELIMIT(0.00)[to(RLr3u6jgwj9sedc854c38mga),to_ip_from(RL7eb4yoy35resap1sns3bbybe)]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; RCVD_VIA_SMTP_AUTH(0.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:email]; FREEMAIL_ENVRCPT(0.00)[gmail.com,gmx.de,mail.ru] X-Spam-Flag: NO X-Spam-Level: With the excpetion of fb_notifier_callback(), none of the lcd code uses fbdev; especially the lcd drivers. Remove the include statement for from the public lcd header. Signed-off-by: Thomas Zimmermann --- include/linux/lcd.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/linux/lcd.h b/include/linux/lcd.h index 59a80b396a71..c3ccdff4519a 100644 --- a/include/linux/lcd.h +++ b/include/linux/lcd.h @@ -12,7 +12,6 @@ #include #include #include -#include #define LCD_POWER_ON (0) #define LCD_POWER_REDUCED (1) // deprecated; don't use in new code