1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Character line display core support
5 * Copyright (C) 2016 Imagination Technologies
6 * Author: Paul Burton <paul.burton@mips.com>
8 * Copyright (C) 2021 Glider bv
15 * struct linedisp - character line display private data structure
16 * @dev: the line display device
17 * @timer: timer used to implement scrolling
18 * @update: function called to update the display
19 * @buf: pointer to the buffer for the string currently displayed
20 * @message: the full message to display or scroll on the display
21 * @num_chars: the number of characters that can be displayed
22 * @message_len: the length of the @message string
23 * @scroll_pos: index of the first character of @message currently displayed
24 * @scroll_rate: scroll interval in jiffies
28 struct timer_list timer;
29 void (*update)(struct linedisp *linedisp);
32 unsigned int num_chars;
33 unsigned int message_len;
34 unsigned int scroll_pos;
35 unsigned int scroll_rate;
38 int linedisp_register(struct linedisp *linedisp, struct device *parent,
39 unsigned int num_chars, char *buf,
40 void (*update)(struct linedisp *linedisp));
41 void linedisp_unregister(struct linedisp *linedisp);
43 #endif /* LINEDISP_H */