diff options
author | Lars Poeschel <poeschel@lemonage.de> | 2020-11-03 10:58:04 +0100 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2020-11-04 11:04:02 +0100 |
commit | 66ce7d5c1e124b497f45aead50df1dc3c2873382 (patch) | |
tree | 143def44391be1603ab0ab342d83c1df2fe69415 /drivers/auxdisplay/charlcd.h | |
parent | 3cea11cd5e3b00d91caf0b4730194039b45c5891 (diff) | |
download | linux-66ce7d5c1e124b497f45aead50df1dc3c2873382.tar.bz2 |
auxdisplay: Use an enum for charlcd backlight on/off ops
We use an enum for calling the functions in charlcd, that turn the
backlight on or off. This enum is generic and can be used for other
charlcd turn on / turn off operations as well.
Reviewed-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay/charlcd.h')
-rw-r--r-- | drivers/auxdisplay/charlcd.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/auxdisplay/charlcd.h b/drivers/auxdisplay/charlcd.h index 00911ad0f3de..c66f038e5d2b 100644 --- a/drivers/auxdisplay/charlcd.h +++ b/drivers/auxdisplay/charlcd.h @@ -9,6 +9,11 @@ #ifndef _CHARLCD_H #define _CHARLCD_H +enum charlcd_onoff { + CHARLCD_OFF = 0, + CHARLCD_ON, +}; + struct charlcd { const struct charlcd_ops *ops; const unsigned char *char_conv; /* Optional */ @@ -30,7 +35,7 @@ struct charlcd_ops { /* Optional */ void (*write_cmd_raw4)(struct charlcd *lcd, int cmd); /* 4-bit only */ void (*clear_fast)(struct charlcd *lcd); - void (*backlight)(struct charlcd *lcd, int on); + void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on); }; struct charlcd *charlcd_alloc(unsigned int drvdata_size); |