<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/input.h, branch v7.3-rc1</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v7.3-rc1'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-08-06T06:01:44+00:00</updated>
<entry>
<title>Input: reject inhibit and uninhibit requests on unregistering devices</title>
<updated>2026-08-06T06:01:44+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-08-03T23:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c3ff3164b6ec28f2977f71645a5e6d7fde06924'/>
<id>urn:sha1:8c3ff3164b6ec28f2977f71645a5e6d7fde06924</id>
<content type='text'>
When an input device is being unregistered via input_unregister_device(),
input_disconnect_device() sets dev-&gt;going_away = true under dev-&gt;mutex
and releases the mutex.

If a concurrent sysfs write to the inhibited attribute executes
input_inhibit_device() or input_uninhibit_device(), it acquires
dev-&gt;mutex. Because neither function checks dev-&gt;going_away (unlike
input_open_device()), input_uninhibit_device() proceeds to call
dev-&gt;open() and start polling on a device that is in the middle of being
unregistered and torn down.

Fix this by checking dev-&gt;going_away in input_inhibit_device() and
input_uninhibit_device() under dev-&gt;mutex and returning -ENODEV if the
device is going away.

Fixes: a181616487db ("Input: Add "inhibited" property")
Reported-by: sashiko-bot@kernel.org
Assisted-by: Antigravity:gemini-3.6-flash
Link: https://patch.msgid.link/anEolqA35rGei9ql@google.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: defer handler's start() until device is opened</title>
<updated>2026-08-06T06:01:44+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-08-03T00:52:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=876848ad2203d225e927a5f3373900bcbb73c9c5'/>
<id>urn:sha1:876848ad2203d225e927a5f3373900bcbb73c9c5</id>
<content type='text'>
When registering an input handle, handler-&gt;start() is currently called
immediately. However, the input device might not be fully opened or
ready to process events at this stage, meaning any state synchronization
events (like setting LED states) injected by the handler's start method
might be dropped.

Move the handler-&gt;start() invocation to input_open_device(). If it is
the first handle opening the device, start() is called after the driver's
open() method has successfully completed and the device is fully prepared.

To facilitate this, factor out the device startup logic (calling driver's
open and starting polling) into input_start_device().

For passive observer handlers, their start() method is also deferred
until the handle is opened. Since opening a passive observer handle does
not start the underlying hardware device, their start() method is called
immediately upon opening, regardless of whether the device is active.

Fixes: c7e8dc6ee6d5 ("Input: add start() method to input handlers")
Link: https://patch.msgid.link/20260803005210.1251102-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: ensure device is ready before delivering events</title>
<updated>2026-08-06T06:01:44+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-08-03T00:52:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=35f0a0dceddce3a6008a24716bd02766e511ae49'/>
<id>urn:sha1:35f0a0dceddce3a6008a24716bd02766e511ae49</id>
<content type='text'>
When a device is opened via input_open_device(), the driver's open()
callback is invoked. Some drivers, like cm109, submit URBs or perform
other hardware initialization in their open() callbacks.

However, the input core does not prevent dev-&gt;event() from being called
concurrently during the driver's open() execution. For instance, if a
console beep occurs, the kbd handler might inject an EV_SND event. This
can lead to double list_add BUGs if the driver submits the same URB in
both open() and event() paths without adequate synchronization.

To fix this, introduce a ready flag in the input_dev structure.
For complex devices (where dev-&gt;open is defined), this flag is set to true
only after the driver's open() method successfully completes. The core now
checks ready in input_event_dispose() and input_dev_toggle()
to prevent events from reaching the hardware before it is fully prepared.
For simple devices (no open callback), events are delivered immediately.

We also replay the logical state in input_open_device() by calling
input_dev_toggle() right after marking the device ready, ensuring no
events are permanently lost.

In the inhibit path, we ensure that physical feedback (LEDs/sounds) is
turned off before the device is closed, and we synchronize the inhibited
state transition under the event lock to prevent races with incoming events.

Assisted-by: Antigravity:gemini-3.5-flash
Link: https://patch.msgid.link/20260803005210.1251102-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Replace &lt;linux/mod_devicetable.h&gt; by more specific &lt;linux/device-id/*.h&gt; (headers)</title>
<updated>2026-07-03T05:38:16+00:00</updated>
<author>
<name>Uwe Kleine-König (The Capable Hub)</name>
<email>u.kleine-koenig@baylibre.com</email>
</author>
<published>2026-06-30T09:24:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ecca1d63c1eadbbb38ceab82de0f7adfbc2b465d'/>
<id>urn:sha1:ecca1d63c1eadbbb38ceab82de0f7adfbc2b465d</id>
<content type='text'>
&lt;linux/mod_devicetable.h&gt; is included in a many files:

	$ git grep '&lt;linux/mod_devicetable.h&gt;' ef0c9f75a195 | wc -l
	1598

; some of them are widely used headers. To stop mixing up different and
unrelated driver( type)s let the subsystem headers only use the subset
of the recently split &lt;linux/mod_devicetable.h&gt; that are relevant for
them.

The fallout (I hope) is addressed in the previous commits that handle
sources relying on e.g. &lt;linux/i2c.h&gt; pulling in the full legacy header
and thus providing pci_device_id.

Acked-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
Acked-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://patch.msgid.link/199fe46b624ba07fb9bd3e0cd6ff13757932cb5f.1782808461.git.u.kleine-koenig@baylibre.com
Signed-off-by: Uwe Kleine-König (The Capable Hub) &lt;u.kleine-koenig@baylibre.com&gt;
</content>
</entry>
<entry>
<title>Input: stop force-feedback timer when unregistering input devices</title>
<updated>2026-06-23T05:33:01+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2026-06-06T22:04:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ef166ce08801c5237662868d9ec0331d53a38ece'/>
<id>urn:sha1:ef166ce08801c5237662868d9ec0331d53a38ece</id>
<content type='text'>
Memoryless force-feedback devices use a timer to manage playback of
effects. When a driver for such a device is unbound (or the device is
unregistered for other reasons), the driver typically frees its private
data synchronously. However, the input_dev structure (and its associated
force-feedback structures, including the timer) is only freed when the
last user closes the corresponding device node.

If userspace keeps the device node open while the device is unregistered
(e.g., during driver unbind), the force-feedback timer can still fire
after the driver's private data has been freed.

Introduce a new 'stop' callback to struct ff_device, and call it from
input_unregister_device() before the device is deleted. Implement this
callback for memoryless devices and synchronously shut down the timer to
ensure it is stopped and cannot be rearmed once unregistration happens.

Assisted-by: Gemini:gemini-3.1-pro
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: export input_default_setkeycode</title>
<updated>2026-02-23T21:43:16+00:00</updated>
<author>
<name>Fabio Baltieri</name>
<email>fabiobaltieri@chromium.org</email>
</author>
<published>2026-02-23T21:25:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3d35d41169d000f4fbf3c23999b8443e1173efce'/>
<id>urn:sha1:3d35d41169d000f4fbf3c23999b8443e1173efce</id>
<content type='text'>
Export input_default_setkeycode so that a driver can set a custom
setkeycode handler to take some driver specific action but still call
the default handler at some point.

Signed-off-by: Fabio Baltieri &lt;fabiobaltieri@chromium.org&gt;
Reviewed-by: Tzung-Bi Shih &lt;tzungbi@kernel.org&gt;
Link: https://patch.msgid.link/20260222003717.471977-1-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'next' into for-linus</title>
<updated>2024-11-25T01:05:27+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-11-25T01:05:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0201710ba6308a61f1a775c418fe74b8a31ace08'/>
<id>urn:sha1:0201710ba6308a61f1a775c418fe74b8a31ace08</id>
<content type='text'>
Prepare input updates for 6.13 merge window.
</content>
</entry>
<entry>
<title>Input: introduce notion of passive observers for input handlers</title>
<updated>2024-11-05T22:19:47+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-10-23T18:45:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=57a063632df8db6cb20d64ee52a06d4e2049235a'/>
<id>urn:sha1:57a063632df8db6cb20d64ee52a06d4e2049235a</id>
<content type='text'>
Sometimes it is useful to observe (and maybe modify) data coming from
an input device, but only do that if there are other users of such input
device. An example is touchpad switching functionality on Lenovo IdeaPad
Z570 where it is desirable to suppress events coming from the touchpad
if user toggles touchpad on/off button (on this laptop the firmware does
not stop the device).

Introduce notion of passive observers for input handlers to solve this
issue. An input handler marked as passive observer behaves exactly like
any other input handler or filter, but with one exception: it does not
open/start underlying input device when attaching to it.

Link: https://lore.kernel.org/r/ZxlEROX7bMo5cbZP@google.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: fix regression when re-registering input handlers</title>
<updated>2024-11-03T05:28:58+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-10-28T05:31:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=071b24b54d2d05fbf39ddbb27dee08abd1d713f3'/>
<id>urn:sha1:071b24b54d2d05fbf39ddbb27dee08abd1d713f3</id>
<content type='text'>
Commit d469647bafd9 ("Input: simplify event handling logic") introduced
code that would set handler-&gt;events() method to either
input_handler_events_filter() or input_handler_events_default() or
input_handler_events_null(), depending on the kind of input handler
(a filter or a regular one) we are dealing with. Unfortunately this
breaks cases when we try to re-register the same filter (as is the case
with sysrq handler): after initial registration the handler will have 2
event handling methods defined, and will run afoul of the check in
input_handler_check_methods():

	input: input_handler_check_methods: only one event processing method can be defined (sysrq)
	sysrq: Failed to register input handler, error -22

Fix this by adding handle_events() method to input_handle structure and
setting it up when registering a new input handle according to event
handling methods defined in associated input_handler structure, thus
avoiding modifying the input_handler structure.

Reported-by: "Ned T. Crigler" &lt;crigler@gmail.com&gt;
Reported-by: Christian Heusel &lt;christian@heusel.eu&gt;
Tested-by: "Ned T. Crigler" &lt;crigler@gmail.com&gt;
Tested-by: Peter Seiderer &lt;ps.report@gmx.net&gt;
Fixes: d469647bafd9 ("Input: simplify event handling logic")
Link: https://lore.kernel.org/r/Zx2iQp6csn42PJA7@xavtug
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>Input: make events() method return number of events processed</title>
<updated>2024-07-08T23:22:49+00:00</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2024-07-03T21:37:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=14498e993fb77adce75f0106162902b2f8b1d480'/>
<id>urn:sha1:14498e993fb77adce75f0106162902b2f8b1d480</id>
<content type='text'>
In preparation to consolidating filtering and event processing in the
input core change events() method to return number of events processed
by it.

Reviewed-by: Jeff LaBundy &lt;jeff@labundy.com&gt;
Reviewed-by: Benjamin Tissoires &lt;bentiss@kernel.org&gt;
Link: https://lore.kernel.org/r/20240703213756.3375978-4-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
</feed>
