Lines Matching +full:high +full:- +full:definition
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * ADIS16201 Dual-Axis Digital Inclinometer and Accelerometer
28 /* Calibration Register Definition */
38 /* Alarm Register Definition */
52 /* Miscellaneous Control Register Definition */
55 /* Data-ready enable: 1 = enabled, 0 = disabled */
57 /* Data-ready polarity: 1 = active high, 0 = active low */
59 /* Data-ready line selection: 1 = DIO1, 0 = DIO0 */
62 /* Diagnostics System Status Register Definition */
73 /* System Command Register Definition */
113 switch (chan->type) { in adis16201_read_raw()
115 if (chan->channel == 0) { in adis16201_read_raw()
126 *val = -470; in adis16201_read_raw()
143 return -EINVAL; in adis16201_read_raw()
150 * degree celcius is -470. in adis16201_read_raw()
152 *val = 25000 / -470 - 1278; in adis16201_read_raw()
155 switch (chan->type) { in adis16201_read_raw()
163 return -EINVAL; in adis16201_read_raw()
165 addr = adis16201_addresses[chan->scan_index]; in adis16201_read_raw()
170 *val = sign_extend32(val16, bits - 1); in adis16201_read_raw()
174 return -EINVAL; in adis16201_read_raw()
187 return -EINVAL; in adis16201_write_raw()
189 switch (chan->type) { in adis16201_write_raw()
197 return -EINVAL; in adis16201_write_raw()
200 return adis_write_reg_16(st, adis16201_addresses[chan->scan_index], in adis16201_write_raw()
263 indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); in adis16201_probe()
265 return -ENOMEM; in adis16201_probe()
269 indio_dev->name = spi->dev.driver->name; in adis16201_probe()
270 indio_dev->info = &adis16201_info; in adis16201_probe()
272 indio_dev->channels = adis16201_channels; in adis16201_probe()
273 indio_dev->num_channels = ARRAY_SIZE(adis16201_channels); in adis16201_probe()
274 indio_dev->modes = INDIO_DIRECT_MODE; in adis16201_probe()
288 return devm_iio_device_register(&spi->dev, indio_dev); in adis16201_probe()
300 MODULE_DESCRIPTION("Analog Devices ADIS16201 Dual-Axis Digital Inclinometer and Accelerometer");