Lines Matching refs:iio_dev
124 static int ad5761_spi_write(struct iio_dev *indio_dev, u8 addr, u16 val) in ad5761_spi_write()
163 static int ad5761_spi_read(struct iio_dev *indio_dev, u8 addr, u16 *val) in ad5761_spi_read()
199 static int ad5761_read_raw(struct iio_dev *indio_dev, in ad5761_read_raw()
233 static int ad5761_write_raw(struct iio_dev *indio_dev, in ad5761_write_raw()
349 struct iio_dev *iio_dev; in ad5761_probe() local
357 iio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); in ad5761_probe()
358 if (!iio_dev) in ad5761_probe()
361 st = iio_priv(iio_dev); in ad5761_probe()
364 spi_set_drvdata(spi, iio_dev); in ad5761_probe()
379 iio_dev->info = &ad5761_info; in ad5761_probe()
380 iio_dev->modes = INDIO_DIRECT_MODE; in ad5761_probe()
381 iio_dev->channels = &chip_info->channel; in ad5761_probe()
382 iio_dev->num_channels = 1; in ad5761_probe()
383 iio_dev->name = spi_get_device_id(st->spi)->name; in ad5761_probe()
384 ret = iio_device_register(iio_dev); in ad5761_probe()
399 struct iio_dev *iio_dev = spi_get_drvdata(spi); in ad5761_remove() local
400 struct ad5761_state *st = iio_priv(iio_dev); in ad5761_remove()
402 iio_device_unregister(iio_dev); in ad5761_remove()