Lines Matching +full:3 +full:- +full:axis +full:- +full:digital +full:- +full:gyroscope
1 // SPDX-License-Identifier: GPL-2.0-only
3 * itg3200_buffer.c -- support InvenSense ITG3200
4 * Digital 3-Axis Gyroscope driver
28 .addr = i2c->addr, in itg3200_read_all_channels()
29 .flags = i2c->flags, in itg3200_read_all_channels()
34 .addr = i2c->addr, in itg3200_read_all_channels()
35 .flags = i2c->flags | I2C_M_RD, in itg3200_read_all_channels()
41 return i2c_transfer(i2c->adapter, msg, 2); in itg3200_read_all_channels()
47 struct iio_dev *indio_dev = pf->indio_dev; in itg3200_trigger_handler()
58 int ret = itg3200_read_all_channels(st->i2c, scan.buf); in itg3200_trigger_handler()
62 iio_push_to_buffers_with_timestamp(indio_dev, &scan, pf->timestamp); in itg3200_trigger_handler()
65 iio_trigger_notify_done(indio_dev->trig); in itg3200_trigger_handler()
116 st->trig = iio_trigger_alloc(&st->i2c->dev, "%s-dev%d", indio_dev->name, in itg3200_probe_trigger()
118 if (!st->trig) in itg3200_probe_trigger()
119 return -ENOMEM; in itg3200_probe_trigger()
121 ret = request_irq(st->i2c->irq, in itg3200_probe_trigger()
125 st->trig); in itg3200_probe_trigger()
130 st->trig->ops = &itg3200_trigger_ops; in itg3200_probe_trigger()
131 iio_trigger_set_drvdata(st->trig, indio_dev); in itg3200_probe_trigger()
132 ret = iio_trigger_register(st->trig); in itg3200_probe_trigger()
137 indio_dev->trig = iio_trigger_get(st->trig); in itg3200_probe_trigger()
142 free_irq(st->i2c->irq, st->trig); in itg3200_probe_trigger()
144 iio_trigger_free(st->trig); in itg3200_probe_trigger()
152 iio_trigger_unregister(st->trig); in itg3200_remove_trigger()
153 free_irq(st->i2c->irq, st->trig); in itg3200_remove_trigger()
154 iio_trigger_free(st->trig); in itg3200_remove_trigger()