Commit Graph

3572 Commits

Author SHA1 Message Date
hujun5 dc8f419d40 fix compile error
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 01:32:29 +08:00
v-tangmeng 71d25d56de fix the compilation error
usbdev/rndis.c: In function 'rndis_allocnetreq':
usbdev/rndis.c:761:10: error: implicit declaration of function 'nxmutex_lock'; did you mean 'net_mutex_lock'? [-Werror=implicit-function-declaration]
  761 |   while (nxmutex_lock(&priv->lock) < 0);
      |          ^~~~~~~~~~~~
      |          net_mutex_lock
usbdev/rndis.c:767:7: error: implicit declaration of function 'nxmutex_unlock' [-Werror=implicit-function-declaration]
  767 |       nxmutex_unlock(&priv->lock);
      |       ^~~~~~~~~~~~~~
usbdev/rndis.c: In function 'usbclass_classobject':
usbdev/rndis.c:2890:3: error: implicit declaration of function 'nxmutex_init'; did you mean 'nxsem_init'? [-Werror=implicit-function-declaration]
2890 |   nxmutex_init(&priv->lock);
     |   ^~~~~~~~~~~~
     |   nxsem_init
usbdev/rndis.c: In function 'usbclass_uninitialize':
usbdev/rndis.c:2939:3: error: implicit declaration of function 'nxmutex_destroy'; did you mean 'nxsem_destroy'? [-Werror=implicit-function-declaration]
2939 |   nxmutex_destroy(&drvr->dev->lock);
     |   ^~~~~~~~~~~~~~~
     |   nxsem_destroy
cc1: all warnings being treated as errors

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-21 01:31:48 +08:00
liuhongchao ac69b43be3 drivers/input: add mouse to touch function
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:29:19 +08:00
jiangtao16 66efc141ce sched/wdog: wdgettime should return clock_t.
wdgettime should return clock_t instead of sclock_t more reasonable.
Signed-off-by: jiangtao16 <jiangtao16@xiaomi.com>
2026-04-21 01:29:10 +08:00
fangpeina 3917a72f16 input/ff: add control operation to force feedback driver interface
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:28:53 +08:00
liuhongchao 9127662a91 drivers/input: clear all touch flags in batch on SYN_REPORT.
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:27:54 +08:00
rongyichang 5f717ad61f input/goldfish_events: fix crash of input event handle
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:26:47 +08:00
v-tangmeng 53512876c9 drivers: fix compile error.
error: implicit declaration of function 'enter_critical_section'
[-Werror=implicit-function-declaration]

error: implicit declaration of function 'leave_critical_section'
[-Werror=implicit-function-declaration]

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-21 01:26:11 +08:00
liuhongchao 1ff34258a4 dirvers/input: fix using spinlock during context switch causes crash
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:26:00 +08:00
liuhongchao 0b4c1dfe3d drivers/input: fix deref_after_free
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:25:18 +08:00
fangpeina b9929907af drivers/ff: resolve deadlock in ff_upper.c
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:25:09 +08:00
liuhongchao 61a15f3525 dirvers/input: use spin lock to replace critical section
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:25:08 +08:00
fangpeina ee08731bef drivers/input/ff: use small lock to replace enter_critical_section
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:24:57 +08:00
ouyangxiangzhen 76ca53eac0 spinlock: Better recursive spinlock implementation.
This commit provided a better recursive spinlock implementation with
less memory-overhead and better performance.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-21 01:24:09 +08:00
buxiasen 091be531f2 rspinlock: rename x_noprempt to x_nopreempt
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-21 01:23:44 +08:00
liuhongchao 3ec63fd925 drivers/input: fix unable to get whether multi-touch is set
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:22:29 +08:00
ouyangxiangzhen 207197b5eb include/addrenv: Clean the inclusion
This commit removed the stdint.h, wqueue.h and atomic.h from the
addrenv.h.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-21 01:21:58 +08:00
liuhongchao 3a23ee0544 dirvers/input: fix the deadlock problem of recursive lock
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:21:54 +08:00
liuhongchao 889591b9ed dirvers/input: use spin lock to replace critical section
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:21:48 +08:00
fangpeina 0e4c599944 input/ff: extend ioctrl to support get effect duration
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:21:09 +08:00
rongyichang 5a4d3ae2aa drivers/input: add mouse GRAB ioctl
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:18:48 +08:00
rongyichang f7bf0eb6d3 drivers/uinput: support utouch resolution ioctls
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:18:47 +08:00
rongyichang bc100903e5 drivers/mouse: add write function for lower driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:18:47 +08:00
rongyichang 500284ec85 drivers/uinput: add umouse driver
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:18:47 +08:00
zhangyuan29 b514aa773f arch_atomic: only support atomic_xx and atomic64_xx function
Modify the kernel to use only atomic_xx and atomic64_xx interfaces,
avoiding the use of sizeof or typeof to determine the type of
atomic operations, thereby simplifying the kernel's atomic
interface operations.

Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-21 01:18:41 +08:00
zhangshoukui 1b30616ecf rename lib_pathbuffer to lib_tempbuffer
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2026-04-21 01:18:29 +08:00
rongyichang e554bdc035 drivers/input: use spinlock to replace mutex
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2026-04-21 01:17:33 +08:00
liuhongchao b3bac78e78 drivers/input: add TSIOC_GETMAXPOINTS for touch ioctl
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:16:26 +08:00
liuhongchao d6e66fd090 drivers/input: Add multi-touch drivers for goldfish events.
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:16:26 +08:00
fangpeina f0dbd571c8 drivers/input: support return effect duration in ff_dummy
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:16:20 +08:00
zhangshoukui d2204a97a5 Revert "rename lib_pathbuffer to lib_tempbuffer"
This reverts commit 17168464451108bfbeaf714f382023cdc5859e02.

Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2026-04-21 01:15:34 +08:00
zhangshoukui 4d4b0db1ef rename lib_pathbuffer to lib_tempbuffer
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2026-04-21 01:14:55 +08:00
liuhongchao e0a2ff4fbe nuxxt: add open and close callback functions for the mouse.
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:14:36 +08:00
liuhongchao 81a84d3570 nuttx: Open mouse/touch/keyboard options can be configured
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:14:36 +08:00
liuhongchao bed6ab699d nuttx: Support for the mouse ioctl interface
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-21 01:14:35 +08:00
Alin Jerpelea 75a2b5a5f7 drivers: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-21 01:13:35 +08:00
YAMAMOTO Takashi 295a69730d move readv/writev to the kernel
currently, nuttx implements readv/writev on the top of read/write.
while it might work for the simplest cases, it's broken by design.
for example, it's impossible to make it work correctly for files
which need to preserve data boundaries without allocating a single
contiguous buffer. (udp socket, some character devices, etc)

this change is a start of the migration to a better design.
that is, implement read/write on the top of readv/writev.

to avoid a single huge change, following things will NOT be done in
this commit:

* fix actual bugs caused by the original readv-based-on-read design.
  (cf. https://github.com/apache/nuttx/pull/12674)

* adapt filesystems/drivers to actually benefit from the new interface.
  (except a few trivial examples)

* eventually retire the old interface.

* retire read/write syscalls. implement them in libc instead.

* pread/pwrite/preadv/pwritev (except the introduction of struct uio,
  which is a preparation to back these variations with the new
  interface.)
2026-04-21 01:13:26 +08:00
fangpeina b921e888aa drivers/input: fix file open err and compliation warn in aw86225
input/aw86225.c: In function 'aw86225_ram_work_routine':
input/aw86225.c:1976:27: warning: 'rtp_file.data' may be used uninitialized [-Wmaybe-uninitialized]
 1976 |   struct aw86225_firmware rtp_file;
      |                           ^~~~~~~~
In function 'aw86225_ram_loaded',
    inlined from 'aw86225_ram_work_routine' at input/aw86225.c:1982:3:
input/aw86225.c:1445:17: warning: 'rtp_file.size' may be used uninitialized [-Wmaybe-uninitialized]
 1445 |   for (i = 2; i < cont->size; i++)
      |               ~~^~~~~~~~~~~~
input/aw86225.c: In function 'aw86225_ram_work_routine':
input/aw86225.c:1976:27: note: 'rtp_file.size' was declared here
 1976 |   struct aw86225_firmware rtp_file;

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:12:55 +08:00
fangpeina da2465af6d input/ff: extend ioctrl to support factory calibration
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:12:55 +08:00
fangpeina af6f550e0d drivers/input: fix the issue of unable to replay in RTP mode
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:12:55 +08:00
fangpeina a53e4be7b1 drivers/input: support RTP file simulation in RAMLOOP mode
For resource-constrained devices, simulate RTP
playback effects using preset custom RAMLOOP
combinations instead of using RTP files to play
custom vibration effects.

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-21 01:12:55 +08:00
chenrun1 dfa7df6061 Use lib_get_pathbuffer instead of stack variables
Summary:
  Modified the usage logic, mainly introduced lib_get_pathbuffer and lib_put_pathbuffer

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2026-04-21 01:12:54 +08:00
openvela-robot 77f0bea7f5 Merge branch 'master' into vela
apache/nuttx commit id: eb27ebba8adfe29644a7b890f86e6f16941921dc

Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:12:27 +08:00
openvela-robot 87c6ff19cf mm: Fix some typos
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:12:20 +08:00
openvela-robot b2f5ba0753 syslog: convert \n to \r\n in syslog framework layer
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2026-04-21 01:12:15 +08:00
openvela-robot 24c239f8f5 arm/cmake: fix cmake compile error
1. The -c parameter should not be added during the link phase, otherwise the link will fail.
2. If it is the clang compiler, its toolchain library should use --print-file-name to find it, otherwise an error will occur

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2026-04-21 01:12:09 +08:00
ouyangxiangzhen f06a244c21 userspace: Exclude nuttx/arch.h
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-21 01:12:03 +08:00
openvela-robot 44ed68d400 fs/rpmsgfs: return real err value when open failed
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:12:00 +08:00
openvela-robot 85912ed402 syslog/channel: rename syslog_channel() to syslog_channel_register()
Change syslog API naming more reasonable:

1. rename syslog_channel() to syslog_channel_register()
2. rename syslog_channel_remove() to syslog_channel_unregister()

Signed-off-by: chao an <anchao@lixiang.com>
2026-04-21 01:11:54 +08:00
openvela-robot 0fdd165dfa Fix disable msi when msi capability not exist issue
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-04-21 01:11:48 +08:00