Lines Matching refs:iio_dev
123 static int ad5761_spi_write(struct iio_dev *indio_dev, u8 addr, u16 val) in ad5761_spi_write()
162 static int ad5761_spi_read(struct iio_dev *indio_dev, u8 addr, u16 *val) in ad5761_spi_read()
198 static int ad5761_read_raw(struct iio_dev *indio_dev, in ad5761_read_raw()
232 static int ad5761_write_raw(struct iio_dev *indio_dev, in ad5761_write_raw()
348 struct iio_dev *iio_dev; in ad5761_probe() local
356 iio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st)); in ad5761_probe()
357 if (!iio_dev) in ad5761_probe()
360 st = iio_priv(iio_dev); in ad5761_probe()
363 spi_set_drvdata(spi, iio_dev); in ad5761_probe()
376 iio_dev->dev.parent = &spi->dev; in ad5761_probe()
377 iio_dev->info = &ad5761_info; in ad5761_probe()
378 iio_dev->modes = INDIO_DIRECT_MODE; in ad5761_probe()
379 iio_dev->channels = &chip_info->channel; in ad5761_probe()
380 iio_dev->num_channels = 1; in ad5761_probe()
381 iio_dev->name = spi_get_device_id(st->spi)->name; in ad5761_probe()
382 ret = iio_device_register(iio_dev); in ad5761_probe()
397 struct iio_dev *iio_dev = spi_get_drvdata(spi); in ad5761_remove() local
398 struct ad5761_state *st = iio_priv(iio_dev); in ad5761_remove()
400 iio_device_unregister(iio_dev); in ad5761_remove()