drivers/auxdisplay/line-display.h
Source file repositories/reference/linux-study-clean/drivers/auxdisplay/line-display.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/auxdisplay/line-display.h- Extension
.h- Size
- 2635 bytes
- Lines
- 93
- Domain
- Driver Families
- Bucket
- drivers/auxdisplay
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/device.hlinux/timer_types.hlinux/map_to_7segment.hlinux/map_to_14segment.h
Detected Declarations
struct linedispstruct linedisp_mapstruct linedisp_opsstruct linedispenum linedisp_map_type
Annotated Snippet
struct linedisp_map {
enum linedisp_map_type type;
union {
struct seg7_conversion_map seg7;
struct seg14_conversion_map seg14;
} map;
unsigned int size;
};
/**
* struct linedisp_ops - character line display operations
* @get_map_type: Function called to get the character mapping, if required
* @update: Function called to update the display. This must not sleep!
*/
struct linedisp_ops {
int (*get_map_type)(struct linedisp *linedisp);
void (*update)(struct linedisp *linedisp);
};
/**
* struct linedisp - character line display private data structure
* @dev: the line display device
* @timer: timer used to implement scrolling
* @ops: character line display operations
* @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
* @id: instance id of this display
*/
struct linedisp {
struct device dev;
struct timer_list timer;
const struct linedisp_ops *ops;
struct linedisp_map *map;
char *buf;
char *message;
unsigned int num_chars;
unsigned int message_len;
unsigned int scroll_pos;
unsigned int scroll_rate;
unsigned int id;
};
int linedisp_attach(struct linedisp *linedisp, struct device *dev,
unsigned int num_chars, const struct linedisp_ops *ops);
void linedisp_detach(struct device *dev);
int linedisp_register(struct linedisp *linedisp, struct device *parent,
unsigned int num_chars, const struct linedisp_ops *ops);
void linedisp_unregister(struct linedisp *linedisp);
#endif /* LINEDISP_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/timer_types.h`, `linux/map_to_7segment.h`, `linux/map_to_14segment.h`.
- Detected declarations: `struct linedisp`, `struct linedisp_map`, `struct linedisp_ops`, `struct linedisp`, `enum linedisp_map_type`.
- Atlas domain: Driver Families / drivers/auxdisplay.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.