iio: adis16475: Drop adis_burst usage
authorNuno Sá <nuno.sa@analog.com>
Thu, 17 Sep 2020 15:52:22 +0000 (17:52 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 21 Sep 2020 19:01:45 +0000 (20:01 +0100)
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: Nuno Sá <nuno.sa@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20200917155223.218500-4-nuno.sa@analog.com
drivers/iio/imu/adis16475.c

index 35d10ccb66c2a342e9b0d8974f547ff502467408..197d482409911ab34b01b1e2f5ea2e36a9acc40b 100644 (file)
@@ -565,6 +565,9 @@ static int adis16475_enable_irq(struct adis *adis, bool enable)
                BIT(ADIS16475_DIAG_STAT_CLK),                           \
        .enable_irq = adis16475_enable_irq,                             \
        .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[] = {
@@ -910,20 +913,6 @@ static const struct iio_info adis16475_info = {
        .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,
                                   const bool burst32)
 {
@@ -1279,7 +1268,6 @@ static int adis16475_probe(struct spi_device *spi)
 
        st = iio_priv(indio_dev);
        spi_set_drvdata(spi, indio_dev);
-       st->adis.burst = &adis16475_burst;
 
        st->info = device_get_match_data(&spi->dev);
        if (!st->info)