drivers/auxdisplay/charlcd.h
Source file repositories/reference/linux-study-clean/drivers/auxdisplay/charlcd.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/auxdisplay/charlcd.h- Extension
.h- Size
- 3344 bytes
- Lines
- 108
- 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
- No C-style include directives detected by the generator.
Detected Declarations
struct charlcd_opsstruct charlcdstruct charlcd_opsenum charlcd_onoffenum charlcd_shift_direnum charlcd_fontsizeenum charlcd_lines
Annotated Snippet
struct charlcd {
const struct charlcd_ops *ops;
const unsigned char *char_conv; /* Optional */
int height;
int width;
/* Contains the LCD X and Y offset */
struct {
unsigned long x;
unsigned long y;
} addr;
void *drvdata; /* Set by charlcd_alloc() */
};
/**
* struct charlcd_ops - Functions used by charlcd. Drivers have to implement
* these.
* @backlight: Turn backlight on or off. Optional.
* @print: Print one character to the display at current cursor position.
* The buffered cursor position is advanced by charlcd. The cursor should not
* wrap to the next line at the end of a line.
* @gotoxy: Set cursor to x, y. The x and y values to set the cursor to are
* previously set in addr.x and addr.y by charlcd.
* @home: Set cursor to 0, 0. The values in addr.x and addr.y are set to 0, 0 by
* charlcd prior to calling this function.
* @clear_display: Clear the whole display and set the cursor to 0, 0. The
* values in addr.x and addr.y are set to 0, 0 by charlcd after to calling this
* function.
* @init_display: Initialize the display.
* @shift_cursor: Shift cursor left or right one position.
* @shift_display: Shift whole display content left or right.
* @display: Turn display on or off.
* @cursor: Turn cursor on or off.
* @blink: Turn cursor blink on or off.
* @lines: One or two lines.
* @redefine_char: Redefine the actual pixel matrix of character.
*/
struct charlcd_ops {
void (*backlight)(struct charlcd *lcd, enum charlcd_onoff on);
int (*print)(struct charlcd *lcd, int c);
int (*gotoxy)(struct charlcd *lcd, unsigned int x, unsigned int y);
int (*home)(struct charlcd *lcd);
int (*clear_display)(struct charlcd *lcd);
int (*init_display)(struct charlcd *lcd);
int (*shift_cursor)(struct charlcd *lcd, enum charlcd_shift_dir dir);
int (*shift_display)(struct charlcd *lcd, enum charlcd_shift_dir dir);
int (*display)(struct charlcd *lcd, enum charlcd_onoff on);
int (*cursor)(struct charlcd *lcd, enum charlcd_onoff on);
int (*blink)(struct charlcd *lcd, enum charlcd_onoff on);
int (*fontsize)(struct charlcd *lcd, enum charlcd_fontsize size);
int (*lines)(struct charlcd *lcd, enum charlcd_lines lines);
int (*redefine_char)(struct charlcd *lcd, char *esc);
};
void charlcd_backlight(struct charlcd *lcd, enum charlcd_onoff on);
struct charlcd *charlcd_alloc(unsigned int drvdata_size);
void charlcd_free(struct charlcd *lcd);
int charlcd_register(struct charlcd *lcd);
int charlcd_unregister(struct charlcd *lcd);
void charlcd_poke(struct charlcd *lcd);
#endif /* CHARLCD_H */
Annotation
- Detected declarations: `struct charlcd_ops`, `struct charlcd`, `struct charlcd_ops`, `enum charlcd_onoff`, `enum charlcd_shift_dir`, `enum charlcd_fontsize`, `enum charlcd_lines`.
- 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.