Lines Matching refs:iio_dev

421 static int hts221_read_raw(struct iio_dev *iio_dev,  in hts221_read_raw()  argument
425 struct hts221_hw *hw = iio_priv(iio_dev); in hts221_read_raw()
428 ret = iio_device_claim_direct_mode(iio_dev); in hts221_read_raw()
474 iio_device_release_direct_mode(iio_dev); in hts221_read_raw()
479 static int hts221_write_raw(struct iio_dev *iio_dev, in hts221_write_raw() argument
483 struct hts221_hw *hw = iio_priv(iio_dev); in hts221_write_raw()
486 ret = iio_device_claim_direct_mode(iio_dev); in hts221_write_raw()
512 iio_device_release_direct_mode(iio_dev); in hts221_write_raw()
517 static int hts221_validate_trigger(struct iio_dev *iio_dev, in hts221_validate_trigger() argument
520 struct hts221_hw *hw = iio_priv(iio_dev); in hts221_validate_trigger()
567 struct iio_dev *iio_dev; in hts221_probe() local
572 iio_dev = devm_iio_device_alloc(dev, sizeof(*hw)); in hts221_probe()
573 if (!iio_dev) in hts221_probe()
576 dev_set_drvdata(dev, iio_dev); in hts221_probe()
578 hw = iio_priv(iio_dev); in hts221_probe()
592 iio_dev->modes = INDIO_DIRECT_MODE; in hts221_probe()
593 iio_dev->available_scan_masks = hts221_scan_masks; in hts221_probe()
594 iio_dev->channels = hts221_channels; in hts221_probe()
595 iio_dev->num_channels = ARRAY_SIZE(hts221_channels); in hts221_probe()
596 iio_dev->name = HTS221_DEV_NAME; in hts221_probe()
597 iio_dev->info = &hts221_info; in hts221_probe()
641 err = hts221_allocate_buffers(iio_dev); in hts221_probe()
645 err = hts221_allocate_trigger(iio_dev); in hts221_probe()
650 return devm_iio_device_register(hw->dev, iio_dev); in hts221_probe()
656 struct iio_dev *iio_dev = dev_get_drvdata(dev); in hts221_suspend() local
657 struct hts221_hw *hw = iio_priv(iio_dev); in hts221_suspend()
666 struct iio_dev *iio_dev = dev_get_drvdata(dev); in hts221_resume() local
667 struct hts221_hw *hw = iio_priv(iio_dev); in hts221_resume()