Help with ADS124S08 SPI ADC and its Linux driver
Hi, can someone help with ADS124S08 SPI ADC and its linux driver? I think the driver is correctly probed. I see /sys/devices/platform/soc/44004000.spi/spi_master/spi0/spi0.0/iio.device0/in_voltage0raw ...etc but it seems the device does not reply.
This is my device tree configuration:
&spi1 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins_a>;
cs-gpios = <&gpioz 3 GPIO_ACTIVE_LOW>;
#address-cells = <1>;
#size-cells = <0>;
adc@0 {
compatible = "ti,ads124s08";
reg = <0>; /* CS #0 */
spi-max-frequency = <1000000>;
spi-cpha;
reset-gpios = <&gpioi 2 GPIO_ACTIVE_LOW>;
};
};First, i don't see the cs going low when i try to read the voltages. Should the driver do that?
Second, the driver ti-ads124s08.c itself seems a bit incoherent with the datasheet. it defines the start conversion command as in the datasheet but then never uses it and instead it uses a made-up command.
#define ADS124S08_CMD_START 0x08
#define ADS124S08_START_CONV 0x01
...
ret = ads124s_write_cmd(indio_dev, ADS124S08_START_CONV);
if (ret) {
dev_err(&priv->spi->dev, "Start conversions failed\n");
goto out;
}
