Lines Matching refs:iio_dev_opaque
309 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffer_wakeup_poll() local
313 for (i = 0; i < iio_dev_opaque->attached_buffers_cnt; i++) { in iio_buffer_wakeup_poll()
314 buffer = iio_dev_opaque->attached_buffers[i]; in iio_buffer_wakeup_poll()
341 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_device_detach_buffers() local
345 for (i = 0; i < iio_dev_opaque->attached_buffers_cnt; i++) { in iio_device_detach_buffers()
346 buffer = iio_dev_opaque->attached_buffers[i]; in iio_device_detach_buffers()
350 kfree(iio_dev_opaque->attached_buffers); in iio_device_detach_buffers()
699 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_storage_bytes_for_timestamp() local
702 iio_dev_opaque->scan_index_timestamp); in iio_storage_bytes_for_timestamp()
734 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffer_activate() local
737 list_add(&buffer->buffer_list, &iio_dev_opaque->buffer_list); in iio_buffer_activate()
749 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffer_deactivate_all() local
753 &iio_dev_opaque->buffer_list, buffer_list) in iio_buffer_deactivate_all()
826 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_verify_update() local
849 list_is_singular(&iio_dev_opaque->buffer_list)) in iio_verify_update()
854 list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) { in iio_verify_update()
875 if (insert_buffer && !list_empty(&iio_dev_opaque->buffer_list)) in iio_verify_update()
895 list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) { in iio_verify_update()
1040 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_update_demux() local
1044 list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) { in iio_update_demux()
1052 list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) in iio_update_demux()
1061 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_enable_buffers() local
1098 list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) { in iio_enable_buffers()
1128 list_for_each_entry_continue_reverse(buffer, &iio_dev_opaque->buffer_list, in iio_enable_buffers()
1143 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_disable_buffers() local
1149 if (list_empty(&iio_dev_opaque->buffer_list)) in iio_disable_buffers()
1170 list_for_each_entry(buffer, &iio_dev_opaque->buffer_list, buffer_list) { in iio_disable_buffers()
1193 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in __iio_update_buffers() local
1218 if (list_empty(&iio_dev_opaque->buffer_list)) in __iio_update_buffers()
1247 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_update_buffers() local
1257 mutex_lock(&iio_dev_opaque->info_exist_lock); in iio_update_buffers()
1280 mutex_unlock(&iio_dev_opaque->info_exist_lock); in iio_update_buffers()
1454 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffer_register_legacy_sysfs_groups() local
1465 group = &iio_dev_opaque->legacy_buffer_group; in iio_buffer_register_legacy_sysfs_groups()
1482 group = &iio_dev_opaque->legacy_scan_el_group; in iio_buffer_register_legacy_sysfs_groups()
1493 kfree(iio_dev_opaque->legacy_scan_el_group.attrs); in iio_buffer_register_legacy_sysfs_groups()
1495 kfree(iio_dev_opaque->legacy_buffer_group.attrs); in iio_buffer_register_legacy_sysfs_groups()
1502 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffer_unregister_legacy_sysfs_groups() local
1504 kfree(iio_dev_opaque->legacy_buffer_group.attrs); in iio_buffer_unregister_legacy_sysfs_groups()
1505 kfree(iio_dev_opaque->legacy_scan_el_group.attrs); in iio_buffer_unregister_legacy_sysfs_groups()
1534 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_device_buffer_getfd() local
1543 if (idx >= iio_dev_opaque->attached_buffers_cnt) in iio_device_buffer_getfd()
1548 buffer = iio_dev_opaque->attached_buffers[idx]; in iio_device_buffer_getfd()
1603 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in __iio_buffer_alloc_sysfs_and_mask() local
1630 iio_dev_opaque->scan_index_timestamp = in __iio_buffer_alloc_sysfs_and_mask()
1727 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffers_alloc_sysfs_and_mask() local
1743 if (!iio_dev_opaque->attached_buffers_cnt) in iio_buffers_alloc_sysfs_and_mask()
1746 for (i = 0; i < iio_dev_opaque->attached_buffers_cnt; i++) { in iio_buffers_alloc_sysfs_and_mask()
1747 buffer = iio_dev_opaque->attached_buffers[i]; in iio_buffers_alloc_sysfs_and_mask()
1754 unwind_idx = iio_dev_opaque->attached_buffers_cnt - 1; in iio_buffers_alloc_sysfs_and_mask()
1756 sz = sizeof(*(iio_dev_opaque->buffer_ioctl_handler)); in iio_buffers_alloc_sysfs_and_mask()
1757 iio_dev_opaque->buffer_ioctl_handler = kzalloc(sz, GFP_KERNEL); in iio_buffers_alloc_sysfs_and_mask()
1758 if (!iio_dev_opaque->buffer_ioctl_handler) { in iio_buffers_alloc_sysfs_and_mask()
1763 iio_dev_opaque->buffer_ioctl_handler->ioctl = iio_device_buffer_ioctl; in iio_buffers_alloc_sysfs_and_mask()
1765 iio_dev_opaque->buffer_ioctl_handler); in iio_buffers_alloc_sysfs_and_mask()
1771 buffer = iio_dev_opaque->attached_buffers[unwind_idx]; in iio_buffers_alloc_sysfs_and_mask()
1779 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_buffers_free_sysfs_and_mask() local
1783 if (!iio_dev_opaque->attached_buffers_cnt) in iio_buffers_free_sysfs_and_mask()
1786 iio_device_ioctl_handler_unregister(iio_dev_opaque->buffer_ioctl_handler); in iio_buffers_free_sysfs_and_mask()
1787 kfree(iio_dev_opaque->buffer_ioctl_handler); in iio_buffers_free_sysfs_and_mask()
1789 for (i = iio_dev_opaque->attached_buffers_cnt - 1; i >= 0; i--) { in iio_buffers_free_sysfs_and_mask()
1790 buffer = iio_dev_opaque->attached_buffers[i]; in iio_buffers_free_sysfs_and_mask()
1849 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_push_to_buffers() local
1853 list_for_each_entry(buf, &iio_dev_opaque->buffer_list, buffer_list) { in iio_push_to_buffers()
1881 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_push_to_buffers_with_ts_unaligned() local
1891 if (iio_dev_opaque->bounce_buffer_size != indio_dev->scan_bytes) { in iio_push_to_buffers_with_ts_unaligned()
1895 iio_dev_opaque->bounce_buffer, in iio_push_to_buffers_with_ts_unaligned()
1899 iio_dev_opaque->bounce_buffer = bb; in iio_push_to_buffers_with_ts_unaligned()
1900 iio_dev_opaque->bounce_buffer_size = indio_dev->scan_bytes; in iio_push_to_buffers_with_ts_unaligned()
1902 memcpy(iio_dev_opaque->bounce_buffer, data, data_sz); in iio_push_to_buffers_with_ts_unaligned()
1904 iio_dev_opaque->bounce_buffer, in iio_push_to_buffers_with_ts_unaligned()
1967 struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev); in iio_device_attach_buffer() local
1968 struct iio_buffer **new, **old = iio_dev_opaque->attached_buffers; in iio_device_attach_buffer()
1969 unsigned int cnt = iio_dev_opaque->attached_buffers_cnt; in iio_device_attach_buffer()
1976 iio_dev_opaque->attached_buffers = new; in iio_device_attach_buffer()
1984 iio_dev_opaque->attached_buffers[cnt - 1] = buffer; in iio_device_attach_buffer()
1985 iio_dev_opaque->attached_buffers_cnt = cnt; in iio_device_attach_buffer()