android_kernel_xiaomi_sm8350/include/sound/wcd-spi.h
Jordan Crouse 1155af87e3 includes: Fix more headers to work with KERNEL_HEADER_TEST
Fix other headers to work when KERNEL_HEADER_TEST is enabled by adding
dependencies and advance struct prototypes where appropriate.

Change-Id: Ic0dedbad6804e5dca75b33b3d0ae9e3b89a51669
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2020-04-02 17:40:57 -06:00

39 lines
795 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
*/
#ifndef __WCD_SPI_H__
#define __WCD_SPI_H__
#include <linux/types.h>
struct wcd_spi_msg {
/*
* Caller's buffer pointer that holds data to
* be transmitted in case of data_write and
* data to be copied to in case of data_read.
*/
void *data;
/* Length of data to write/read */
size_t len;
/*
* Address in remote memory to write to
* or read from.
*/
u32 remote_addr;
/* Bitmask of flags, currently unused */
u32 flags;
};
struct wcd_spi_ops {
struct spi_device *spi_dev;
int (*read_dev)(struct spi_device *spi, struct wcd_spi_msg *msg);
int (*write_dev)(struct spi_device *spi, struct wcd_spi_msg *msg);
};
#endif /* End of __WCD_SPI_H__ */