drivers/video/fbdev/broadsheetfb.c
Source file repositories/reference/linux-study-clean/drivers/video/fbdev/broadsheetfb.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/video/fbdev/broadsheetfb.c- Extension
.c- Size
- 27521 bytes
- Lines
- 1170
- Domain
- Driver Families
- Bucket
- drivers/video
- 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.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/kernel.hlinux/errno.hlinux/string.hlinux/mm.hlinux/slab.hlinux/vmalloc.hlinux/delay.hlinux/interrupt.hlinux/fb.hlinux/init.hlinux/platform_device.hlinux/list.hlinux/firmware.hlinux/uaccess.hvideo/broadsheetfb.h
Detected Declarations
struct panel_infofunction broadsheet_gpio_issue_datafunction broadsheet_gpio_issue_cmdfunction broadsheet_gpio_send_commandfunction broadsheet_gpio_send_cmdargsfunction broadsheet_mmio_send_cmdargsfunction broadsheet_send_commandfunction broadsheet_send_cmdargsfunction broadsheet_gpio_burst_writefunction broadsheet_mmio_burst_writefunction broadsheet_burst_writefunction broadsheet_gpio_get_datafunction broadsheet_get_datafunction broadsheet_gpio_write_regfunction broadsheet_mmio_write_regfunction broadsheet_write_regfunction broadsheet_write_reg32function broadsheet_read_regfunction is_broadsheet_pll_lockedfunction broadsheet_setup_pllsfunction broadsheet_setup_spifunction broadsheet_setup_spiflashfunction broadsheet_spiflash_wait_for_bitfunction broadsheet_spiflash_write_bytefunction broadsheet_spiflash_read_bytefunction broadsheet_spiflash_wait_for_statusfunction broadsheet_spiflash_op_on_addressfunction broadsheet_verify_spiflashfunction broadsheet_setup_for_wfm_writefunction broadsheet_spiflash_write_controlfunction broadsheet_spiflash_erase_sectorfunction broadsheet_spiflash_read_rangefunction broadsheet_spiflash_write_pagefunction broadsheet_spiflash_write_sectorfunction broadsheet_spiflash_rewrite_sectorfunction broadsheet_write_spiflashfunction broadsheet_store_waveform_to_spiflashfunction broadsheet_loadstore_waveformfunction broadsheet_init_displayfunction broadsheet_identifyfunction broadsheet_initfunction broadsheetfb_dpy_update_pagesfunction broadsheetfb_dpy_updatefunction broadsheetfb_dpy_deferred_iofunction broadsheetfb_defio_damage_rangefunction broadsheetfb_defio_damage_areafunction broadsheetfb_probefunction broadsheetfb_remove
Annotated Snippet
struct panel_info {
int w;
int h;
u16 sdcfg;
u16 gdcfg;
u16 lutfmt;
u16 fsynclen;
u16 fendfbegin;
u16 lsynclen;
u16 lendlbegin;
u16 pixclk;
};
/* table of panel specific parameters to be indexed into by the board drivers */
static struct panel_info panel_table[] = {
{ /* standard 6" on TFT backplane */
.w = 800,
.h = 600,
.sdcfg = (100 | (1 << 8) | (1 << 9)),
.gdcfg = 2,
.lutfmt = (4 | (1 << 7)),
.fsynclen = 4,
.fendfbegin = (10 << 8) | 4,
.lsynclen = 10,
.lendlbegin = (100 << 8) | 4,
.pixclk = 6,
},
{ /* custom 3.7" flexible on PET or steel */
.w = 320,
.h = 240,
.sdcfg = (67 | (0 << 8) | (0 << 9) | (0 << 10) | (0 << 12)),
.gdcfg = 3,
.lutfmt = (4 | (1 << 7)),
.fsynclen = 0,
.fendfbegin = (80 << 8) | 4,
.lsynclen = 10,
.lendlbegin = (80 << 8) | 20,
.pixclk = 14,
},
{ /* standard 9.7" on TFT backplane */
.w = 1200,
.h = 825,
.sdcfg = (100 | (1 << 8) | (1 << 9) | (0 << 10) | (0 << 12)),
.gdcfg = 2,
.lutfmt = (4 | (1 << 7)),
.fsynclen = 0,
.fendfbegin = (4 << 8) | 4,
.lsynclen = 4,
.lendlbegin = (60 << 8) | 10,
.pixclk = 3,
},
};
#define DPY_W 800
#define DPY_H 600
static struct fb_fix_screeninfo broadsheetfb_fix = {
.id = "broadsheetfb",
.type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_STATIC_PSEUDOCOLOR,
.xpanstep = 0,
.ypanstep = 0,
.ywrapstep = 0,
.line_length = DPY_W,
.accel = FB_ACCEL_NONE,
};
static struct fb_var_screeninfo broadsheetfb_var = {
.xres = DPY_W,
.yres = DPY_H,
.xres_virtual = DPY_W,
.yres_virtual = DPY_H,
.bits_per_pixel = 8,
.grayscale = 1,
.red = { 0, 4, 0 },
.green = { 0, 4, 0 },
.blue = { 0, 4, 0 },
.transp = { 0, 0, 0 },
};
/* main broadsheetfb functions */
static void broadsheet_gpio_issue_data(struct broadsheetfb_par *par, u16 data)
{
par->board->set_ctl(par, BS_WR, 0);
par->board->set_hdb(par, data);
par->board->set_ctl(par, BS_WR, 1);
}
static void broadsheet_gpio_issue_cmd(struct broadsheetfb_par *par, u16 data)
{
Annotation
- Immediate include surface: `linux/module.h`, `linux/kernel.h`, `linux/errno.h`, `linux/string.h`, `linux/mm.h`, `linux/slab.h`, `linux/vmalloc.h`, `linux/delay.h`.
- Detected declarations: `struct panel_info`, `function broadsheet_gpio_issue_data`, `function broadsheet_gpio_issue_cmd`, `function broadsheet_gpio_send_command`, `function broadsheet_gpio_send_cmdargs`, `function broadsheet_mmio_send_cmdargs`, `function broadsheet_send_command`, `function broadsheet_send_cmdargs`, `function broadsheet_gpio_burst_write`, `function broadsheet_mmio_burst_write`.
- Atlas domain: Driver Families / drivers/video.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.