linux-stable/include
Alexandru Ardelean 8dedcc3eee iio: core: centralize ioctl() calls to the main chardev
The aim of this is to improve a bit the organization of ioctl() calls in
IIO core. Currently the chardev is split across IIO core sub-modules/files.
The main chardev has to be able to handle ioctl() calls, and if we need to
add buffer ioctl() calls, this would complicate things.

The 'industrialio-core.c' file will provide a 'iio_device_ioctl()' which
will iterate over a list of ioctls registered with the IIO device. These
can be event ioctl() or buffer ioctl() calls, or something else.

Each ioctl() handler will have to return a IIO_IOCTL_UNHANDLED code (which
is positive 1), if the ioctl() did not handle the call in any. This
eliminates any potential ambiguities about negative error codes, which
should fail the call altogether.

If any ioctl() returns 0, it was considered that it was serviced
successfully and the loop will exit.

This change also moves the handling of the IIO_GET_EVENT_FD_IOCTL command
inside 'industrialio-event.c', where this is better suited.

This patch is a combination of 2 other patches from an older series:
Patch 1: iio: core: add simple centralized mechanism for ioctl() handlers
  Link: https://lore.kernel.org/linux-iio/20200427131100.50845-6-alexandru.ardelean@analog.com/
Patch 2: iio: core: use new common ioctl() mechanism
  Link: https://lore.kernel.org/linux-iio/20200427131100.50845-7-alexandru.ardelean@analog.com/

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20200924084155.99406-1-alexandru.ardelean@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2020-11-14 15:31:25 +00:00
..
acpi
asm-generic iomap: constify ioreadX() iomem argument (as in generic implementation) 2020-08-14 19:56:57 -07:00
clocksource include/: replace HTTP links with HTTPS ones 2020-08-12 10:57:59 -07:00
crypto
drm drm/i915: Fix sha_text population code 2020-09-02 10:48:11 +03:00
dt-bindings Here's some more updates that missed the last pull request because I 2020-08-12 12:19:49 -07:00
keys
kunit
kvm
linux iio: core: centralize ioctl() calls to the main chardev 2020-11-14 15:31:25 +00:00
math-emu treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
media media: media/v4l2: remove V4L2_FLAG_MEMORY_NON_CONSISTENT flag 2020-09-14 15:28:06 +02:00
memory
misc
net net: sctp: Fix IPv6 ancestor_size calc in sctp_copy_descendant 2020-09-20 14:15:12 -07:00
pcmcia
ras
rdma
scsi
soc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-22 14:43:50 -07:00
sound ASoC: core: Do not cleanup uninitialized dais on soc_pcm_open failure 2020-09-07 12:40:24 +01:00
target
trace Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-09-03 18:50:48 -07:00
uapi Merge 5.9-rc8 into staging-next 2020-10-05 08:55:26 +02:00
vdso
video
xen xen: branch for v5.9-rc4 2020-09-06 09:59:27 -07:00