Home
last modified time | relevance | path

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

/linux-5.19.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.c33 int __adis_write_reg(struct adis *adis, unsigned int reg, unsigned int value, in __adis_write_reg() argument
41 .tx_buf = adis->tx, in __adis_write_reg()
45 .delay.value = adis->data->write_delay, in __adis_write_reg()
47 .cs_change_delay.value = adis->data->cs_change_delay, in __adis_write_reg()
50 .tx_buf = adis->tx + 2, in __adis_write_reg()
54 .delay.value = adis->data->write_delay, in __adis_write_reg()
56 .cs_change_delay.value = adis->data->cs_change_delay, in __adis_write_reg()
59 .tx_buf = adis->tx + 4, in __adis_write_reg()
63 .delay.value = adis->data->write_delay, in __adis_write_reg()
65 .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 int adis_validate_irq_flag(struct adis *adis) in adis_validate_irq_flag() argument
31 unsigned long direction = adis->irq_flag & IRQF_TRIGGER_MASK; in adis_validate_irq_flag()
34 if (adis->data->unmasked_drdy) in adis_validate_irq_flag()
35 adis->irq_flag |= IRQF_NO_AUTOEN; in adis_validate_irq_flag()
44 adis->irq_flag |= IRQF_TRIGGER_RISING; in adis_validate_irq_flag()
48 dev_err(&adis->spi->dev, "Invalid IRQ mask: %08lx\n", in adis_validate_irq_flag()
49 adis->irq_flag); in adis_validate_irq_flag()
63 int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev) in devm_adis_probe_trigger() argument
[all …]
Dadis16480.c169 struct adis adis; member
200 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_REV, &rev); in adis16480_show_firmware_revision()
225 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_Y, &year); in adis16480_show_firmware_date()
229 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_DM, &md); in adis16480_show_firmware_date()
252 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_SERIAL_NUM, in adis16480_show_serial_number()
270 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_PROD_ID, in adis16480_show_product_id()
288 ret = adis_read_reg_32(&adis16480->adis, ADIS16480_REG_FLASH_CNT, in adis16480_show_flash_count()
341 adis_dev_lock(&st->adis); in adis16480_set_freq()
382 ret = __adis_write_reg_16(&st->adis, ADIS16495_REG_SYNC_SCALE, sync_scale); in adis16480_set_freq()
396 ret = __adis_write_reg_16(&st->adis, ADIS16480_REG_DEC_RATE, t); in adis16480_set_freq()
[all …]
Dadis16475.c101 struct adis adis; member
138 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_REV, &rev); in adis16475_show_firmware_revision()
164 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_Y, &year); in adis16475_show_firmware_date()
168 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_FIRM_DM, &md); in adis16475_show_firmware_date()
191 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_SERIAL_NUM, &serial); in adis16475_show_serial_number()
208 ret = adis_read_reg_16(&st->adis, ADIS16475_REG_PROD_ID, &prod_id); in adis16475_show_product_id()
225 ret = adis_read_reg_32(&st->adis, ADIS16475_REG_FLASH_CNT, in adis16475_show_flash_count()
265 adis_dev_lock(&st->adis); in adis16475_get_freq()
270 ret = __adis_read_reg_16(&st->adis, ADIS16475_REG_UP_SCALE, &sync_scale); in adis16475_get_freq()
277 ret = __adis_read_reg_16(&st->adis, ADIS16475_REG_DEC_RATE, &dec); in adis16475_get_freq()
[all …]
Dadis16400.c176 struct adis adis; member
216 ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID1, &lot1); in adis16400_show_serial_number()
220 ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID2, &lot2); in adis16400_show_serial_number()
224 ret = adis_read_reg_16(&st->adis, ADIS16334_SERIAL_NUMBER, in adis16400_show_serial_number()
248 ret = adis_read_reg_16(&st->adis, ADIS16400_PRODUCT_ID, &prod_id); in adis16400_show_product_id()
265 ret = adis_read_reg_16(&st->adis, ADIS16400_FLASH_CNT, &flash_count); in adis16400_show_flash_count()
320 ret = __adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); in adis16334_get_freq()
344 return __adis_write_reg_16(&st->adis, ADIS16400_SMPL_PRD, t); in adis16334_set_freq()
352 ret = __adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); in adis16400_get_freq()
380 st->adis.spi->max_speed_hz = ADIS16400_SPI_SLOW; in adis16400_set_freq()
[all …]
Dadis16460.c69 struct adis adis; member
80 ret = adis_read_reg_16(&adis16460->adis, ADIS16460_REG_SERIAL_NUM, in adis16460_show_serial_number()
98 ret = adis_read_reg_16(&adis16460->adis, ADIS16460_REG_PROD_ID, in adis16460_show_product_id()
116 ret = adis_read_reg_32(&adis16460->adis, ADIS16460_REG_FLASH_CNT, in adis16460_show_flash_count()
168 return adis_write_reg_16(&st->adis, ADIS16460_REG_DEC_RATE, t); in adis16460_set_freq()
178 ret = adis_read_reg_16(&st->adis, ADIS16460_REG_DEC_RATE, &t); in adis16460_get_freq()
385 ret = adis_init(&st->adis, indio_dev, spi, &adis16460_data); in adis16460_probe()
389 ret = devm_adis_setup_buffer_and_trigger(&st->adis, indio_dev, NULL); in adis16460_probe()
393 ret = __adis_initial_startup(&st->adis); in adis16460_probe()
DMakefile12 adis_lib-y += adis.o
/linux-5.19.10/include/linux/iio/imu/
Dadis.h22 struct adis;
82 int (*enable_irq)(struct adis *adis, bool enable);
110 struct adis { struct
138 int adis_init(struct adis *adis, struct iio_dev *indio_dev, argument
140 int __adis_reset(struct adis *adis);
148 static inline int adis_reset(struct adis *adis) in adis_reset() argument
152 mutex_lock(&adis->state_lock); in adis_reset()
153 ret = __adis_reset(adis); in adis_reset()
154 mutex_unlock(&adis->state_lock); in adis_reset()
159 int __adis_write_reg(struct adis *adis, unsigned int reg,
[all …]
/linux-5.19.10/drivers/iio/gyro/
Dadis16260.c108 struct adis adis; member
175 ret = adis_write_reg_16(&adis16260->adis, ADIS16260_SLP_CNT, val); in adis16260_stop_device()
193 struct adis *adis = &adis16260->adis; in adis16260_read_raw() local
233 ret = adis_read_reg_16(adis, addr, &val16); in adis16260_read_raw()
241 ret = adis_read_reg_16(adis, addr, &val16); in adis16260_read_raw()
248 ret = adis_read_reg_16(adis, ADIS16260_SMPL_PRD, &val16); in adis16260_read_raw()
252 if (spi_get_device_id(adis->spi)->driver_data) in adis16260_read_raw()
272 struct adis *adis = &adis16260->adis; in adis16260_write_raw() local
283 return adis_write_reg_16(adis, addr, val); in adis16260_write_raw()
289 return adis_write_reg_16(adis, addr, val); in adis16260_write_raw()
[all …]
Dadis16136.c63 struct adis adis; member
77 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_SERIAL_NUM, in adis16136_show_serial()
82 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_LOT1, &lot1); in adis16136_show_serial()
86 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_LOT2, &lot2); in adis16136_show_serial()
90 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_LOT3, &lot3); in adis16136_show_serial()
113 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_PROD_ID, in adis16136_show_product_id()
131 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_FLASH_CNT, in adis16136_show_flash_count()
179 return adis_write_reg_16(&adis16136->adis, ADIS16136_REG_SMPL_PRD, t); in adis16136_set_freq()
187 ret = __adis_read_reg_16(&adis16136->adis, ADIS16136_REG_SMPL_PRD, &t); in __adis16136_get_freq()
224 adis_dev_lock(&adis16136->adis); in adis16136_read_frequency()
[all …]
/linux-5.19.10/drivers/staging/iio/accel/
Dadis16240.c201 struct adis *st = iio_priv(indio_dev); in adis16240_spi_read_signed()
243 struct adis *st = iio_priv(indio_dev); in adis16240_read_raw()
304 struct adis *st = iio_priv(indio_dev); in adis16240_write_raw()
385 struct adis *st; in adis16240_probe()
Dadis16203.c150 struct adis *st = iio_priv(indio_dev); in adis16203_write_raw()
162 struct adis *st = iio_priv(indio_dev); in adis16203_read_raw()
263 struct adis *st; in adis16203_probe()
/linux-5.19.10/drivers/iio/accel/
Dadis16201.c102 struct adis *st = iio_priv(indio_dev); in adis16201_read_raw()
183 struct adis *st = iio_priv(indio_dev); in adis16201_write_raw()
260 struct adis *st; in adis16201_probe()
Dadis16209.c110 struct adis *st = iio_priv(indio_dev); in adis16209_write_raw()
134 struct adis *st = iio_priv(indio_dev); in adis16209_read_raw()
271 struct adis *st; in adis16209_probe()
/linux-5.19.10/
DMAINTAINERS1168 F: drivers/iio/imu/adis.c
1171 F: include/linux/iio/imu/adis.h