| Age | Commit message (Collapse) | Author |
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code
and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
This makes the code more compact and error handling more robust.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Instead of requesting interrupt normally and immediately disabling it
with call to disable_irq() use IRQF_NOAUTOEN to keep it disabled until
it is needed. This avoids a tiny window when interrupt is enabled but
not needed.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Also use list_first_entry() instead of list_entry() to emphasize intent.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code
and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code and shows critical section more clearly.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Also stop trying to check if input device is opened/in use in the
interrupt handler - the interrupt is disabled when device is closed or
suspended.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Using guard notation makes the code more compact and error handling
more robust by ensuring that locks are released in all code paths
when control leaves critical section.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code
and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Use __free(fwnode_handle) cleanup facility to ensure that references to
acquired fwnodes are dropped at appropriate times automatically.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Do not define or use iqs5xx_ihex_rec structure: the original code was
using just a couple of fields in it and instead used it to calculate
offset to record data. The data field was actually reserving space for
checksum.
Instead iterate through fields and advance pointer explicitly.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code and error
handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code and error
handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free(firmware) to simplify the code and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Note that callers of exc3000_vendor_data_request() always expect
response, so it was adjusted to always wait for it.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code
and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
This makes the code more compact and error handling more robust.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Also fix the touchscreen not being marked as suspended when noone has
opened/is using it.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Guard notation simplifies code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
This makes the code more compact and error handling more robust.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code
and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Start using __free() and guard() primitives to simplify the code
and error handling.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
This makes the code more compact and error handling more robust.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
This makes the code more compact and error handling more robust.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
In all cases in which a struct acpi_driver is used for binding a driver
to an ACPI device object, a corresponding platform device is created by
the ACPI core and that device is regarded as a proper representation of
underlying hardware. Accordingly, a struct platform_driver should be
used by driver code to bind to that device. There are multiple reasons
why drivers should not bind directly to ACPI device objects [1].
Overall, it is better to bind drivers to platform devices than to their
ACPI companions, so convert the ACPI Atlas button driver to a platform
one.
While this is not expected to alter functionality, it changes sysfs
layout and so it will be visible to user space.
Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/ [1]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3429591.aeNJFYEL58@rafael.j.wysocki
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Enable doubletap functionality by default on TrackPoint devices that
support it. The feature is detected using firmware ID pattern matching
(PNP: LEN03xxx) with a deny list of incompatible devices.
This provides immediate doubletap functionality without requiring
userspace configuration. The hardware is enabled during device
detection, while event filtering continues to be handled by the
thinkpad_acpi driver as before.
Signed-off-by: Vishnu Sankar <vishnuocv@gmail.com>
Suggested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20260311143144.482145-2-vishnuocv@gmail.com
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
|
|
The only user of psmouse_queue_work() and therefore kpsmoused workqueue
is psmouse-base itself, when it tries to schedule the resync work. Since
resyncing is not going to race with itself we no longer need the
dedicated ordered workqueue.
Remove it and switch to using regular (non-delayed) work structure
scheduled on the default workqueue.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Registering supplemental bare PS/2 device does not need to be ordered
relative to attempt to resynchronization done in psmouse core.
Switch to the default workqueue and use normal (non-delayed) work.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
The original code uses flush_workqueue() in psmouse_disconnect() to
ensure the completion of both resync_work and dev3_register_work.
Given that alps_disconnect() already uses disable_delayed_work_sync()
to cancel dev3_register_work, replacing flush_workqueue() with
disable_delayed_work_sync(&psmouse->resync_work) is more robust
and efficient.
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Link: https://patch.msgid.link/6e40a46e5d9e6e3237702958b8f641263c28d2e4.1765939397.git.duoming@zju.edu.cn
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
The protocol flavor for ALPS touchpads found in OLPC laptops has been
broken since 2015 commit c378b5119eb0 ("Input: psmouse - factor out
common protocol probing code") that forgot to add hgpk_init() to HGPK
entry in psmouse_protocols array.
Since nobody complained for 10 years let's remove it.
Acked-by: Andres Salomon <dilinger@queued.net>
Link: https://patch.msgid.link/abC5U_JigA9TrGYu@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Sync up with the mainline to brig up the latest changes, specifically
changes to ALPS driver.
|
|
The driver currently calls device_init_wakeup() and manually toggles
IRQ wake in suspend and resume paths. This is unnecessary since the
I2C core already handles wakeup configuration when the device is
described in Device Tree with the "wakeup-source" property.
Signed-off-by: bui duc phuc <phucduc.bui@gmail.com>
Link: https://patch.msgid.link/20260309071413.92709-1-phucduc.bui@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Over the years we accumulated a number of formatting issues, fix them.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|
|
Instead of using "unsigned short" and "unsigned char" for holding 16-bit
and 8-bit data, switch to using common in kernel u16 and u8.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
|