From 2c3c1048746a4622d8c89a29670120dc8fab93c4 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:49:45 +0200 Subject: Adding upstream version 6.1.76. Signed-off-by: Daniel Baumann --- drivers/auxdisplay/line-display.h | 43 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 drivers/auxdisplay/line-display.h (limited to 'drivers/auxdisplay/line-display.h') diff --git a/drivers/auxdisplay/line-display.h b/drivers/auxdisplay/line-display.h new file mode 100644 index 000000000..0f5891d34 --- /dev/null +++ b/drivers/auxdisplay/line-display.h @@ -0,0 +1,43 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +/* + * Character line display core support + * + * Copyright (C) 2016 Imagination Technologies + * Author: Paul Burton + * + * Copyright (C) 2021 Glider bv + */ + +#ifndef _LINEDISP_H +#define _LINEDISP_H + +/** + * struct linedisp - character line display private data structure + * @dev: the line display device + * @timer: timer used to implement scrolling + * @update: function called to update the display + * @buf: pointer to the buffer for the string currently displayed + * @message: the full message to display or scroll on the display + * @num_chars: the number of characters that can be displayed + * @message_len: the length of the @message string + * @scroll_pos: index of the first character of @message currently displayed + * @scroll_rate: scroll interval in jiffies + */ +struct linedisp { + struct device dev; + struct timer_list timer; + void (*update)(struct linedisp *linedisp); + char *buf; + char *message; + unsigned int num_chars; + unsigned int message_len; + unsigned int scroll_pos; + unsigned int scroll_rate; +}; + +int linedisp_register(struct linedisp *linedisp, struct device *parent, + unsigned int num_chars, char *buf, + void (*update)(struct linedisp *linedisp)); +void linedisp_unregister(struct linedisp *linedisp); + +#endif /* LINEDISP_H */ -- cgit v1.2.3