Input: gscps2 - use guard notation when acquiring spinlock
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.
Input: elo - use guard notation when pausing serio port
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: synaptics-rmi4 - use guard notation when pausing serio port in F03
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: sunkbd - use guard notation when pausing serio port
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: atkbd - use guard notation when pausing serio port
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: synaptics - use guard notation when pausing serio port
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: byd - use guard notation when pausing serio port
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: alps - use guard notation when pausing serio port
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: libps2 - use guard notation when temporarily pausing serio ports
Using guard notation makes the code more compact and error handling
more robust by ensuring that serio ports are resumed in all code paths
when control leaves critical section.
Input: serio - define serio_pause_rx guard to pause and resume serio ports
serio_pause_rx() and serio_continue_rx() are usually used together to
temporarily stop receiving interrupts/data for a given serio port.
Define "serio_pause_rx" guard for this so that the port is always
resumed once critical section is over.
Input: sparcspkr - use guard notation when acquiring spinlock
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.
Input: rotary_encoder - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: regulator-haptic - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: pwm-beeper - use guard notation when acquiring spinlock
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.
Input: powermate - use guard notation when acquiring spinlock
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.
Input: pegasus_notetaker - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: max8997_haptic - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: iqs269a - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: ibm-panel - use guard notation when acquiring spinlock
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.
Input: ideapad_slidebar - use guard notation when acquiring spinlock
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.
Input: drv2667 - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: drv2665 - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: drv260x - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: kxtj9 - use guard notation when acquiring mutex/disabling irq
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released and interrupts are
re-enabled in all code paths when control leaves critical section.
Input: da7280 - use guard notation when acquiring mutex and spinlock
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.
Input: cma3000_d0x - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: cm109 - use guard notation when acquiring mutex and spinlock
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.
Input: ati_remote2 - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: ad714x - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: xpad - use guard notation when acquiring mutex and spinlock
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.
Input: turbografx - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: n64joy - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: iforce - use guard notation when acquiring mutex and spinlock
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.
Input: gamecon - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Input: db9 - use guard notation when acquiring mutex
Using guard notation makes the code more compact and error handling
more robust by ensuring that mutexes are released in all code paths
when control leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:20 +0000 (22:16 -0700)]
Input: st-keyscan - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:19 +0000 (22:16 -0700)]
Input: spear-keyboard - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:18 +0000 (22:16 -0700)]
Input: pxa27x_keypad - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:17 +0000 (22:16 -0700)]
Input: pmic8xxx-keypad - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:16 +0000 (22:16 -0700)]
Input: omap4-keypad - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:15 +0000 (22:16 -0700)]
Input: matrix_keypad - use guard notation when acquiring spinlock
This 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.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:14 +0000 (22:16 -0700)]
Input: lpc32xx-keys - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:13 +0000 (22:16 -0700)]
Input: lm8323 - use guard notation when acquiring mutexes
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:11 +0000 (22:16 -0700)]
Input: ipaq-micro-keys - use guard notation when acquiring mutex and spinlock
This 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.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:10 +0000 (22:16 -0700)]
Input: imx_keypad - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:08 +0000 (22:16 -0700)]
Input: ep93xx_keypad - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:06 +0000 (22:16 -0700)]
Input: applespi - use guard notation when acquiring spinlock
This 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.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:05 +0000 (22:16 -0700)]
Input: adp5589-keys - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:28:43 +0000 (22:28 -0700)]
Input: elan_i2c - switch to using cleanup functions
Start using __free() and guard() primitives to simplify the code
and error handling. This 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 and all allocated
memory is freed.
Dmitry Torokhov [Sun, 25 Aug 2024 05:26:03 +0000 (22:26 -0700)]
Input: psmouse-smbus - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Joel Selvaraj [Sat, 1 Jun 2024 20:44:45 +0000 (15:44 -0500)]
Input: novatek-nvt-ts - add support for NT36672A touchscreen
Extend the novatek touchscreen driver to support NT36672A chip which
is found in phones like qcom/sdm845-xiaomi-beryllium-tianma.dts.
Added devicetree support for the driver and used i2c chip data to handle
the variation in chip id and wake type. Also added vcc and iovcc
regulators which are used to power the touchscreen hardware.
Document the Novatek NVT touchscreen controller present in devices like
qcom/sdm845-xiaomi-beryllium-tianma.dts. Also, include the devictree
binding file in the MAINTAINERS file.
To ensure code clarity and prevent potential errors, it's advisable
to employ the ';' as a statement separator, except when ',' are
intentionally used for specific purposes.
Input: tegra-kbc - use of_property_read_variable_u32_array() and of_property_present()
There's no need to get the length of an DT array property before
parsing the array. of_property_read_variable_u32_array() takes a
minimum and maximum length and returns the actual length (or error
code).
This is part of a larger effort to remove callers of of_get_property()
and similar functions. of_get_property() leaks the DT property data
pointer which is a problem for dynamically allocated nodes which may
be freed.
Input: ps2-gpio - use IRQF_NO_AUTOEN flag in request_irq()
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:42 +0000 (22:50 -0700)]
Input: zforce_ts - switch to using asynchronous probing
The driver waits for the device to boot, which can be a lengthy
process. Switch it to asynchronous probing to allow more devices
to be probed simultaneously.
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:38 +0000 (22:50 -0700)]
Input: zforce_ts - stop treating VDD regulator as optional
This regulator is not optional from the controller point of view,
so stop treating it as such. For hard-wired designs that omit the
regulator from their device trees regulator subsystem will create
a dummy instance.
This may introduce unnecessary delay of 100us in case of dummy
regulator, but if it is important the driver should be marked as
using asynchronous probing to avoid even longer delays waiting for
the command completions.
Also use usleep_range() instead of udelay() to avoid spinning.
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:35 +0000 (22:50 -0700)]
Input: zforce_ts - do not ignore errors when acquiring regulator
We should abort probe on any error besides -ENOENT which signifies that
the regulator is not defined in device tree or elsewhere, not only
when we see -EPROBE_DEFER.
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:34 +0000 (22:50 -0700)]
Input: zforce_ts - make parsing of contacts less confusing
Zforce touch data packet consists of a byte representing number of
contacts followed by several chunks with length of 9 bytes representing
each contact. Instead of accounting for the leading byte by increasing
offset of each field in contacts by one introduce a pointer to contact
data and point it appropriately. This avoids awkward constructs like:
point.prblty = payload[9 * i + 9];
which makes it seem like there is off-by-one error, in favor of more
straightforward:
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:31 +0000 (22:50 -0700)]
Input: zforce_ts - ensure that pm_stay_awake() and pm_relax() are balanced
There is a small chance that ts->suspending flag may change while the
interrupt handler is running. To make sure call to pm_relax() is not
skipped on accident use a temporary to hold the original value at the
beginning of interrupt. Use READ_ONCE() so that the value is actually
fetched at the right time.
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:30 +0000 (22:50 -0700)]
Input: zforce_ts - remove unneeded locking
There is no need to have a lock around calls to i2c_master_send() and
i2c_master_recv() as they are not issued concurrently and they are not
sharing any buffers. Also there is no need for command_mutex as all
commands are issued sequentially.
Dmitry Torokhov [Sat, 24 Aug 2024 05:50:27 +0000 (22:50 -0700)]
Input: zforce_ts - remove support for platfrom data
There are no in-tree users of platform data and any new ones should
either use device tree or static device properties, so let's remove
platform data support.
Sudip Mukherjee [Sat, 24 Aug 2024 05:50:25 +0000 (22:50 -0700)]
Input: zforce_ts - use devm_add_action_or_reset()
If devm_add_action() fails we are explicitly calling the cleanup to free
the resources allocated. Lets use the helper devm_add_action_or_reset()
and return directly in case of error, as we know that the cleanup
function has been already called by the helper if there was any error.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:21 +0000 (22:16 -0700)]
Input: tegra-kbc - use guard notation when acquiring mutex and spinlock
This 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.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:09 +0000 (22:16 -0700)]
Input: gpio-keys - switch to using cleanup functions
Start using __free() and guard() primitives to simplify the code
and error handling. This 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 and all allocated
memory is freed.
Dmitry Torokhov [Sun, 25 Aug 2024 05:16:07 +0000 (22:16 -0700)]
Input: atkbd - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Dmitry Torokhov [Sun, 25 Aug 2024 05:30:57 +0000 (22:30 -0700)]
Input: alps - use guard notation when acquiring mutex
This makes the code more compact and error handling more robust
by ensuring that mutexes are released in all code paths when control
leaves critical section.
Frank Li [Sun, 11 Aug 2024 21:46:55 +0000 (17:46 -0400)]
dt-bindings: input: convert rotary-encoder to yaml
Convert binding doc rotary-encoder.txt to yaml format.
Additional change:
- Only keep one example.
Fix below warning:
arch/arm64/boot/dts/freescale/imx8mn-dimonoff-gateway-evk.dtb: /rotary-encoder:
failed to match any schema with compatible: ['rotary-encoder']
Dmitry Torokhov [Mon, 5 Aug 2024 01:47:05 +0000 (18:47 -0700)]
Input: matrix_keypad - switch to gpiod API and generic device properties
gpiod API and generic device properties work with software nodes and
static properties, which will allow removing platform data support
from the driver, simplifying and streamlining the code.
Dmitry Torokhov [Mon, 5 Aug 2024 01:47:04 +0000 (18:47 -0700)]
Input: matrix_keypad - remove support for clustered interrupt
There are no users of this functionality in the mainline kernel (it was
only available to boards using platform data and not device tree).
Remove it to simplify the code.
Input: synaptics-rmi4 - fix crash when DPM query is not supported
Stop clobbering "item" variable when checking if the device supports
querying DPM values because its original value is still needed in
case when we need to fall back to the old way of figuring sensor size.
Reported-by: Richard Acayan <mailingradian@gmail.com> Tested-by: Richard Acayan <mailingradian@gmail.com> Fixes: 14d650fcb7fb ("Input: synaptics-rmi4 - add support for querying DPM value (F12)") Link: https://lore.kernel.org/r/ZtdQW7nqAOEJDNBN@radian Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
MAINTAINERS: remove unneeded file entry in INPUT section
Commit b9401c658d2c ("MAINTAINERS: add gameport.h, serio.h and uinput.h to
INPUT section") adds further header files in ./include/linux/ and
./include/uapi/linux to the INPUT section, but the file
./include/linux/uinput.h does not exist since commit a11bc476b987 ("Input:
uinput - fold header into the driver proper") removed this header file
in 2017.
Fortunately, ./scripts/get_maintainer.pl --self-test=patterns complains
about a broken reference. Remove the file entry referring to the
non-existing header file in the INPUT section.
Merge tag 'v6.11-rc5-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6
Pull smb client fixes from Steve French:
- copy_file_range fix
- two read fixes including read past end of file rc fix and read retry
crediting fix
- falloc zero range fix
* tag 'v6.11-rc5-smb-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target region
cifs: Fix copy offload to flush destination region
netfs, cifs: Fix handling of short DIO read
cifs: Fix lack of credit renegotiation on read retry
Merge tag 'bcachefs-2024-08-21' of https://github.com/koverstreet/bcachefs
Push bcachefs fixes from Kent Overstreet:
"The data corruption in the buffered write path is troubling; inode
lock should not have been able to cause that...
- Fix a rare data corruption in the rebalance path, caught as a nonce
inconsistency on encrypted filesystems
- Revert lockless buffered write path
- Mark more errors as autofix"
* tag 'bcachefs-2024-08-21' of https://github.com/koverstreet/bcachefs:
bcachefs: Mark more errors as autofix
bcachefs: Revert lockless buffered IO path
bcachefs: Fix bch2_extents_match() false positive
bcachefs: Fix failure to return error in data_update_index_update()
Linus Walleij [Fri, 30 Aug 2024 22:52:29 +0000 (15:52 -0700)]
Input: zinitix - varying icon status registers
The different revisions of the Zinitix BTXXX touchscreens place
the icon status register (to read out touchkey status) in
different places. Use the chip revision bits to discern
between the different versions at runtime.
This makes touchkeys work on the BT404 on the Samsung Codina
GT-I8160 mobile phone.