- 22 Jun, 2024 1 commit
-
-
Andreas Kemnade authored
Convert EKTF2127 infrared touchscreen controller binding to DT schema and add ektf2232 compatible. Signed-off-by: Andreas Kemnade <andreas@kemnade.info> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240621224022.1620897-2-andreas@kemnade.infoSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 21 Jun, 2024 1 commit
-
-
Dmitry Torokhov authored
There is no need to allocate axes information separately from the main joystick structure so let's fold the allocation and also drop members (such as range, flat and fuzz) that are only used during initialization of the device. Acked-by: Artur Rojek <contact@artur-rojek.eu> Link: https://lore.kernel.org/r/ZmkrgTlxNwm_oHxv@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 20 Jun, 2024 4 commits
-
-
Dmitry Torokhov authored
Start using __free() and guard() primitives to simplify the code and error handling. Link: https://lore.kernel.org/r/20240610041813.722445-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Instead of manually creating driver-specific device attributes set struct usb_driver->dev_groups pointer to have the driver core do it. Link: https://lore.kernel.org/r/20240610041813.722445-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Javier Carrasco authored
This case of the common error message upon failure of input_allocate_device() repeats the word "input". Drop one "input" from the error message. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Reviewed-by: Kees Cook <kees@kernel.org> Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-2-3ee0ead2e57d@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Javier Carrasco authored
Use the __counted_by compiler attribute for the data[] flexible array member to improve the results of array bound sanitizers. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Reviewed-by: Kees Cook <kees@kernel.org> Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org> Link: https://lore.kernel.org/r/20240619-ims-pcu-counted_by-v1-1-3ee0ead2e57d@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 11 Jun, 2024 4 commits
-
-
Dmitry Torokhov authored
Switch to using guard(mutex)() notation to acquire and automatically release mutexes. Reviewed-by: Nuno Sa <nuno.sa@analog.com> Link: https://lore.kernel.org/r/20240610164301.1048482-4-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Switch the driver to use managed resources to simplify error handling. Link: https://lore.kernel.org/r/20240610164301.1048482-3-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Switch to using input_set_capability() instead of using __set_bit() to make clear what exactly kinds of events (EV_KEY, EV_REL) are being declared. Also drop redundant calls setting EV_ABS and ABS_X|Y|Z bits as that is taken care by input_set_abs_params(). Link: https://lore.kernel.org/r/20240610164301.1048482-2-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
Instead of creating driver-specific device attributes with sysfs_create_group() have device core do this by setting up dev_groups pointer in the driver structure. Reviewed-by: Nuno Sa <nuno.sa@analog.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Link: https://lore.kernel.org/r/20240610164301.1048482-1-dmitry.torokhov@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 09 Jun, 2024 3 commits
-
-
Jeff Johnson authored
On x86, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/touchscreen/cyttsp_i2c_common.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/misc/soc_button_array.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/matrix-keymap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/vivaldi-fmap.o WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/input/tests/input_test.o Add the missing invocation of the MODULE_DESCRIPTION() macro to all files which have a MODULE_LICENSE(). This includes drivers/input/misc/sgi_btns.c which, although it did not produce a warning with the x86 allmodconfig configuration, may cause this warning with other configurations when either CONFIG_SGI_IP22 or CONFIG_SGI_IP32 is enabled. Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com> Link: https://lore.kernel.org/r/20240609-md-drivers-input-v1-1-a2f394e0f9d8@quicinc.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). At the same time refactor the code to not use assignment in "if" conditions. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237FEA55FAC8A9453F2DA6F8BC42@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). The refactoring is mostly trivial except for "usbtouchscreen.c" file. Here, in the "mtouch_alloc" and "nexio_alloc" functions, it is necessary to use a variable with a predefined type instead of the "usbtouch->priv" variable (void * type). This way, the "sizeof" operator can now know the correct size. Moreover, we need to set the "usbtouch->priv" pointer after the memory allocation since now the "kmalloc" return value is not assigned directly. This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB723708364CC0DF2EAAFEE5968BC42@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 07 Jun, 2024 4 commits
-
-
Dmitry Torokhov authored
struct cap11xx_hw_model is supposed to describe the chip capabilities, however later code changes introduced checks against chip ID. Introduce new capabilities in cap11xx_hw_model and use them when applying chip configuration, and remove the enum for chip ID. While at it, rename no_gain to has_gain to match the rest of the new capabilities. Reviewed-by: Jiri Valek - 2N <jiriv@axis.com> Link: https://lore.kernel.org/r/ZXlCRsnOu_L8xeTC@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Chris Morgan authored
When one or more axes are inverted, (where min > max), normalize the data so that min < max and invert the values reported to the input stack. This ensures we can continue defining the device correctly in the device tree while not breaking downstream assumptions that min is always less than max. Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Acked-by: Artur Rojek <contact@artur-rojek.eu> Link: https://lore.kernel.org/r/20240115192752.266367-1-macroalpha82@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/PAXPR02MB72483F512F863C74A4AECA2B8BFB2@PAXPR02MB7248.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237D3D898CCC9C50C18DE078BFB2@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 06 Jun, 2024 3 commits
-
-
Dmitry Torokhov authored
This brings in support for guard(disable_irq)(...);
-
Dmitry Torokhov authored
Drivers often need to first disable an interrupt, carry out some action, and then reenable the interrupt. Introduce support for the "guard" notation for this so that the following is possible: ... scoped_cond_guard(mutex_intr, return -EINTR, &data->sysfs_mutex) { guard(disable_irq)(&client->irq); error = elan_acquire_baseline(data); if (error) return error; } ... Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/ZljAV6HjkPSEhWSw@google.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Jason Gerecke authored
Fixes: 6c7cc1a2 ("Input: wacom_w8001 - simplify device name generation") Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Link: https://lore.kernel.org/r/20240605164656.61623-1-jason.gerecke@wacom.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 03 Jun, 2024 4 commits
-
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237B05083487507CFAF96B08BFE2@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237FB736DBF67A58798FDF38BFE2@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237884EB989EFF55D1BEF8B8BFE2@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Erick Archer authored
It is preferred to use sizeof(*pointer) instead of sizeof(type) due to the type of the variable can change and one needs not change the former (unlike the latter). This patch has no effect on runtime behavior. Signed-off-by: Erick Archer <erick.archer@outlook.com> Link: https://lore.kernel.org/r/AS8PR02MB7237277464F23CA168BFB3B18BF52@AS8PR02MB7237.eurprd02.prod.outlook.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 30 May, 2024 1 commit
-
-
Jason Gerecke authored
Replace pairs of strscpy/strlcat calls with snprintf. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Link: https://lore.kernel.org/r/CANRwn3SuTjdCCK4YH1ObvsC_gZuythAQ7kSHJP-CiAFw9h5Qcw@mail.gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 28 May, 2024 1 commit
-
-
Dmitry Torokhov authored
Sync up with the mainline to bring in the new cleanup API.
-
- 22 May, 2024 2 commits
-
-
Joel Selvaraj authored
The driver is compatible with FocalTech FT5452 and FT8719 touchscreens too. FT5452 supports up to 5 touch points. FT8719 supports up to 10 touch points. Add compatible data for both of them. Signed-off-by: Joel Selvaraj <joelselvaraj.oss@gmail.com> Link: https://lore.kernel.org/r/20240521-add-support-ft5452-and-ft8719-touchscreen-v1-2-2a648ac7176b@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Joel Selvaraj authored
Document FocalTech FT5452 and FT8719 support by adding their compatibles. Signed-off-by: Joel Selvaraj <joelselvaraj.oss@gmail.com> Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240521-add-support-ft5452-and-ft8719-touchscreen-v1-1-2a648ac7176b@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 20 May, 2024 2 commits
-
-
Kirill Artemev authored
Add VID and PID to the xpad_device and VID to the xpad_table to allow driver to use Machenike G5 Pro Controller, which is XTYPE_XBOX360 compatible in Xinput mode. Signed-off-by: Kirill Artemev <artewar6767@gmail.com> Link: https://lore.kernel.org/r/20240516032926.12501-2-artewar6767@gmail.comSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Dmitry Torokhov authored
If an input device declares too many capability bits then modalias string for such device may become too long and not fit into uevent buffer, resulting in failure of sending said uevent. This, in turn, may prevent userspace from recognizing existence of such devices. This is typically not a concern for real hardware devices as they have limited number of keys, but happen with synthetic devices such as ones created by xen-kbdfront driver, which creates devices as being capable of delivering all possible keys, since it doesn't know what keys the backend may produce. To deal with such devices input core will attempt to trim key data, in the hope that the rest of modalias string will fit in the given buffer. When trimming key data it will indicate that it is not complete by placing "+," sign, resulting in conversions like this: old: k71,72,73,74,78,7A,7B,7C,7D,8E,9E,A4,AD,E0,E1,E4,F8,174, new: k71,72,73,74,78,7A,7B,7C,+, This should allow existing udev rules continue to work with existing devices, and will also allow writing more complex rules that would recognize trimmed modalias and check input device characteristics by other means (for example by parsing KEY= data in uevent or parsing input device sysfs attributes). Note that the driver core may try adding more uevent environment variables once input core is done adding its own, so when forming modalias we can not use the entire available buffer, so we reduce it by somewhat an arbitrary amount (96 bytes). Reported-by: Jason Andryuk <jandryuk@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jason Andryuk <jandryuk@gmail.com> Link: https://lore.kernel.org/r/ZjAWMQCJdrxZkvkB@google.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 13 May, 2024 3 commits
-
-
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. While add it, also remove commas after the sentinel entries. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20240509174158.2211071-2-u.kleine-koenig@pengutronix.deSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Christophe JAILLET authored
In "struct zet6223_ts", the 'vcc' and 'vio' fields are unused. So, remove them. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/3065d885341e2730dd3e7905d75514796a8c25e4.1715507858.git.christophe.jaillet@wanadoo.frSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
Christophe JAILLET authored
In "struct icn8505_data", the 'wake_gpio' field is unused. There is also nothing about gpio neither in this driver nor in the data-sheet. So, remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/37443a675ca07c91c5f0118ce255406e6e3c08f5.1715502304.git.christophe.jaillet@wanadoo.frSigned-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-
- 12 May, 2024 5 commits
-
-
Linus Torvalds authored
-
Linus Torvalds authored
Merge tag 'kselftest-fix-vfork-2024-05-12' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux Pull Kselftest fixes from Mickaël Salaün: "Fix Kselftest's vfork() side effects. As reported by Kernel Test Robot and Sean Christopherson, some tests fail since v6.9-rc1 . This is due to the use of vfork() which introduced some side effects. Similarly, while making it more generic, a previous commit made some Landlock file system tests flaky, and subject to the host's file system mount configuration. This fixes all these side effects by replacing vfork() with clone3() and CLONE_VFORK, which is cleaner (no arbitrary shared memory) and makes the Kselftest framework more robust" Link: https://lore.kernel.org/oe-lkp/202403291015.1fcfa957-oliver.sang@intel.com Link: https://lore.kernel.org/r/ZjPelW6-AbtYvslu@google.com Link: https://lore.kernel.org/r/20240511171445.904356-1-mic@digikod.net * tag 'kselftest-fix-vfork-2024-05-12' of git://git.kernel.org/pub/scm/linux/kernel/git/mic/linux: selftests/harness: Handle TEST_F()'s explicit exit codes selftests/harness: Fix vfork() side effects selftests/harness: Share _metadata between forked processes selftests/pidfd: Fix wrong expectation selftests/harness: Constify fixture variants selftests/landlock: Do not allocate memory in fixture data selftests/harness: Fix interleaved scheduling leading to race conditions selftests/harness: Fix fixture teardown selftests/landlock: Fix FS tests when run on a private mount point selftests/pidfd: Fix config for pidfd_setns_test
-
git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds authored
Pull kvm fix from Paolo Bonzini: - Fix NULL pointer read on s390 in ioctl(KVM_CHECK_EXTENSION) for /dev/kvm * tag 'for-linus-6.9' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: s390: Check kvm pointer when testing KVM_CAP_S390_HPAGE_1M
-
git://git.kernel.org/pub/scm/linux/kernel/git/ras/rasLinus Torvalds authored
Pull EDAC fix from Borislav Petkov: - Fix a race condition when clearing error count bits and toggling the error interrupt throug the same register, in synopsys_edac * tag 'edac_urgent_for_v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/synopsys: Fix ECC status and IRQ control race condition
-
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tipLinus Torvalds authored
Pull x86 fixes from Borislav Petkov: - Add a new PCI ID which belongs to a new AMD CPU family 0x1a - Ensure that that last level cache ID is set in all cases, in the AMD CPU topology parsing code, in order to prevent invalid scheduling domain CPU masks * tag 'x86_urgent_for_v6.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/topology/amd: Ensure that LLC ID is initialized x86/amd_nb: Add new PCI IDs for AMD family 0x1a
-
- 11 May, 2024 2 commits
-
-
Mickaël Salaün authored
If TEST_F() explicitly calls exit(code) with code different than 0, then _metadata->exit_code is set to this code (e.g. KVM_ONE_VCPU_TEST()). We need to keep in mind that _metadata->exit_code can be KSFT_SKIP while the process exit code is 0. Cc: Jakub Kicinski <kuba@kernel.org> Cc: Kees Cook <keescook@chromium.org> Cc: Mark Brown <broonie@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Drewry <wad@chromium.org> Reported-by: Sean Christopherson <seanjc@google.com> Tested-by: Sean Christopherson <seanjc@google.com> Closes: https://lore.kernel.org/r/ZjPelW6-AbtYvslu@google.com Fixes: 0710a1a7 ("selftests/harness: Merge TEST_F_FORK() into TEST_F()") Link: https://lore.kernel.org/r/20240511171445.904356-11-mic@digikod.netSigned-off-by: Mickaël Salaün <mic@digikod.net>
-
Mickaël Salaün authored
Setting the time namespace with CLONE_NEWTIME returns -EUSERS if the calling thread shares memory with another thread (because of the shared vDSO), which is the case when it is created with vfork(). Fix pidfd_setns_test by replacing test harness's vfork() call with a clone3() call with CLONE_VFORK, and an explicit sharing of the _metadata and self objects. Replace _metadata->teardown_parent with a new FIXTURE_TEARDOWN_PARENT() helper that can replace FIXTURE_TEARDOWN(). This is a cleaner approach and it enables to selectively share the fixture data between the child process running tests and the parent process running the fixture teardown. This also avoids updating several tests to not rely on the self object's copy-on-write property (e.g. storing the returned value of a fork() call). Cc: Christian Brauner <brauner@kernel.org> Cc: David S. Miller <davem@davemloft.net> Cc: Günther Noack <gnoack@google.com> Cc: Jakub Kicinski <kuba@kernel.org> Cc: Mark Brown <broonie@kernel.org> Cc: Shuah Khan <shuah@kernel.org> Cc: Will Drewry <wad@chromium.org> Reported-by: kernel test robot <oliver.sang@intel.com> Closes: https://lore.kernel.org/oe-lkp/202403291015.1fcfa957-oliver.sang@intel.com Fixes: 0710a1a7 ("selftests/harness: Merge TEST_F_FORK() into TEST_F()") Reviewed-by: Kees Cook <keescook@chromium.org> Link: https://lore.kernel.org/r/20240511171445.904356-10-mic@digikod.netSigned-off-by: Mickaël Salaün <mic@digikod.net>
-