This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1293: SPI read/write issue in Linux kernel

Part Number: ADS1293

Hi,

First of all, I know that there is no official Linux kernel driver for ADS1293, so I'm developing a one.

I'm stuck at understanding how to read for ADS1293 and how to fill in the read buffer,

In the datasheet it says that any access is 16-bits long, I'm confused when I need to read only.

For the moment, I'm filling 1 byte buffer with the register to read and then change the first bit with 1 for the read operation, like this:

static int ads1293_read_reg8(struct spi_device *spi, int reg)
{
	int val;
	reg = reg | 0x80;
	val = spi_w8r8(spi, reg);
	return val;
}
I'm using spi_w8r8 function which allows me to write 8bits and reads back 8bits,
When running the driver, every read returns 0 as a result always which means no read operation was successful.
Do I need to write a dummy data for the read?
Please help me understanding this.
Thanks,
Talel