Lines Matching refs:iio_dev
131 static int mxs_lradc_adc_read_single(struct iio_dev *iio_dev, int chan, in mxs_lradc_adc_read_single() argument
134 struct mxs_lradc_adc *adc = iio_priv(iio_dev); in mxs_lradc_adc_read_single()
144 ret = iio_device_claim_direct_mode(iio_dev); in mxs_lradc_adc_read_single()
195 iio_device_release_direct_mode(iio_dev); in mxs_lradc_adc_read_single()
200 static int mxs_lradc_adc_read_temp(struct iio_dev *iio_dev, int *val) in mxs_lradc_adc_read_temp() argument
204 ret = mxs_lradc_adc_read_single(iio_dev, 8, &min); in mxs_lradc_adc_read_temp()
208 ret = mxs_lradc_adc_read_single(iio_dev, 9, &max); in mxs_lradc_adc_read_temp()
217 static int mxs_lradc_adc_read_raw(struct iio_dev *iio_dev, in mxs_lradc_adc_read_raw() argument
221 struct mxs_lradc_adc *adc = iio_priv(iio_dev); in mxs_lradc_adc_read_raw()
226 return mxs_lradc_adc_read_temp(iio_dev, val); in mxs_lradc_adc_read_raw()
228 return mxs_lradc_adc_read_single(iio_dev, chan->channel, val); in mxs_lradc_adc_read_raw()
269 static int mxs_lradc_adc_write_raw(struct iio_dev *iio_dev, in mxs_lradc_adc_write_raw() argument
273 struct mxs_lradc_adc *adc = iio_priv(iio_dev); in mxs_lradc_adc_write_raw()
278 ret = iio_device_claim_direct_mode(iio_dev); in mxs_lradc_adc_write_raw()
303 iio_device_release_direct_mode(iio_dev); in mxs_lradc_adc_write_raw()
308 static int mxs_lradc_adc_write_raw_get_fmt(struct iio_dev *iio_dev, in mxs_lradc_adc_write_raw_get_fmt() argument
319 struct iio_dev *iio = dev_to_iio_dev(dev); in mxs_lradc_adc_show_scale_avail()
386 struct iio_dev *iio = data; in mxs_lradc_adc_handle_irq()
416 struct iio_dev *iio = pf->indio_dev; in mxs_lradc_adc_trigger_handler()
439 struct iio_dev *iio = iio_trigger_get_drvdata(trig); in mxs_lradc_adc_configure_trigger()
452 static int mxs_lradc_adc_trigger_init(struct iio_dev *iio) in mxs_lradc_adc_trigger_init()
476 static void mxs_lradc_adc_trigger_remove(struct iio_dev *iio) in mxs_lradc_adc_trigger_remove()
483 static int mxs_lradc_adc_buffer_preenable(struct iio_dev *iio) in mxs_lradc_adc_buffer_preenable()
521 static int mxs_lradc_adc_buffer_postdisable(struct iio_dev *iio) in mxs_lradc_adc_buffer_postdisable()
538 static bool mxs_lradc_adc_validate_scan_mask(struct iio_dev *iio, in mxs_lradc_adc_validate_scan_mask()
693 struct iio_dev *iio; in mxs_lradc_adc_probe()
812 struct iio_dev *iio = platform_get_drvdata(pdev); in mxs_lradc_adc_remove()