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
14 #include <linux/device.h>
15 #include <linux/timer_types.h>
18 * struct linedisp - character line display private data structure
19 * @dev: the line display device
20 * @timer: timer used to implement scrolling
21 * @update: function called to update the display
22 * @buf: pointer to the buffer for the string currently displayed
23 * @message: the full message to display or scroll on the display
24 * @num_chars: the number of characters that can be displayed
25 * @message_len: the length of the @message string
26 * @scroll_pos: index of the first character of @message currently displayed
27 * @scroll_rate: scroll interval in jiffies
28 * @id: instance id of this display
32 struct timer_list timer;
33 void (*update)(struct linedisp *linedisp);
36 unsigned int num_chars;
37 unsigned int message_len;
38 unsigned int scroll_pos;
39 unsigned int scroll_rate;
43 int linedisp_register(struct linedisp *linedisp, struct device *parent,
44 unsigned int num_chars, char *buf,
45 void (*update)(struct linedisp *linedisp));
46 void linedisp_unregister(struct linedisp *linedisp);
48 #endif /* LINEDISP_H */