Thread (101 messages) 101 messages, 11 authors, 2020-12-11

Re: [PATCH v2] Input: document inhibiting

From: Pavel Machek <hidden>
Date: 2020-06-23 13:35:25
Also in: linux-acpi, linux-iio, linux-pm, linux-samsung-soc, linux-tegra, lkml, platform-driver-x86

Hi!
+Inhibiting input devices
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Inhibiting a device means ignoring input events from it. As such it is about maintaining
+relationships with input handlers - either already existing relationships, or relationships
+to be established while the device is in inhibited state.
+
+If a device is inhibited, no input handler will receive events from it.
+
+The fact that nobody wants events from the device is exploited further, by calling device's
+close() (if there are users) and open() (if there are users) on inhibit and uninhibit
+operations, respectively. Indeed, the meaning of close() is to stop providing events
+to the input core and that of open() is to start providing events to the input core.
+
+Calling the device's close() method on inhibit (if there are users) allows the driver
+to save power. Either by directly powering down the device or by releasing the
+runtime-pm reference it got in open() when the driver is using runtime-pm.
+
+Inhibiting and uninhibiting are orthogonal to opening and closing the device by input
+handlers. Userspace might want to inhibit a device in anticipation before any handler is
+positively matched against it.
Ok.
+Inhibiting and uninhibiting are orthogonal to device's being a wakeup source, too. 
Being a +wakeup source plays a role when the system is sleeping, not when the system is 
operating. +How drivers should program their interaction between inhibiting, sleeping 
and being a wakeup +source is driver-specific. + +Taking the analogy with the network 
I don't believe making interaction driver-specific is good idea. We should decide
what reasonable behaviour is and then make drivers implement that...

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help