STRUCT PCH_SPI_DATA(9)
struct pch_spi_data(9) π β¨
okay so bestie, this is the Kernel API Manual page for struct pch_spi_data(9) β literally the struct that holds the SPI channel specific details. no cap, it's giving βdriver state goes hereβ energy, and we're gonna go through every single member because we do not skip in this house. π
πΈ NAME πΈ
struct pch_spi_data β Holds the SPI channel specific details. That's the whole vibe: channel-specific details, held. iconic. π
β¨ SYNOPSIS β¨
here's the struct in all its glory, verbatim, character for character β do not touch, just admire:
struct pch_spi_data {
void __iomem *io_remap_addr;
unsigned long io_base_addr;
struct spi_controller *host;
struct work_struct work;
wait_queue_head_t wait;
u8 transfer_complete;
u8 bcurrent_msg_processing;
spinlock_t lock;
struct list_head queue;
u8 status;
u32 bpw_len;
u8 transfer_active;
u32 tx_index;
u32 rx_index;
u16 *pkt_tx_buff;
u16 *pkt_rx_buff;
u8 n_curnt_chip;
struct spi_device *current_chip;
struct spi_message *current_msg;
struct spi_transfer *cur_trans;
struct pch_spi_board_data *board_dat;
struct platform_device *plat_dev;
int ch;
struct pch_spi_dma_ctrl dma;
int use_dma;
u8 irq_reg_sts;
int save_total_len;
};
π«Ά Members π«Ά
okay bestie, member-by-member tour, no skipping, we respect the whole struct in this house:
io_remap_addrβ The remapped PCI base address. πio_base_addrβ Base address.hostβ Pointer to the SPI controller structure.workβ Reference to work queue handler.waitβ Wait queue for waking up upon receiving an interrupt.transfer_completeβ Status of SPI Transfer.bcurrent_msg_processingβ Status flag for message processing.lockβ Lock for protecting this structure.queueβ SPI Message queue.statusβ Status of the SPI driver.bpw_lenβ Length of data to be transferred in bits per word.transfer_activeβ Flag showing active transfer.tx_indexβ Transmit data count; for bookkeeping during transfer.rx_indexβ Receive data count; for bookkeeping during transfer.pkt_tx_buffβ Buffer for data to be transmitted.pkt_rx_buffβ Buffer for received data.n_curnt_chipβ The chip number that this SPI driver currently operates on.current_chipβ Reference to the current chip that this SPI driver currently operates on.current_msgβ The current message that this SPI driver is handling.cur_transβ The current transfer that this SPI driver is handling.board_datβ Reference to the SPI device data structure.plat_devβplatform_devicestructure.chβ SPI channel number.dmaβ Local DMA information.use_dmaβ True if DMA is to be used.irq_reg_stsβ Status of IRQ registration.save_total_lenβ Save length while data is being transferred.
π SEE ALSO π
go look at these, bestie β the related kernel file and API pages are all right here:
- Kernel file
./drivers/spi/spi-topcliff-pch.cstruct pch_spi_board_data(9)pch_spi_writereg(9)pch_spi_readreg(9)pch_spi_clear_fifo(9)pch_spi_handler(9)pch_spi_set_baud_rate(9)pch_spi_set_bits_per_word(9)pch_spi_setup_transfer(9)pch_spi_reset(9)
k bye bestie β this iconic page is from the Kernel API Manual, the source/version footer says ./drivers/spi, it's dated October 2026, and it's literally the struct pch_spi_data(9) page. slay, stay hydrated, read your manpages. π
β¨π«Ά
π¦ 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