/* SPDX-License-Identifier: GPL-2.0-or-later * * Copyright (C) 2005 David Brownell */#ifndef __LINUX_SPI_H#define __LINUX_SPI_H#include<linux/device.h>#include<linux/mod_devicetable.h>#include<linux/slab.h>#include<linux/kthread.h>#include<linux/completion.h>#include<linux/scatterlist.h>#include<linux/gpio/consumer.h>#include<linux/ptp_clock_kernel.h>structdma_chan;structproperty_entry;structspi_controller;structspi_transfer;structspi_controller_mem_ops;/* * INTERFACES between SPI master-side drivers and SPI slave protocol handlers, * and SPI infrastructure. */externstructbus_typespi_bus_type;/** * struct spi_statistics - statistics for spi transfers * @lock: lock protecting this structure * * @messages: number of spi-messages handled * @transfers: number of spi_transfers handled * @errors: number of errors during spi_transfer * @timedout: number of timeouts during spi_transfer * * @spi_sync: number of times spi_sync is used * @spi_sync_immediate: * number of times spi_sync is executed immediately * in calling context without queuing and scheduling * @spi_async: number of times spi_async is used * * @bytes: number of bytes transferred to/from device * @bytes_tx: number of bytes sent to device * @bytes_rx: number of bytes received from device * * @transfer_bytes_histo: