linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 13/32] auxdisplay: Make use of enum for backlight on / off
@ 2020-10-05 13:01 poeschel
  2020-10-05 13:01 ` [PATCH v4 14/32] auxdisplay: Move init_display to hd44780_common poeschel
                   ` (18 more replies)
  0 siblings, 19 replies; 24+ messages in thread
From: poeschel @ 2020-10-05 13:01 UTC (permalink / raw)
  To: Miguel Ojeda Sandonis, open list; +Cc: Lars Poeschel, Willy Tarreau

From: Lars Poeschel <poeschel@lemonage.de>

To turn the backlight on or off use our new enum CHARLCD_ON /
CHARLCD_OFF.

Reviewed-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
---
 drivers/auxdisplay/charlcd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/auxdisplay/charlcd.c b/drivers/auxdisplay/charlcd.c
index 154419513186..9631f70e8128 100644
--- a/drivers/auxdisplay/charlcd.c
+++ b/drivers/auxdisplay/charlcd.c
@@ -115,7 +115,7 @@ static void charlcd_bl_off(struct work_struct *work)
 	if (priv->bl_tempo) {
 		priv->bl_tempo = false;
 		if (!(priv->flags & LCD_FLAG_L))
-			priv->lcd.ops->backlight(&priv->lcd, 0);
+			priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF);
 	}
 	mutex_unlock(&priv->bl_tempo_lock);
 }
@@ -132,7 +132,7 @@ void charlcd_poke(struct charlcd *lcd)
 
 	mutex_lock(&priv->bl_tempo_lock);
 	if (!priv->bl_tempo && !(priv->flags & LCD_FLAG_L))
-		lcd->ops->backlight(lcd, 1);
+		lcd->ops->backlight(lcd, CHARLCD_ON);
 	priv->bl_tempo = true;
 	schedule_delayed_work(&priv->bl_work, LCD_BL_TEMPO_PERIOD * HZ);
 	mutex_unlock(&priv->bl_tempo_lock);
@@ -829,7 +829,7 @@ int charlcd_unregister(struct charlcd *lcd)
 	the_charlcd = NULL;
 	if (lcd->ops->backlight) {
 		cancel_delayed_work_sync(&priv->bl_work);
-		priv->lcd.ops->backlight(&priv->lcd, 0);
+		priv->lcd.ops->backlight(&priv->lcd, CHARLCD_OFF);
 	}
 
 	return 0;
-- 
2.28.0


^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2020-10-16  3:28 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 13:01 [PATCH v4 13/32] auxdisplay: Make use of enum for backlight on / off poeschel
2020-10-05 13:01 ` [PATCH v4 14/32] auxdisplay: Move init_display to hd44780_common poeschel
2020-10-16  3:16   ` Miguel Ojeda
2020-10-05 13:01 ` [PATCH v4 15/32] auxdisplay: implement hd44780_common_shift_cursor poeschel
2020-10-05 13:01 ` [PATCH v4 16/32] auxdisplay: Implement hd44780_common_display_shift poeschel
2020-10-05 13:01 ` [PATCH v4 17/32] auxdisplay: Implement a hd44780_common_display poeschel
2020-10-05 13:01 ` [PATCH v4 18/32] auxdisplay: Implement hd44780_common_cursor poeschel
2020-10-05 13:01 ` [PATCH v4 19/32] auxdisplay: Implement hd44780_common_blink poeschel
2020-10-05 13:01 ` [PATCH v4 20/32] auxdisplay: cleanup unnecessary hd44780 code in charlcd poeschel
2020-10-05 13:01 ` [PATCH v4 21/32] auxdisplay: Implement hd44780_common_fontsize poeschel
2020-10-05 13:01 ` [PATCH v4 22/32] auxdisplay: Implement hd44780_common_lines poeschel
2020-10-05 13:01 ` [PATCH v4 23/32] auxdisplay: Remove unnecessary hd44780 from charlcd poeschel
2020-10-05 13:01 ` [PATCH v4 24/32] auxdisplay: Move char redefine code to hd44780_common poeschel
2020-10-16  3:19   ` Miguel Ojeda
2020-10-05 13:01 ` [PATCH v4 25/32] auxdisplay: Call charlcd_backlight in place poeschel
2020-10-05 13:01 ` [PATCH v4 26/32] auxdisplay: hd44780_common: Reduce clear_display timeout poeschel
2020-10-05 13:01 ` [PATCH v4 27/32] auxdisplay: hd44780: Remove clear_fast poeschel
2020-10-05 13:01 ` [PATCH v4 28/32] auxdisplay: charlcd: replace last device specific stuff poeschel
2020-10-05 13:01 ` [PATCH v4 29/32] auxdisplay: Change gotoxy calling interface poeschel
2020-10-05 13:01 ` [PATCH v4 30/32] auxdisplay: charlcd: Do not print chars at end of line poeschel
2020-10-05 13:01 ` [PATCH v4 31/32] auxdisplay: lcd2s DT binding doc poeschel
2020-10-06 21:56   ` Rob Herring
2020-10-05 13:01 ` [PATCH v4 32/32] auxdisplay: add a driver for lcd2s character display poeschel
2020-10-16  3:25   ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).