Commit graph

6727 commits

Author SHA1 Message Date
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
wangmingrong1
75fc19d729 virtio: Fix the problem of incorrect setting of virtio queue address under tags kasan
There is also a printing error due to https://github.com/apache/nuttx/pull/15043:
Configuration/Tool: rv-virt/virt_nsh
In file included from virtio/virtio-mmio.c:29:
virtio/virtio-mmio.c: In function 'virtio_mmio_init_device':
Error: virtio/virtio-mmio.c:826:14: error: format '%d' expects argument of type 'int', but argument 3 has type 'uint32_t' {aka 'long unsigned int'} [-Werror=format=]
  826 |       vrterr("Version %d not supported!\n", vdev->id.version);
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~~~
      |                                                     |
      |                                                     uint32_t {aka long unsigned int}
virtio/virtio-mmio.c:826:24: note: format string is defined here
  826 |       vrterr("Version %d not supported!\n", vdev->id.version);
      |                       ~^
      |                        |
      |                        int
      |                       %ld
cc1: all warnings being treated as errors
make[1]: *** [Makefile:109: virtio-mmio.o] Error 1
make[1]: Target 'libdrivers.a' not remade because of errors.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-05 21:23:30 +08:00
hujun5
1ab1dbc0f0 wm8776: use small lock in drivers/audio/wm8776.c
reason:
We hope to remove all instances of spin_lock_irqsave(NULL).

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-12-05 21:22:32 +08:00
zhangyuan29
060fda032b drivers/net: change netdev_lower_quota_load to macro.
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-12-05 13:26:22 +08:00
zhangyuan29
dcea1b90e7 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>
2024-12-04 14:03:14 +01:00
wangmingrong1
eed302b8bb virtio: Add virtio version check
In the source code of qemu or linux, there is a check for the virtio version
/* Check device version */
priv->version = readl(priv->base + VIRTIO_MMIO_VERSION);
if (priv->version < 1 || priv->version > 2) {
	debug("(%s): version %d not supported!\n",
	udev->name, priv->version);
	return 0;
}
/* Check device ID */
uc_priv->device = readl(priv->base + VIRTIO_MMIO_DEVICE_ID);
if (uc_priv->device == 0) {
	/*
	* virtio-mmio device with an ID 0 is a (dummy) placeholder
	* with no function. End probing now with no error reported.
	*/
	return 0;
}

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-04 19:49:26 +08:00
chao an
93a34b1992 drivers/timers: export arch timer api to support higher resolution
Before:
[  384.149000] [CPU0] [ 5] Hello World!
After:
[  384.149947] [CPU0] [ 5] Hello World!

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-04 10:52:26 +01:00
gaohedong
9fb84700a8 com/can: Remove unnecessary judgment logic
The feature of preventing the same ID frame rotation should be done in the lowerhalf, not in the upperhalf.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-12-03 08:48:18 +08:00
Jukka Laitinen
140b3080c5 drivers/audio/wm8994.c: Include nuttx/arch.h to fix compilation (up_mdelay prototype)
Fix the compilation error:

  audio/wm8994.c: In function 'wm8994_audio_output':
  Error: audio/wm8994.c:1898:3: error: implicit declaration of function 'up_mdelay' [-Werror=implicit-function-declaration]
   1898 |   up_mdelay(40);
        |   ^~~~~~~~~

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-12-02 13:14:22 +02:00
pengyiqiang
257339a442 video/fb: fix integer overflow issue
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-12-02 13:30:50 +08:00
Simon Filgis
6135892d66 driver for STUSB4500
right now it is only possible to change the delivered power on the fly
by
1. selecting PDO2 slot
2. write to POO2
3. renegotiate power delivery by sw reset command
2024-11-30 08:40:08 -03:00
wangjianyu3
5fbf377214 sensors/fakesensor_uorb: Using different nbuffer for each topic of GNSS
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
wangjianyu3
d2dd747e09 drivers/sensors/gnss: Different nbuffer for each topic
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 14:10:57 +08:00
wangjianyu3
f1a57f4265 drivers/sensors/gnss: Add suffix to macro of geofence index
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-30 03:16:25 +08:00
Michal Lenc
a8d4ed910d st7789: add configuration option to set default background color
ST7789 fills the display with 0xffff color during its initialization.
This color may or may not be overwritten by a higher layer (framebuffer
or lcd driver for example). The color remains on the display until
application UI is started if not overwritten by the higher layer before.

This commit adds configuration option LCD_ST7789_DEFAULT_COLOR that
allows to set the default background color. This may avoid shining
display with, for example, white color for an extensive amount of time.
The default value is set to 0xffff previously hard-coded in the driver,
therefore current implementations will not notice the change.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-11-29 18:32:22 +08:00
lipengfei28
f589d5a4c7 pci: pci res have pci addr and cpu addr, ecam use map translation pci
addr to cpuaddr

Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-11-29 11:12:54 +08:00
lipengfei28
b44fb53b61 pci:map bar should not be zaro len
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-11-29 11:12:54 +08:00
lipengfei28
c2cd503f66 pci: add /dev/pci,used for pciutils
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-11-29 11:12:54 +08:00
simbit18
9c9b945876 fix nxstyle
Removed extra spaces from .h and .c files
2024-11-28 20:40:13 +08:00
zhanghongyu
ba419cc894 drivers/net/{e1000|igc}: limit no packet is transmit after carrier off
if the drvier tx queue is full up during the network cable unplugging,
there will be no txdone interrupt after inserting the network cable,
transmit cannot be recovered.

Modified to no longer fill the driver with packet when link down.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
0932fccfb2 drivers/net/{e1000|igc}: reset TX ring when disconnected
drivers/net/{e1000|igc}: reset TX ring when disconnected

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
ada47439bd drivers/net/{e1000|igc}: fix link status crash
netdev_lower_carrier_xxx API can't be used in interrupt context

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00
p-szafonimateusz
5e48f2a3d8 drivers/net/igc: make Interrupt Throttle configurable
make Interrupt Throttle configurable for igc

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2024-11-27 02:46:04 +08:00