drivers/auxdisplay/hd44780_common.c
Source file repositories/reference/linux-study-clean/drivers/auxdisplay/hd44780_common.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/auxdisplay/hd44780_common.c- Extension
.c- Size
- 9847 bytes
- Lines
- 380
- Domain
- Driver Families
- Bucket
- drivers/auxdisplay
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/hex.hlinux/module.hlinux/sched.hlinux/slab.hcharlcd.hhd44780_common.h
Detected Declarations
function long_sleepfunction hd44780_common_printfunction hd44780_common_gotoxyfunction hd44780_common_homefunction hd44780_common_clear_displayfunction hd44780_common_init_displayfunction hd44780_common_shift_cursorfunction hd44780_common_shift_displayfunction hd44780_common_set_modefunction hd44780_common_displayfunction hd44780_common_cursorfunction hd44780_common_blinkfunction hd44780_common_set_functionfunction hd44780_common_fontsizefunction hd44780_common_linesfunction hd44780_common_redefine_charfunction hd44780_common_freeexport hd44780_common_printexport hd44780_common_gotoxyexport hd44780_common_homeexport hd44780_common_clear_displayexport hd44780_common_init_displayexport hd44780_common_shift_cursorexport hd44780_common_shift_displayexport hd44780_common_displayexport hd44780_common_cursorexport hd44780_common_blinkexport hd44780_common_fontsizeexport hd44780_common_linesexport hd44780_common_redefine_charexport hd44780_common_allocexport hd44780_common_free
Annotated Snippet
if (shift == 0) {
cgbytes[cgoffset++] = value;
value = 0;
}
}
hdc->write_cmd(hdc, LCD_CMD_SET_CGRAM_ADDR | (cgaddr * 8));
for (addr = 0; addr < cgoffset; addr++)
hdc->write_data(hdc, cgbytes[addr]);
/* ensures that we stop writing to CGRAM */
lcd->ops->gotoxy(lcd, lcd->addr.x, lcd->addr.y);
return 1;
}
EXPORT_SYMBOL_GPL(hd44780_common_redefine_char);
struct charlcd *hd44780_common_alloc(void)
{
struct hd44780_common *hdc;
struct charlcd *lcd;
lcd = charlcd_alloc(sizeof(*hdc));
if (!lcd)
return NULL;
hdc = lcd->drvdata;
hdc->ifwidth = 8;
hdc->bwidth = DEFAULT_LCD_BWIDTH;
hdc->hwidth = DEFAULT_LCD_HWIDTH;
return lcd;
}
EXPORT_SYMBOL_GPL(hd44780_common_alloc);
void hd44780_common_free(struct charlcd *lcd)
{
charlcd_free(lcd);
}
EXPORT_SYMBOL_GPL(hd44780_common_free);
MODULE_DESCRIPTION("Common functions for HD44780 (and compatibles) LCD displays");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/hex.h`, `linux/module.h`, `linux/sched.h`, `linux/slab.h`, `charlcd.h`, `hd44780_common.h`.
- Detected declarations: `function long_sleep`, `function hd44780_common_print`, `function hd44780_common_gotoxy`, `function hd44780_common_home`, `function hd44780_common_clear_display`, `function hd44780_common_init_display`, `function hd44780_common_shift_cursor`, `function hd44780_common_shift_display`, `function hd44780_common_set_mode`, `function hd44780_common_display`.
- Atlas domain: Driver Families / drivers/auxdisplay.
- Implementation status: integration 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.