Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 795cd39b authored by Karthikeyan Mani's avatar Karthikeyan Mani
Browse files

ASoC: wcd-spi: cleanup to remove unused SPI APIs



spi data read and write are handled by WDSP_EVENT_GETOPS
and can be removed from being exported, rather make them
static.

CRs-Fixed: 2068106
Change-Id: I815f0e7c2ac02236e23c7d1b98929dad93e48d6d
Signed-off-by: default avatarKarthikeyan Mani <kmani@codeaurora.org>
parent bb58f021
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -35,25 +35,6 @@ struct wcd_spi_msg {
	u32 flags;
};

#ifdef CONFIG_SND_SOC_WCD_SPI

int wcd_spi_data_write(struct spi_device *spi, struct wcd_spi_msg *msg);
int wcd_spi_data_read(struct spi_device *spi, struct wcd_spi_msg *msg);

#else

int wcd_spi_data_write(struct spi_device *spi, struct wcd_spi_msg *msg)
{
	return -ENODEV;
}

int wcd_spi_data_read(struct spi_device *spi, struct wcd_spi_msg *msg)
{
	return -ENODEV;
}

#endif /* End of CONFIG_SND_SOC_WCD_SPI */

struct wcd_spi_ops {
	struct spi_device *spi_dev;
	int (*read_dev)(struct spi_device *spi, struct wcd_spi_msg *msg);
+2 −4
Original line number Diff line number Diff line
@@ -837,7 +837,7 @@ static int wcd_spi_data_xfer(struct spi_device *spi,
 * about the write are encapsulated in @msg. Write size should be multiple
 * of 4 bytes and write address should be 4-byte aligned.
 */
int wcd_spi_data_write(struct spi_device *spi,
static int wcd_spi_data_write(struct spi_device *spi,
		       struct wcd_spi_msg *msg)
{
	if (!spi || !msg) {
@@ -850,7 +850,6 @@ int wcd_spi_data_write(struct spi_device *spi,
			    __func__, msg->remote_addr, msg->len);
	return wcd_spi_data_xfer(spi, msg, WCD_SPI_XFER_WRITE);
}
EXPORT_SYMBOL(wcd_spi_data_write);

/*
 * wcd_spi_data_read: Read data from WCD SPI
@@ -861,7 +860,7 @@ EXPORT_SYMBOL(wcd_spi_data_write);
 * about the read are encapsulated in @msg. Read size should be multiple
 * of 4 bytes and read address should be 4-byte aligned.
 */
int wcd_spi_data_read(struct spi_device *spi,
static int wcd_spi_data_read(struct spi_device *spi,
		      struct wcd_spi_msg *msg)
{
	if (!spi || !msg) {
@@ -874,7 +873,6 @@ int wcd_spi_data_read(struct spi_device *spi,
			    __func__, msg->remote_addr, msg->len);
	return wcd_spi_data_xfer(spi, msg, WCD_SPI_XFER_READ);
}
EXPORT_SYMBOL(wcd_spi_data_read);

static int wdsp_spi_dload_section(struct spi_device *spi,
				  void *data)