platform/surface: aggregator_cdev: Allow enabling of events from user-space
authorMaximilian Luz <luzmaximilian@gmail.com>
Fri, 4 Jun 2021 13:47:53 +0000 (15:47 +0200)
committerHans de Goede <hdegoede@redhat.com>
Wed, 16 Jun 2021 15:47:53 +0000 (17:47 +0200)
commite8e298a653856b1f3a2bb7b1fe31d3faa93cc7dc
treeea4efd558ad50290a932953833c9b06cdbe72d85
parent776c53c6a448905d8b9b161805b67f82301bfe91
platform/surface: aggregator_cdev: Allow enabling of events from user-space

While events can already be enabled and disabled via the generic request
IOCTL, this bypasses the internal reference counting mechanism of the
controller. Due to that, disabling an event will turn it off regardless
of any other client having requested said event, which may break
functionality of that client.

To solve this, add IOCTLs wrapping the ssam_controller_event_enable()
and ssam_controller_event_disable() functions, which have been
previously introduced for this specific purpose.

Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20210604134755.535590-6-luzmaximilian@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/surface/surface_aggregator_cdev.c
include/uapi/linux/surface_aggregator/cdev.h