/drivers/iio/imu/ |
D | adis.c | 30 int adis_write_reg(struct adis *adis, unsigned int reg, in adis_write_reg() argument 38 .tx_buf = adis->tx, in adis_write_reg() 42 .delay_usecs = adis->data->write_delay, in adis_write_reg() 44 .tx_buf = adis->tx + 2, in adis_write_reg() 48 .delay_usecs = adis->data->write_delay, in adis_write_reg() 50 .tx_buf = adis->tx + 4, in adis_write_reg() 54 .delay_usecs = adis->data->write_delay, in adis_write_reg() 56 .tx_buf = adis->tx + 6, in adis_write_reg() 59 .delay_usecs = adis->data->write_delay, in adis_write_reg() 61 .tx_buf = adis->tx + 8, in adis_write_reg() [all …]
|
D | adis_buffer.c | 26 struct adis *adis = iio_device_get_drvdata(indio_dev); in adis_update_scan_mode() local 32 kfree(adis->xfer); in adis_update_scan_mode() 33 kfree(adis->buffer); in adis_update_scan_mode() 37 adis->xfer = kcalloc(scan_count + 1, sizeof(*adis->xfer), GFP_KERNEL); in adis_update_scan_mode() 38 if (!adis->xfer) in adis_update_scan_mode() 41 adis->buffer = kzalloc(indio_dev->scan_bytes * 2, GFP_KERNEL); in adis_update_scan_mode() 42 if (!adis->buffer) { in adis_update_scan_mode() 43 kfree(adis->xfer); in adis_update_scan_mode() 44 adis->xfer = NULL; in adis_update_scan_mode() 48 rx = adis->buffer; in adis_update_scan_mode() [all …]
|
D | adis16400_buffer.c | 20 struct adis *adis = &st->adis; in adis16400_update_scan_mode() local 27 kfree(adis->xfer); in adis16400_update_scan_mode() 28 kfree(adis->buffer); in adis16400_update_scan_mode() 35 adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL); in adis16400_update_scan_mode() 36 if (!adis->xfer) in adis16400_update_scan_mode() 39 adis->buffer = kzalloc(burst_length + sizeof(u16), GFP_KERNEL); in adis16400_update_scan_mode() 40 if (!adis->buffer) { in adis16400_update_scan_mode() 41 kfree(adis->xfer); in adis16400_update_scan_mode() 42 adis->xfer = NULL; in adis16400_update_scan_mode() 46 tx = adis->buffer + burst_length; in adis16400_update_scan_mode() [all …]
|
D | adis_trigger.c | 22 struct adis *adis = iio_trigger_get_drvdata(trig); in adis_data_rdy_trigger_set_state() local 24 return adis_enable_irq(adis, state); in adis_data_rdy_trigger_set_state() 41 int adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev) in adis_probe_trigger() argument 45 adis->trig = iio_trigger_alloc("%s-dev%d", indio_dev->name, in adis_probe_trigger() 47 if (adis->trig == NULL) in adis_probe_trigger() 50 adis->trig->dev.parent = &adis->spi->dev; in adis_probe_trigger() 51 adis->trig->ops = &adis_trigger_ops; in adis_probe_trigger() 52 iio_trigger_set_drvdata(adis->trig, adis); in adis_probe_trigger() 54 ret = request_irq(adis->spi->irq, in adis_probe_trigger() 58 adis->trig); in adis_probe_trigger() [all …]
|
D | adis16480.c | 122 struct adis adis; member 136 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_REV, &rev); in adis16480_show_firmware_revision() 161 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_Y, &year); in adis16480_show_firmware_date() 165 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_FIRM_DM, &md); in adis16480_show_firmware_date() 188 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_SERIAL_NUM, in adis16480_show_serial_number() 206 ret = adis_read_reg_16(&adis16480->adis, ADIS16480_REG_PROD_ID, in adis16480_show_product_id() 224 ret = adis_read_reg_32(&adis16480->adis, ADIS16480_REG_FLASH_CNT, in adis16480_show_flash_count() 283 return adis_write_reg_16(&st->adis, ADIS16480_REG_DEC_RATE, t); in adis16480_set_freq() 293 ret = adis_read_reg_16(&st->adis, ADIS16480_REG_DEC_RATE, &t); in adis16480_get_freq() 351 return adis_write_reg_16(&st->adis, reg, bias); in adis16480_set_calibbias() [all …]
|
D | adis16400_core.c | 48 ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID1, &lot1); in adis16400_show_serial_number() 52 ret = adis_read_reg_16(&st->adis, ADIS16334_LOT_ID2, &lot2); in adis16400_show_serial_number() 56 ret = adis_read_reg_16(&st->adis, ADIS16334_SERIAL_NUMBER, in adis16400_show_serial_number() 80 ret = adis_read_reg_16(&st->adis, ADIS16400_PRODUCT_ID, &prod_id); in adis16400_show_product_id() 97 ret = adis_read_reg_16(&st->adis, ADIS16400_FLASH_CNT, &flash_count); in adis16400_show_flash_count() 153 ret = adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); in adis16334_get_freq() 177 return adis_write_reg_16(&st->adis, ADIS16400_SMPL_PRD, t); in adis16334_set_freq() 185 ret = adis_read_reg_16(&st->adis, ADIS16400_SMPL_PRD, &t); in adis16400_get_freq() 213 st->adis.spi->max_speed_hz = ADIS16400_SPI_SLOW; in adis16400_set_freq() 215 st->adis.spi->max_speed_hz = ADIS16400_SPI_FAST; in adis16400_set_freq() [all …]
|
D | adis16400.h | 168 struct adis adis; member
|
D | Makefile | 11 adis_lib-y += adis.o
|
/drivers/iio/gyro/ |
D | adis16260.c | 114 struct adis adis; member 181 ret = adis_write_reg_16(&adis16260->adis, ADIS16260_SLP_CNT, val); in adis16260_stop_device() 199 struct adis *adis = &adis16260->adis; in adis16260_read_raw() local 239 ret = adis_read_reg_16(adis, addr, &val16); in adis16260_read_raw() 247 ret = adis_read_reg_16(adis, addr, &val16); in adis16260_read_raw() 254 ret = adis_read_reg_16(adis, ADIS16260_SMPL_PRD, &val16); in adis16260_read_raw() 258 if (spi_get_device_id(adis->spi)->driver_data) in adis16260_read_raw() 278 struct adis *adis = &adis16260->adis; in adis16260_write_raw() local 289 return adis_write_reg_16(adis, addr, val); in adis16260_write_raw() 295 return adis_write_reg_16(adis, addr, val); in adis16260_write_raw() [all …]
|
D | adis16136.c | 68 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() 183 return adis_write_reg_16(&adis16136->adis, ADIS16136_REG_SMPL_PRD, t); in adis16136_set_freq() 191 ret = adis_read_reg_16(&adis16136->adis, ADIS16136_REG_SMPL_PRD, &t); in adis16136_get_freq() 265 return adis_write_reg_16(&adis16136->adis, ADIS16136_REG_AVG_CNT, i); in adis16136_set_filter() [all …]
|
/drivers/staging/iio/accel/ |
D | adis16220_core.c | 35 ret = adis_read_reg_16(&st->adis, this_attr->address, &val); in adis16220_read_16bit() 56 ret = adis_write_reg_16(&st->adis, this_attr->address, val); in adis16220_write_16bit() 68 ret = adis_write_reg_16(&st->adis, ADIS16220_GLOB_CMD, 0xBF08); in adis16220_capture() 132 ret = adis_write_reg_16(&st->adis, in adis16220_capture_buffer_read() 147 ret = spi_sync_transfer(st->adis.spi, xfers, ARRAY_SIZE(xfers)); in adis16220_capture_buffer_read() 314 ret = adis_read_reg_16(&st->adis, addr->addr, &sval); in adis16220_read_raw() 323 ret = adis_read_reg_16(&st->adis, addr->addr, &uval); in adis16220_read_raw() 453 ret = adis_init(&st->adis, indio_dev, spi, &adis16220_data); in adis16220_probe() 457 ret = adis_initial_startup(&st->adis); in adis16220_probe()
|
D | adis16203_core.c | 37 struct adis *st = iio_priv(indio_dev); in adis16203_write_raw() 49 struct adis *st = iio_priv(indio_dev); in adis16203_read_raw() 151 struct adis *st; in adis16203_probe() 195 struct adis *st = iio_priv(indio_dev); in adis16203_remove()
|
D | adis16240_core.c | 35 struct adis *st = iio_priv(indio_dev); in adis16240_spi_read_signed() 85 struct adis *st = iio_priv(indio_dev); in adis16240_read_raw() 161 struct adis *st = iio_priv(indio_dev); in adis16240_write_raw() 238 struct adis *st; in adis16240_probe() 280 struct adis *st = iio_priv(indio_dev); in adis16240_remove()
|
D | adis16204_core.c | 41 struct adis *st = iio_priv(indio_dev); in adis16204_read_raw() 118 struct adis *st = iio_priv(indio_dev); in adis16204_write_raw() 189 struct adis *st; in adis16204_probe() 233 struct adis *st = iio_priv(indio_dev); in adis16204_remove()
|
D | adis16201_core.c | 37 struct adis *st = iio_priv(indio_dev); in adis16201_read_raw() 110 struct adis *st = iio_priv(indio_dev); in adis16201_write_raw() 182 struct adis *st; in adis16201_probe() 227 struct adis *st = iio_priv(indio_dev); in adis16201_remove()
|
D | adis16209_core.c | 43 struct adis *st = iio_priv(indio_dev); in adis16209_write_raw() 70 struct adis *st = iio_priv(indio_dev); in adis16209_read_raw() 184 struct adis *st; in adis16209_probe() 227 struct adis *st = iio_priv(indio_dev); in adis16209_remove()
|
D | adis16220.h | 133 struct adis adis; member
|