Lines Matching refs:adis
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()
50 adis->xfer[0].tx_buf = tx; in adis16400_update_scan_mode()
51 adis->xfer[0].bits_per_word = 8; in adis16400_update_scan_mode()
52 adis->xfer[0].len = 2; in adis16400_update_scan_mode()
53 adis->xfer[1].rx_buf = adis->buffer; in adis16400_update_scan_mode()
54 adis->xfer[1].bits_per_word = 8; in adis16400_update_scan_mode()
55 adis->xfer[1].len = burst_length; in adis16400_update_scan_mode()
57 spi_message_init(&adis->msg); in adis16400_update_scan_mode()
58 spi_message_add_tail(&adis->xfer[0], &adis->msg); in adis16400_update_scan_mode()
59 spi_message_add_tail(&adis->xfer[1], &adis->msg); in adis16400_update_scan_mode()
69 struct adis *adis = &st->adis; in adis16400_trigger_handler() local
70 u32 old_speed_hz = st->adis.spi->max_speed_hz; in adis16400_trigger_handler()
74 if (!adis->buffer) in adis16400_trigger_handler()
78 st->adis.spi->max_speed_hz > ADIS16400_SPI_BURST) { in adis16400_trigger_handler()
79 st->adis.spi->max_speed_hz = ADIS16400_SPI_BURST; in adis16400_trigger_handler()
80 spi_setup(st->adis.spi); in adis16400_trigger_handler()
83 ret = spi_sync(adis->spi, &adis->msg); in adis16400_trigger_handler()
85 dev_err(&adis->spi->dev, "Failed to read data: %d\n", ret); in adis16400_trigger_handler()
88 st->adis.spi->max_speed_hz = old_speed_hz; in adis16400_trigger_handler()
89 spi_setup(st->adis.spi); in adis16400_trigger_handler()
93 buffer = adis->buffer + sizeof(u16); in adis16400_trigger_handler()
95 buffer = adis->buffer; in adis16400_trigger_handler()