Lines Matching refs:indio_dev
74 static int als_read_raw(struct iio_dev *indio_dev, in als_read_raw() argument
79 struct als_state *als_state = iio_priv(indio_dev); in als_read_raw()
140 static int als_write_raw(struct iio_dev *indio_dev, in als_write_raw() argument
146 struct als_state *als_state = iio_priv(indio_dev); in als_write_raw()
172 static void hid_sensor_push_data(struct iio_dev *indio_dev, const void *data, in hid_sensor_push_data() argument
175 dev_dbg(&indio_dev->dev, "hid_sensor_push_data\n"); in hid_sensor_push_data()
176 iio_push_to_buffers(indio_dev, data); in hid_sensor_push_data()
184 struct iio_dev *indio_dev = platform_get_drvdata(priv); in als_proc_event() local
185 struct als_state *als_state = iio_priv(indio_dev); in als_proc_event()
187 dev_dbg(&indio_dev->dev, "als_proc_event\n"); in als_proc_event()
189 hid_sensor_push_data(indio_dev, in als_proc_event()
202 struct iio_dev *indio_dev = platform_get_drvdata(priv); in als_capture_sample() local
203 struct als_state *als_state = iio_priv(indio_dev); in als_capture_sample()
263 struct iio_dev *indio_dev; in hid_als_probe() local
268 indio_dev = devm_iio_device_alloc(&pdev->dev, sizeof(struct als_state)); in hid_als_probe()
269 if (!indio_dev) in hid_als_probe()
271 platform_set_drvdata(pdev, indio_dev); in hid_als_probe()
273 als_state = iio_priv(indio_dev); in hid_als_probe()
297 indio_dev->channels = channels; in hid_als_probe()
298 indio_dev->num_channels = in hid_als_probe()
300 indio_dev->dev.parent = &pdev->dev; in hid_als_probe()
301 indio_dev->info = &als_info; in hid_als_probe()
302 indio_dev->name = name; in hid_als_probe()
303 indio_dev->modes = INDIO_DIRECT_MODE; in hid_als_probe()
305 ret = iio_triggered_buffer_setup(indio_dev, &iio_pollfunc_store_time, in hid_als_probe()
312 ret = hid_sensor_setup_trigger(indio_dev, name, in hid_als_probe()
319 ret = iio_device_register(indio_dev); in hid_als_probe()
338 iio_device_unregister(indio_dev); in hid_als_probe()
342 iio_triggered_buffer_cleanup(indio_dev); in hid_als_probe()
344 kfree(indio_dev->channels); in hid_als_probe()
352 struct iio_dev *indio_dev = platform_get_drvdata(pdev); in hid_als_remove() local
353 struct als_state *als_state = iio_priv(indio_dev); in hid_als_remove()
356 iio_device_unregister(indio_dev); in hid_als_remove()
358 iio_triggered_buffer_cleanup(indio_dev); in hid_als_remove()
359 kfree(indio_dev->channels); in hid_als_remove()