- 18 Oct, 2024 1 commit
-
-
John Edwards authored
Add MSI Claw A1M controller to xpad_device match table when in xinput mode. Add MSI VID as XPAD_XBOX360_VENDOR. Signed-off-by: John Edwards <uejji@uejji.net> Reviewed-by: Derek J. Clark <derekjohn.clark@gmail.com> Reviewed-by: Christopher Snowhill <kode54@gmail.com> Link: https://lore.kernel.org/r/20241010232020.3292284-4-uejji@uejji.net Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 16 Oct, 2024 1 commit
-
-
Stefan Kerkmann authored
This XBOX360 compatible gamepad uses the new product id 0x310a under the 8BitDo's vendor id 0x2dc8. The change was tested using the gamepad in a wired and wireless dongle configuration. Signed-off-by: Stefan Kerkmann <s.kerkmann@pengutronix.de> Link: https://lore.kernel.org/r/20241015-8bitdo_2c_ultimate_wireless-v1-1-9c9f9db2e995@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 01 Oct, 2024 3 commits
-
-
Nuno Sa authored
The adp5589 seems to have the same behavior as similar devices as explained in commit 910a9f56 ("Input: adp5588-keys - get value from data out when dir is out"). Basically, when the gpio is set as output we need to get the value from ADP5589_GPO_DATA_OUT_A register instead of ADP5589_GPI_STATUS_A. Fixes: 9d2e1736 ("Input: ADP5589 - new driver for I2C Keypad Decoder and I/O Expander") Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20241001-b4-dev-adp5589-fw-conversion-v1-2-fca0149dfc47@analog.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Nuno Sa authored
We register a devm action to call adp5589_clear_config() and then pass the i2c client as argument so that we can call i2c_get_clientdata() in order to get our device object. However, i2c_set_clientdata() is only being set at the end of the probe function which means that we'll get a NULL pointer dereference in case the probe function fails early. Fixes: 30df385e ("Input: adp5589-keys - use devm_add_action_or_reset() for register clear") Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20241001-b4-dev-adp5589-fw-conversion-v1-1-fca0149dfc47@analog.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
This reverts commit 740ff03d because current PixArt detection is too greedy and claims devices that are not PixArt. Reported-by: Benjamin Tissoires <bentiss@kernel.org> Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2314756Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 23 Sep, 2024 1 commit
-
-
Dmitry Torokhov authored
The correct macro name for creating a u32 array property entry is PROPERTY_ENTRY_U32_ARRAY(). Reported-by: kernel test robot <lkp@intel.com> Fixes: 1b05a701 ("ARM: spitz: Use software nodes/properties for the matrix keypad") Closes: https://lore.kernel.org/oe-kbuild-all/202409230614.BBJikfMj-lkp@intel.com/Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 22 Sep, 2024 1 commit
-
-
Uwe Kleine-König authored
These drivers don't use the driver_data member of struct i2c_device_id, so don't explicitly initialize this member. This prepares putting driver_data in an anonymous union which requires either no initialization or named designators. But it's also a nice cleanup on its own. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://lore.kernel.org/r/20240920153430.503212-12-u.kleine-koenig@baylibre.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 20 Sep, 2024 2 commits
-
-
Dmitry Torokhov authored
Prepare input updates for 6.12 merge window.
-
Nuno Sa authored
During adp5588_setup(), we read all the events to clear the event FIFO. However, adp5588_read() just calls i2c_smbus_read_byte_data() which returns the byte read in case everything goes well. Hence, we need to explicitly check for a negative error code instead of checking for something different than 0. Fixes: e960309c ("Input: adp5588-keys - bail out on returned error") Cc: stable@vger.kernel.org Signed-off-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240920-fix-adp5588-err-check-v1-1-81f6e957ef24@analog.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 18 Sep, 2024 1 commit
-
-
Shen Lichuan authored
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. Signed-off-by: Shen Lichuan <shenlichuan@vivo.com> Link: https://lore.kernel.org/r/20240918032246.9147-1-shenlichuan@vivo.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 14 Sep, 2024 3 commits
-
-
Werner Sembach authored
The Gen6 devices have the same problem and the same Solution as the Gen5 ones. Some TongFang barebones have touchpad and/or keyboard issues after suspend, fixable with nomux + reset + noloop + nopnp. Luckily, none of them have an external PS/2 port so this can safely be set for all of them. I'm not entirely sure if every device listed really needs all four quirks, but after testing and production use, no negative effects could be observed when setting all four. Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240910094008.1601230-3-wse@tuxedocomputers.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Werner Sembach authored
There might be devices out in the wild where the board name is GMxXGxx instead of GMxXGxX. Adding both to be on the safe side. Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240910094008.1601230-2-wse@tuxedocomputers.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Rob Herring (Arm) authored
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. Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240913200827.546649-1-robh@kernel.orgSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 13 Sep, 2024 1 commit
-
-
Jinjie Ruan authored
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. Fixes: 9ee0a055 ("Input: PS/2 gpio bit banging driver for serio bus") Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com> Acked-by: Danilo Krummrich <dakr@kernel.org> Link: https://lore.kernel.org/r/20240912033013.2610949-1-ruanjinjie@huawei.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 10 Sep, 2024 1 commit
-
-
David Lechner authored
Fix calling scoped_cond_guard() with mutex instead of mutex_intr. scoped_cond_guard(mutex, ...) will call mutex_lock() instead of mutex_lock_interruptible(). Fixes: 703f1267 ("Input: ims-pcu - switch to using cleanup functions") Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://lore.kernel.org/r/20240910-input-misc-ims-pcu-fix-mutex-intr-v1-1-bdd983685c43@baylibre.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 06 Sep, 2024 25 commits
-
-
Dmitry Torokhov authored
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. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-19-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
The wrappers are extremely simple, used once, and do not bring much value. Remove them. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-18-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Stop forcing interrupt to be low level triggered and instead rely on the platform to define proper trigger to allow flexibility in board designs. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-17-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
The driver does not actively manage regulator state past probe() time, so we can use devm_regulator_get_enable() to simplify the code. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-16-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-15-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
The I2C ID table is not supposed to change; mark it as const. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-14-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Use dev_err_probe() helper to log deferrals in the devices_deferred debugfs file and avoid extra messages in the logs. Also rename "ret" variables holding error codes only to "error". Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-13-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-12-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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: point.prblty = p[8]; Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-11-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Instead of doing conversion from little-endian data to CPU endianness by hand use existing helpers. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-10-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Guard notation allows for simpler code and ensures that mutexes are automatically released in all code paths. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-9-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-8-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Remove both. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-7-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
input_mt_init_slots() can potentially return error which needs to be handled. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-6-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Input core and various helpers already do that for us, so drop the code setting these bits explicitly. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-5-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-4-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
input_mt_report_slot_state() returns true if slot is active, so we can combine checks for point.state != STATE_UP. Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-3-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Sudip Mukherjee authored
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. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Tested-by: Andreas Kemnade <andreas@kemnade.info> # Tolino Shine2HD Link: https://lore.kernel.org/r/20240824055047.1706392-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Acked-by: Thierry Reding <treding@nvidia.com> Link: https://lore.kernel.org/r/20240825051627.2848495-18-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Use __free(fwnode_handle) cleanup facility to ensure that references to acquired fwnodes are dropped at appropriate times automatically. Reviewed-by: Jeff LaBundy <jeff@labundy.com> Link: https://lore.kernel.org/r/20240825051627.2848495-9-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240825051627.2848495-6-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20240825051627.2848495-4-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
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. Acked-by: Pali Rohár <pali@kernel.org> Link: https://lore.kernel.org/r/ZsrBkWIpyEqzClUG@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Werner Sembach authored
Some TongFang barebones have touchpad and/or keyboard issues after suspend, fixable with nomux + reset + noloop + nopnp. Luckily, none of them have an external PS/2 port so this can safely be set for all of them. I'm not entirely sure if every device listed really needs all four quirks, but after testing and production use, no negative effects could be observed when setting all four. Signed-off-by: Werner Sembach <wse@tuxedocomputers.com> Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20240905164851.771578-1-wse@tuxedocomputers.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Frank Li authored
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'] Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Link: https://lore.kernel.org/r/20240811214656.3773098-1-Frank.Li@nxp.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-