Commit 0dfaa465 authored by Nuno Sá's avatar Nuno Sá Committed by Jonathan Cameron

iio: adis16475: Drop adis_burst usage

Burst mode variables are now part of the `adis_data` struct. The driver
also has now to explicitly define the length of the burst buffer.
Signed-off-by: default avatarNuno Sá <nuno.sa@analog.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20200917155223.218500-4-nuno.sa@analog.com
parent f81d053b
...@@ -565,6 +565,9 @@ static int adis16475_enable_irq(struct adis *adis, bool enable) ...@@ -565,6 +565,9 @@ static int adis16475_enable_irq(struct adis *adis, bool enable)
BIT(ADIS16475_DIAG_STAT_CLK), \ BIT(ADIS16475_DIAG_STAT_CLK), \
.enable_irq = adis16475_enable_irq, \ .enable_irq = adis16475_enable_irq, \
.timeouts = (_timeouts), \ .timeouts = (_timeouts), \
.burst_reg_cmd = ADIS16475_REG_GLOB_CMD, \
.burst_len = ADIS16475_BURST_MAX_DATA, \
.burst_max_len = ADIS16475_BURST32_MAX_DATA \
} }
static const struct adis16475_sync adis16475_sync_mode[] = { static const struct adis16475_sync adis16475_sync_mode[] = {
...@@ -910,20 +913,6 @@ static const struct iio_info adis16475_info = { ...@@ -910,20 +913,6 @@ static const struct iio_info adis16475_info = {
.debugfs_reg_access = adis_debugfs_reg_access, .debugfs_reg_access = adis_debugfs_reg_access,
}; };
static struct adis_burst adis16475_burst = {
.en = true,
.reg_cmd = ADIS16475_REG_GLOB_CMD,
/*
* adis_update_scan_mode_burst() sets the burst length in respect with
* the number of channels and allocates 16 bits for each. However,
* adis1647x devices also need space for DIAG_STAT, DATA_CNTR or
* TIME_STAMP (depending on the clock mode but for us these bytes are
* don't care...) and CRC.
*/
.extra_len = 3 * sizeof(u16),
.burst_max_len = ADIS16475_BURST32_MAX_DATA,
};
static bool adis16475_validate_crc(const u8 *buffer, u16 crc, static bool adis16475_validate_crc(const u8 *buffer, u16 crc,
const bool burst32) const bool burst32)
{ {
...@@ -1279,7 +1268,6 @@ static int adis16475_probe(struct spi_device *spi) ...@@ -1279,7 +1268,6 @@ static int adis16475_probe(struct spi_device *spi)
st = iio_priv(indio_dev); st = iio_priv(indio_dev);
spi_set_drvdata(spi, indio_dev); spi_set_drvdata(spi, indio_dev);
st->adis.burst = &adis16475_burst;
st->info = device_get_match_data(&spi->dev); st->info = device_get_match_data(&spi->dev);
if (!st->info) if (!st->info)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment