Lines Matching refs:idev
102 static int hi8435_read_raw(struct iio_dev *idev, in hi8435_read_raw() argument
106 struct hi8435_priv *priv = iio_priv(idev); in hi8435_read_raw()
122 static int hi8435_read_event_config(struct iio_dev *idev, in hi8435_read_event_config() argument
127 struct hi8435_priv *priv = iio_priv(idev); in hi8435_read_event_config()
132 static int hi8435_write_event_config(struct iio_dev *idev, in hi8435_write_event_config() argument
137 struct hi8435_priv *priv = iio_priv(idev); in hi8435_write_event_config()
157 static int hi8435_read_event_value(struct iio_dev *idev, in hi8435_read_event_value() argument
164 struct hi8435_priv *priv = iio_priv(idev); in hi8435_read_event_value()
189 static int hi8435_write_event_value(struct iio_dev *idev, in hi8435_write_event_value() argument
196 struct hi8435_priv *priv = iio_priv(idev); in hi8435_write_event_value()
265 static int hi8435_debugfs_reg_access(struct iio_dev *idev, in hi8435_debugfs_reg_access() argument
269 struct hi8435_priv *priv = iio_priv(idev); in hi8435_debugfs_reg_access()
300 static int hi8435_get_sensing_mode(struct iio_dev *idev, in hi8435_get_sensing_mode() argument
303 struct hi8435_priv *priv = iio_priv(idev); in hi8435_get_sensing_mode()
314 static int hi8435_set_sensing_mode(struct iio_dev *idev, in hi8435_set_sensing_mode() argument
318 struct hi8435_priv *priv = iio_priv(idev); in hi8435_set_sensing_mode()
413 static void hi8435_iio_push_event(struct iio_dev *idev, unsigned int val) in hi8435_iio_push_event() argument
415 struct hi8435_priv *priv = iio_priv(idev); in hi8435_iio_push_event()
427 iio_push_event(idev, in hi8435_iio_push_event()
430 iio_get_time_ns(idev)); in hi8435_iio_push_event()
440 struct iio_dev *idev = pf->indio_dev; in hi8435_trigger_handler() local
441 struct hi8435_priv *priv = iio_priv(idev); in hi8435_trigger_handler()
449 hi8435_iio_push_event(idev, val); in hi8435_trigger_handler()
452 iio_trigger_notify_done(idev->trig); in hi8435_trigger_handler()
464 struct iio_dev *idev; in hi8435_probe() local
469 idev = devm_iio_device_alloc(&spi->dev, sizeof(*priv)); in hi8435_probe()
470 if (!idev) in hi8435_probe()
473 priv = iio_priv(idev); in hi8435_probe()
488 idev->name = spi_get_device_id(spi)->name; in hi8435_probe()
489 idev->modes = INDIO_DIRECT_MODE; in hi8435_probe()
490 idev->info = &hi8435_info; in hi8435_probe()
491 idev->channels = hi8435_channels; in hi8435_probe()
492 idev->num_channels = ARRAY_SIZE(hi8435_channels); in hi8435_probe()
512 ret = iio_triggered_event_setup(idev, NULL, hi8435_trigger_handler); in hi8435_probe()
518 idev); in hi8435_probe()
522 return devm_iio_device_register(&spi->dev, idev); in hi8435_probe()