Commit graph

6749 commits

Author SHA1 Message Date
wangjianyu3
8282ed9ab0 drivers/sensors/gnss: Macro UINT8_MAX for maximum value of uint8_t crefs
libs/libc/gnssutils/minmea/minmea.h:17:#include <stdint.h>

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-08 22:50:03 +08:00
hujun5
fabf4a5142 fix compile error
Error: /github/workspace/sources/nuttx/include/nuttx/spinlock_type.h:57:3: error: unknown type name 'atomic_t'
368   57 |   atomic_t owner;
369      |   ^~~~~~~~
370Error: /github/workspace/sources/nuttx/include/nuttx/spinlock_type.h:58:3: error: unknown type name 'atomic_t'
371   58 |   atomic_t next;
372      |   ^~~~~~~~

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-08 09:28:58 +08:00
hujun5
9d5ecc29d0 Revert "SEGGER_RTT_Conf.h: rm spin_lock_irqsave(NULL) in drivers/segger/config/SEGGER_RTT_Conf.h"
This reverts commit 5e7c640976f7fdd77c2230909bf24eafcff26d12.

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-08 09:28:58 +08:00
rongyichang
553406e801 drivers/video: add BRGA8888 support for goldfish gpu fb
Some checks are pending
Build Documentation / build-html (push) Waiting to run
Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2025-01-07 21:47:56 +08:00
Jani Paalijarvi
e1fb0b30c4 drivers/net/ksz9477.c: Check return values in init
Check that writes to configuration registers success.

Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2025-01-07 21:42:00 +08:00
wangjianyu3
350f396aa5 drivers/sensors/gnss: Fix integer overflow error
CID 1309501: (#1 of 1): Overflow constant (INTEGER_OVERFLOW)
overflow_const: Expression upper->crefs, which is equal to 255, where enable ? 1 : -1 is known to be equal to -1, overflows the type that receives it, an unsigned integer 8 bits wide.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-01-07 21:38:17 +08:00
hujun5
57e54b399b sched: remove all spin_lock_irqsave(NULL)
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:11:44 +08:00
hujun5
4e563e3a86 SEGGER_RTT_Conf.h: rm spin_lock_irqsave(NULL) in drivers/segger/config/SEGGER_RTT_Conf.h
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2025-01-06 23:07:58 +08:00
p-szafonimateusz
f0137d51a3 drivers/serial: simplify 16550_PCI_UARTx_CLOCK config
drivers/serial: simplify 16550_PCI_UARTx_CLOCK config

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-01-03 08:52:43 +08:00
Tiago Medicci Serrano
6b1be7c66c virtio-rng: Register /dev/urandom driver if CONFIG_DEV_URANDOM=y
Virtio RNG support (CONFIG_DRIVERS_VIRTIO_RNG=y) selects
CONFIG_ARCH_HAVE_RNG. On the other hand, if CONFIG_DEV_URANDOM=y,
it defaults to CONFIG_DEV_URANDOM_ARCH if CONFIG_ARCH_HAVE_RNG=y.
DEV_URANDOM_ARCH definition states that the implementation of the
/dev/urandom should be provided by the architecture-specifig logic,
including the function devurandom_register(). In this case, the
/dev/urandom may refer to the same driver as /dev/random that is
provided by the Virtio RNG driver, which is implemented by this
commit.
2025-01-03 08:52:20 +08:00
wangzhi16
893c5e92c2 Reduce the size of tcb by four bytes.
Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2025-01-02 23:18:42 +08:00
Bowen Wang
812613fabc drivers/misc/Kconfig: change DEV_ZERO deafult to !DEFAULT_SMALL.
/dev/zero is a very commonly used config, for example use
/dev/zero to test the filesystem, mtd or block devices performance.
So let's default enable it when not enable DEFAULT_SMALL

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-30 22:22:29 +08:00
Bowen Wang
f0a3c43a54 rpmsg/rpmsg_virtio_lite: rename rpmsg_virtio to rpmsg_virtio_lite
Because rpmsg_virtio_lite is a better name to inform user that the
rpmsg virtio (original name) is a lite implementation of rpmsg virtio.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-12-28 22:43:20 -03:00
wangjianyu3
3093b28860 drivers/sensors/gnss: Fix deactivate failure when using both topic and device
Deactivate lower driver fails when both uORB topic and driver device are subscribed and opened.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-27 00:13:47 +08:00
wangmingrong1
500d193096 drivers/e1000: malloc size error
priv->mta is uint32_t

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-26 23:26:18 +08:00
wangjianyu3
c6c89ac262 Thermal/step_wise: Fix that hysteresis takes no effect
Test command

  nsh> cat /proc/thermal/cpu-thermal

Trips

  /* Copy from drivers/thermal/thermal_dummy.c */

  {.name = "cpu_crit",   .temp = 90, .hyst = 5, .type = THERMAL_CRITICAL},
  {.name = "cpu_alert1", .temp = 70, .hyst = 5, .type = THERMAL_HOT},
  {.name = "cpu_alert0", .temp = 60, .hyst = 5, .type = THERMAL_NORMAL},

Without this patch

  # Error occured when temperature jump to 69.

  z:cpu-thermal t:67 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:72 t:1 h:16 l:0 c:fan0 s:1|1
  z:cpu-thermal t:69 t:1 h:16 l:0 c:fan0 s:0|0
  z:cpu-thermal t:74 t:1 h:16 l:0 c:fan0 s:1|1

With this patch

  z:cpu-thermal t:67 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:72 t:1 h:16 l:0 c:fan0 s:1|1
  z:cpu-thermal t:69 t:1 h:16 l:0 c:fan0 s:1|1
  z:cpu-thermal t:74 t:1 h:16 l:0 c:fan0 s:2|2

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
975eddaac5 Thermal/procfs: Do not print invalid target cooling state directly
Diff
  - z:cpu-thermal t:48 t:1 h:16 l:0 c:fan0 s:0|4294967295
  + z:cpu-thermal t:48 t:1 h:16 l:0 c:fan0 s:0|(invalid)

The invalid value 4294967295(THERMAL_NO_TARGET, defined as UINT_MAX(0xffffffff)) may bother users.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
e06ff62063 Thermal/dummy: Add temperature jump to test hysteresis
Log

  z:cpu-thermal t:50 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:47 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:52 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:49 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:54 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:51 t:1 h:16 l:0 c:fan0 s:0|(invalid)
  z:cpu-thermal t:56 t:1 h:16 l:0 c:fan0 s:0|(invalid)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
wangjianyu3
8c5a61d93c Thermal: The thermal core depends on LPWORK
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-26 09:23:10 +08:00
yangsen5
94c0f71db9 v4l2m2m: modify return value of g_bufsize to uint32_t
CID 1578530: (#1 of 1): INTEGER_OVERFLOW

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-12-25 17:06:48 +08:00
Zhe Weng
286de7df01 netdev/upper: Fix wrong CPU when RSS is disabled
Some checks failed
Build Documentation / build-html (push) Has been cancelled
When `CONFIG_NETDEV_RSS` is disabled, `NETDEV_THREAD_COUNT` will be 1,
and we should not access `upper->sem[cpu]` with `cpu > 0`.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-12-25 15:58:42 +08:00
hujun5
233e175f28 fix a deadlock
0  up_testset (lock=0x404241c0 <g_uart1priv+32>) at /home/hujun5/下载/vela_sim/nuttx/include/arch/spinlock.h:96
1  spin_lock_wo_note (lock=<optimized out>) at /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:207
2  spin_lock_irqsave_wo_note (lock=0x404241c0 <g_uart1priv+32>) at /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:467
3  spin_lock_irqsave (lock=0x404241c0 <g_uart1priv+32>) at /home/hujun5/下载/vela_sim/nuttx/include/nuttx/spinlock.h:521
4  pl011_txint (dev=0x404240b0 <g_uart1port>, enable=false) at serial/uart_pl011.c:746
5  0x00000000402a3f1c in uart_xmitchars (dev=0x404240b0 <g_uart1port>) at serial/serial_io.c:118
6  0x00000000402a10f8 in pl011_txint (dev=<optimized out>, enable=<optimized out>) at serial/uart_pl011.c:756
7  0x00000000402a2ca0 in uart_write (filep=<optimized out>, buffer=<optimized out>, buflen=0) at serial/serial.c:1493
8  0x000000004028c464 in file_writev_compat (filep=0x4046cda0, uio=<optimized out>) at vfs/fs_write.c:81
9  0x000000004028c588 in file_writev (filep=<optimized out>, uio=uio@entry=0x40470dc0) at vfs/fs_write.c:161
10 0x000000004028c5fc in nx_writev (fd=<optimized out>, iov=iov@entry=0x40470e10, iovcnt=iovcnt@entry=1) at vfs/fs_write.c:257
11 0x000000004028c660 in writev (fd=<optimized out>, iov=iov@entry=0x40470e10, iovcnt=iovcnt@entry=1) at vfs/fs_write.c:356
12 0x000000004028c6dc in write (fd=<optimized out>, buf=buf@entry=0x404090b2 <g_nshgreeting>, nbytes=<optimized out>) at vfs/fs_write.c:421
13 0x00000000402adb10 in nsh_session (pstate=pstate@entry=0x40471080, login=login@entry=1, argc=argc@entry=1, argv=argv@entry=0x4046cf40) at nsh_session.c:108
14 0x00000000402ad94c in nsh_consolemain (argc=argc@entry=1, argv=argv@entry=0x4046cf40) at nsh_consolemain.c:75
15 0x00000000402ad894 in nsh_main (argc=argc@entry=1, argv=argv@entry=0x4046cf40) at nsh_main.c:74
16 0x00000000402a5880 in nxtask_startup (entrypt=0x402ad7fc <nsh_main>, argc=1, argv=0x4046cf40) at sched/task_startup.c:72
17 0x000000004029d444 in nxtask_start () at task/task_start.c:116
18 0x0000000000000000 in ?? ()

fix regresion from https://github.com/apache/nuttx/pull/15301

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-25 04:22:49 -03:00
Alan Carvalho de Assis
2d062a9529 drivers/sensors: Add support to Renesas FS3000 Air Velocity Flow
This driver add uORB sensor support to Renesas FS3000 sensor.

Thanks Xiang Xiao for review and suggestions.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-22 18:49:50 +08:00
hujun5
8411a97b85 use small lock in following files
arch/xtensa/src/esp32s3/esp32s3_rtc_lowerhalf.c
arch/z16/src/z16f/z16f_serial.c
arch/z80/src/z8/z8_serial.c
boards/arm/max326xx/max32660-evsys/src/max326_button.c
boards/arm/stm32/stm32f4discovery/src/stm32_gs2200m.c
drivers/i2c/i2c_bitbang.c
drivers/power/supply/act8945a.c
drivers/serial/uart_pci_16550.c
drivers/serial/uart_pl011.c
drivers/wireless/bluetooth/bt_uart_shim.c

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-22 18:43:26 +08:00
yaojingwei
bbd6931d61 nuttx/audio: add fake audio driver.
Some checks are pending
Build Documentation / build-html (push) Waiting to run
The fake audio driver aims to easily simulate the functions of audio driver through reading and writing files.
With it, you can conveniently customize and define various capture or playback audio drivers for debugging or automated testing.

Signed-off-by: yaojingwei <yaojingwei@xiaomi.com>
2024-12-20 11:47:08 -03:00
Alan Carvalho de Assis
0e162eeb7a drivers/sensors: Add Velocity sensor type to UORB
This patch adds support for velocity measurement sensors.
I plan to use it as a generic velocity type to be used for
Renesas FS3000 (Air Velocity Flow).

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-12-19 23:58:04 +01:00
chao an
29f1ca2c79 syslog/intbuffer: some improve for intbuffer
1. add static for internal function
2. add FAR for pointer prototype

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-18 18:10:43 +08:00
Alin Jerpelea
35a4fc05d9 drivers/usbhost/hid_parser: 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>
2024-12-18 17:51:57 +08:00
Alin Jerpelea
83de09d31a drivers/input/uinput: migrate to ASF license
Xiaomi has submitted the SGA and the license can be migrated to ASF

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-18 17:46:28 +08:00
Alin Jerpelea
1a0c5cf63a drivers/mtd/mtd_config_fs: 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>
2024-12-18 17:46:11 +08:00
Eren Terzioglu
3894dc12b0 driver/capture: Add ioctl function for architecture specific ioctl commands 2024-12-17 13:35:42 -03:00
chao an
a307dc0608 syslog/inbuffer: rename g_si_buffer to g_syslog_intbuffer
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:23 +08:00
chao an
0331703fc7 syslog/inbuffer: refactor intbuffer to circbuf
Replace character copy with string copy to improve performance

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:23 +08:00
chao an
e7c5608f4a drivers/reset: fix typo retrun -> return
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
f7ab66fa86 drivers/can: fix typo specfic -> specific
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
86ffd45707 drivers/virtio: fix typo deivce -> device
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
67c8159404 drivers/rpmsg: fix typo intialize -> initialize
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
74e6d0e8bf drivers/misc: fix typo memroy -> memory
Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
60636c4666 drivers/pci: fix typo addres -> address
fix typo addres -> address

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-17 20:48:07 +08:00
chao an
c7a0288a3f syslog/channel: unify syslog channel writing to reduce redundant code
unify syslog channel writing to reduce redundant code

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-16 14:19:41 +08:00
Alin Jerpelea
678c59d2e3 drivers/spi/ice40: 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.

Copyright and Author information is missing from the License and was filled with
commit authorship
    Signed-off-by: Jakub Janousek <janouja9@fel.cvut.cz>

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-16 14:18:35 +08:00
Andre Heinemans
d15a20eac8 sensors: fix Make.defs for bmm150 2024-12-14 15:07:08 +08:00
p-szafonimateusz
7b8f01f2da drivers/can: add CTU CAN FD driver (qemu only)
Add CTU CAN FD driver for qemu only:
https://www.qemu.org/docs/master/system/devices/can.html#ctu-can-fd-support-examples

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-12-13 11:19:22 +08:00
p-szafonimateusz
033f203e2a drivers/can: add Kvaser PCI card driver (qemu only)
add Kvaser PCI card driver support, works only with QEMU now:

https://www.qemu.org/docs/master/system/devices/can.html#examples-how-to-use-can-emulation-for-sja1000-based-boards

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-12-13 11:19:22 +08:00
yaojiaqi
890cf4764f drivers/timers/watchdog: support the configurations of Auto-monitor reset timeout and Auto-monitor keep alive interval in milliseconds.
In some areas with high security requirements such as vehicle control, in order to meet functional safety requirements, the timeout and feeding interval of the watchdog need to be configured in milliseconds

Signed-off-by: yaojiaqi <yaojiaqi@lixiang.com>
2024-12-12 17:02:05 +08:00
wangjianyu3
5a51d3b23f drivers/bch: Drivers may not support command BIOC_FLUSH
Calling `bchlib_flushsector()` maybe enough on some devices.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-12 01:56:55 +08:00
buxiasen
7887d9c6d0 syslog: allow microsecond on user specific time format
FORMAT_MICROSECOND depends on format is not required.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-12-10 18:14:12 +08:00
chao an
afca1a819d limits/path: replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency
replace CONFIG_PATH_MAX to PATH_MAX to ensure consistency

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-10 14:27:37 +08:00
lipengfei28
aa1df4e9a9 pci: fix pci dev alloc bridge mem error
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-12-06 21:12:24 +08:00
wangmingrong1
6e3f8d0356 virtio: fix compile error
CC:  virtio/virtio-mmio.c virtio/virtio-mmio.c: In function 'virtio_mmio_config_virtqueue':
virtio/virtio-mmio.c:346:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  346 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.desc);
      |              ^
virtio/virtio-mmio.c:350:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  350 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.avail);
      |              ^
virtio/virtio-mmio.c:354:14: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  354 |       addr = (uint64_t)kasan_reset_tag((FAR void *)vq->vq_ring.used)

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-06 20:32:21 +08:00