Lines Matching +full:high +full:- +full:precision

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * ADIS16130 Digital Output, High Precision Angular Rate Sensor driver
21 /* 1 = data-ready signal low when unread data on all channels; */
33 #define ADIS16130_MODE_24BIT (1 << 1) /* 1 = 24-bit resolution; */
36 * struct adis16130_state - device instance specific data
52 .tx_buf = st->buf, in adis16130_spi_read()
53 .rx_buf = st->buf, in adis16130_spi_read()
57 mutex_lock(&st->buf_lock); in adis16130_spi_read()
59 st->buf[0] = ADIS16130_CON_RD | reg_addr; in adis16130_spi_read()
60 st->buf[1] = st->buf[2] = st->buf[3] = 0; in adis16130_spi_read()
62 ret = spi_sync_transfer(st->us, &xfer, 1); in adis16130_spi_read()
64 *val = get_unaligned_be24(&st->buf[1]); in adis16130_spi_read()
65 mutex_unlock(&st->buf_lock); in adis16130_spi_read()
81 ret = adis16130_spi_read(indio_dev, chan->address, &temp); in adis16130_read_raw()
87 switch (chan->type) { in adis16130_read_raw()
91 *val2 = 336440817; /* RAD_TO_DEGREE(14260608 - 8388608) */ in adis16130_read_raw()
96 *val2 = 9516048 - 8036283; in adis16130_read_raw()
99 return -EINVAL; in adis16130_read_raw()
102 switch (chan->type) { in adis16130_read_raw()
104 *val = -8388608; in adis16130_read_raw()
107 *val = -8036283; in adis16130_read_raw()
110 return -EINVAL; in adis16130_read_raw()
114 return -EINVAL; in adis16130_read_raw()
147 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); in adis16130_probe()
149 return -ENOMEM; in adis16130_probe()
153 st->us = spi; in adis16130_probe()
154 mutex_init(&st->buf_lock); in adis16130_probe()
155 indio_dev->name = spi->dev.driver->name; in adis16130_probe()
156 indio_dev->channels = adis16130_channels; in adis16130_probe()
157 indio_dev->num_channels = ARRAY_SIZE(adis16130_channels); in adis16130_probe()
158 indio_dev->info = &adis16130_info; in adis16130_probe()
159 indio_dev->modes = INDIO_DIRECT_MODE; in adis16130_probe()
161 return devm_iio_device_register(&spi->dev, indio_dev); in adis16130_probe()
173 MODULE_DESCRIPTION("Analog Devices ADIS16130 High Precision Angular Rate");