STRUCT CHIP_DATA(9)
π struct chip_data(9) π
okay so bestie, welcome to the Kernel API Manual, section 9 β this is the page for struct chip_data, and honestly it's giving "small struct, big responsibilities". π
β¨ NAME β¨
struct chip_data β literally exists to maintain the runtime state of SSP for each client chip. that's the whole job. that's the mission. π«Ά
πΈ SYNOPSIS πΈ
struct chip_data {
u32 cr0;
u16 cr1;
u16 dmacr;
u16 cpsr;
u8 n_bytes;
bool enable_dma;
enum ssp_reading read;
enum ssp_writing write;
int xfer_type;
};
like, look at her. nine fields. every single one of them matters. no filler. π
π Members π
okay so let's go field by field, bestie, no skipping, we respect all of them:
cr0β the value of control register CR0 of SSP. and heads up: on later ST variants this register is 32 bits wide rather than just 16. so don't go assuming 16, iykyk.cr1β the value of control register CR1 of SSP. simple. iconic. no notes. β¨dmacrβ the value of the DMA control Register of SSP.cpsrβ the value of the Clock prescale register.n_bytesβ how many bytes (power of 2) are reqd for a given data width of the client. power of 2, bestie, don't come in here with 3. πenable_dmaβ whether to enable DMA or not. abool. yes or no. that's it, that's the field.readβ a function ptr to be used to read when doing xfer for this chip. it'senum ssp_reading, so the read path is part of the vibe.writeβ a function ptr to be used to write when doing xfer for this chip. matchingenum ssp_writingenergy. πxfer_typeβ polling / interrupt / DMA. pick your fighter. π₯
π¦ Description π¦
so the runtime state of the SSP controller is maintained per chip, and it would be set according to the current message that would be served. that's the entire plot. state, per chip, matching whatever message is being served right now. main character energy tbh. π
π SEE ALSO π
go look in the kernel file ./drivers/spi/spi-pl022.c β that's where the family lives, fr fr:
struct vendor_data(9)struct pl022(9)internal_cs_control(9)flush(9)restore_state(9)load_ssp_default_config(9)configure_dma(9)pl022_interrupt_handler(9)pl022_setup(9)pl022_cleanup(9)
all of them. every single one. we do not gatekeep the SEE ALSO section. π«
and that's the page!! π this one comes to you from ./drivers/spi, dated October 2026, and it's the struct chip_data(9) entry in the Kernel API Manual. mwah, go read the pl022 docs next, ily, bye!! ππ§ββοΈ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms