Home
last modified time | relevance | path

Searched refs:adis (Results 1 – 16 of 16) sorted by relevance

/kernel/linux/linux-5.10/drivers/iio/imu/
Dadis_buffer.c25 struct adis *adis = iio_device_get_drvdata(indio_dev); in adis_update_scan_mode_burst() local
29 burst_length = adis->data->burst_len + adis->burst_extra_len; in adis_update_scan_mode_burst()
31 if (adis->data->burst_max_len) in adis_update_scan_mode_burst()
32 burst_max_length = adis->data->burst_max_len; in adis_update_scan_mode_burst()
36 adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL); in adis_update_scan_mode_burst()
37 if (!adis->xfer) in adis_update_scan_mode_burst()
40 adis->buffer = kzalloc(burst_max_length + sizeof(u16), GFP_KERNEL); in adis_update_scan_mode_burst()
41 if (!adis->buffer) { in adis_update_scan_mode_burst()
42 kfree(adis->xfer); in adis_update_scan_mode_burst()
43 adis->xfer = NULL; in adis_update_scan_mode_burst()
[all …]
Dadis.c37 int __adis_write_reg(struct adis *adis, unsigned int reg, unsigned int value, in __adis_write_reg() argument
45 .tx_buf = adis->tx, in __adis_write_reg()
49 .delay.value = adis->data->write_delay, in __adis_write_reg()
51 .cs_change_delay.value = adis->data->cs_change_delay, in __adis_write_reg()
54 .tx_buf = adis->tx + 2, in __adis_write_reg()
58 .delay.value = adis->data->write_delay, in __adis_write_reg()
60 .cs_change_delay.value = adis->data->cs_change_delay, in __adis_write_reg()
63 .tx_buf = adis->tx + 4, in __adis_write_reg()
67 .delay.value = adis->data->write_delay, in __adis_write_reg()
69 .cs_change_delay.value = adis->data->cs_change_delay, in __adis_write_reg()
[all …]
Dadis_trigger.c20 struct adis *adis = iio_trigger_get_drvdata(trig); in adis_data_rdy_trigger_set_state() local
22 return adis_enable_irq(adis, state); in adis_data_rdy_trigger_set_state()
29 static void adis_trigger_setup(struct adis *adis) in adis_trigger_setup() argument
31 adis->trig->dev.parent = &adis->spi->dev; in adis_trigger_setup()
32 adis->trig->ops = &adis_trigger_ops; in adis_trigger_setup()
33 iio_trigger_set_drvdata(adis->trig, adis); in adis_trigger_setup()
36 static int adis_validate_irq_flag(struct adis *adis) in adis_validate_irq_flag() argument
38 unsigned long direction = adis->irq_flag & IRQF_TRIGGER_MASK; in adis_validate_irq_flag()
41 if (adis->data->unmasked_drdy) in adis_validate_irq_flag()
42 adis->irq_flag |= IRQF_NO_AUTOEN; in adis_validate_irq_flag()
[all …]
Dadis16475.c100 struct adis adis; member
131 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_REV, &rev); in adis16475_show_firmware_revision()
157 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_Y, &year); in adis16475_show_firmware_date()
161 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_DM, &md); in adis16475_show_firmware_date()
184 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_SERIAL_NUM, &serial); in adis16475_show_serial_number()
201 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_PROD_ID, &prod_id); in adis16475_show_product_id()
218 ret = adis_read_reg_32(&st->adis, ADIS16475_REG_FLASH_CNT, in adis16475_show_flash_count()
257 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_DEC_RATE, &dec); in adis16475_get_freq()
282 ret = adis_write_reg_16(&st->adis, ADIS16475_REG_DEC_RATE, dec); in adis16475_set_freq()
312 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FILT_CTRL, &filter_sz); in adis16475_get_filter()
[all …]
Dadis16400.c183 struct adis adis; member
223 ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID1, &lot1); in adis16400_show_serial_number()
227 ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID2, &lot2); in adis16400_show_serial_number()
231 ret = adis_read_reg_16(&st->adis, ADIS16334_SERIAL_NUMBER, in adis16400_show_serial_number()
255 ret = adis_read_reg_16(&st->adis, ADIS16400_PRODUCT_ID, &prod_id); in adis16400_show_product_id()
272 ret = adis_read_reg_16(&st->adis, ADIS16400_FLASH_CNT, &flash_count); in adis16400_show_flash_count()
327 ret = __adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); in adis16334_get_freq()
351 return __adis_write_reg_16(&st->adis, ADIS16400_SMPL_PRD, t); in adis16334_set_freq()
359 ret = __adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); in adis16400_get_freq()
387 st->adis.spi->max_speed_hz = ADIS16400_SPI_SLOW; in adis16400_set_freq()
[all …]
Dadis16460.c70 struct adis adis; member
81 ret = adis_read_reg_16(&adis16460->adis, ADIS16460_REG_SERIAL_NUM, in adis16460_show_serial_number()
99 ret = adis_read_reg_16(&adis16460->adis, ADIS16460_REG_PROD_ID, in adis16460_show_product_id()
117 ret = adis_read_reg_32(&adis16460->adis, ADIS16460_REG_FLASH_CNT, in adis16460_show_flash_count()
169 return adis_write_reg_16(&st->adis, ADIS16460_REG_DEC_RATE, t); in adis16460_set_freq()
179 ret = adis_read_reg_16(&st->adis, ADIS16460_REG_DEC_RATE, &t); in adis16460_get_freq()
323 static int adis16460_enable_irq(struct adis *adis, bool enable) in adis16460_enable_irq() argument
330 enable_irq(adis->spi->irq); in adis16460_enable_irq()
332 disable_irq(adis->spi->irq); in adis16460_enable_irq()
402 ret = adis_init(&st->adis, indio_dev, spi, &adis16460_data); in adis16460_probe()
[all …]
Dadis16480.c160 struct adis adis; member
184 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_REV, &rev); in adis16480_show_firmware_revision()
209 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_Y, &year); in adis16480_show_firmware_date()
213 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_DM, &md); in adis16480_show_firmware_date()
236 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_SERIAL_NUM, in adis16480_show_serial_number()
254 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_PROD_ID, in adis16480_show_product_id()
272 ret = adis_read_reg_32(&adis16480->adis, ADIS16480_REG_FLASH_CNT, in adis16480_show_flash_count()
345 return adis_write_reg_16(&st->adis, reg, t); in adis16480_set_freq()
361 ret = adis_read_reg_16(&st->adis, reg, &t); in adis16480_get_freq()
430 return adis_write_reg_16(&st->adis, reg, bias); in adis16480_set_calibbias()
[all …]
DMakefile12 adis_lib-y += adis.o
/kernel/linux/linux-5.10/include/linux/iio/imu/
Dadis.h22 struct adis;
81 int (*enable_irq)(struct adis *adis, bool enable);
108 struct adis { struct
136 int adis_init(struct adis *adis, struct iio_dev *indio_dev, argument
138 int __adis_reset(struct adis *adis);
146 static inline int adis_reset(struct adis *adis) in adis_reset() argument
150 mutex_lock(&adis->state_lock); in adis_reset()
151 ret = __adis_reset(adis); in adis_reset()
152 mutex_unlock(&adis->state_lock); in adis_reset()
157 int __adis_write_reg(struct adis *adis, unsigned int reg,
[all …]
/kernel/linux/linux-5.10/drivers/iio/gyro/
Dadis16260.c113 struct adis adis; member
180 ret = adis_write_reg_16(&adis16260->adis, ADIS16260_SLP_CNT, val); in adis16260_stop_device()
198 struct adis *adis = &adis16260->adis; in adis16260_read_raw() local
238 ret = adis_read_reg_16(adis, addr, &val16); in adis16260_read_raw()
246 ret = adis_read_reg_16(adis, addr, &val16); in adis16260_read_raw()
253 ret = adis_read_reg_16(adis, ADIS16260_SMPL_PRD, &val16); in adis16260_read_raw()
257 if (spi_get_device_id(adis->spi)->driver_data) in adis16260_read_raw()
277 struct adis *adis = &adis16260->adis; in adis16260_write_raw() local
288 return adis_write_reg_16(adis, addr, val); in adis16260_write_raw()
294 return adis_write_reg_16(adis, addr, val); in adis16260_write_raw()
[all …]
Dadis16136.c68 struct adis adis; member
82 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_SERIAL_NUM, in adis16136_show_serial()
87 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_LOT1, &lot1); in adis16136_show_serial()
91 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_LOT2, &lot2); in adis16136_show_serial()
95 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_LOT3, &lot3); in adis16136_show_serial()
118 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_PROD_ID, in adis16136_show_product_id()
136 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_FLASH_CNT, in adis16136_show_flash_count()
184 return adis_write_reg_16(&adis16136->adis, ADIS16136_REG_SMPL_PRD, t); in adis16136_set_freq()
192 ret = __adis_read_reg_16(&adis16136->adis, ADIS16136_REG_SMPL_PRD, &t); in __adis16136_get_freq()
226 struct mutex *slock = &adis16136->adis.state_lock; in adis16136_read_frequency()
[all …]
/kernel/linux/linux-5.10/drivers/staging/iio/accel/
Dadis16240.c207 struct adis *st = iio_priv(indio_dev); in adis16240_spi_read_signed()
249 struct adis *st = iio_priv(indio_dev); in adis16240_read_raw()
310 struct adis *st = iio_priv(indio_dev); in adis16240_write_raw()
391 struct adis *st; in adis16240_probe()
Dadis16203.c156 struct adis *st = iio_priv(indio_dev); in adis16203_write_raw()
168 struct adis *st = iio_priv(indio_dev); in adis16203_read_raw()
269 struct adis *st; in adis16203_probe()
/kernel/linux/linux-5.10/drivers/iio/accel/
Dadis16201.c105 struct adis *st = iio_priv(indio_dev); in adis16201_read_raw()
186 struct adis *st = iio_priv(indio_dev); in adis16201_write_raw()
263 struct adis *st; in adis16201_probe()
Dadis16209.c113 struct adis *st = iio_priv(indio_dev); in adis16209_write_raw()
137 struct adis *st = iio_priv(indio_dev); in adis16209_read_raw()
274 struct adis *st; in adis16209_probe()
/kernel/linux/linux-5.10/
DMAINTAINERS1017 F: drivers/iio/imu/adis.c
1018 F: include/linux/iio/imu/adis.h