Michal Lenc
44ef021bc5
analog: add configuration option to set DAC FIFO size
...
DAC driver uses CONFIG_DAC_FIFOSIZE, but this is not configurable
from Kconfig. This adds the missing option and allows to set DAC
FIFO size from the configuration.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-05-27 23:23:28 +08:00
buxiasen
4197b5aec8
pm: do struct timespec copy to decrease api call times.
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-05-25 12:07:38 +08:00
buxiasen
07f0e0c166
PM: add stability governer
...
only when first time change state can hold WFI for enough time thresh,
allow second time goto target state,
suitable for the case when wakeup from sleep too slow, etc.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-05-23 09:57:19 -03:00
buxiasen
d3d52ee5e2
pm_procfs: update state up to now when pm procfs read
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-05-20 10:29:49 +08:00
raiden00pl
697e30e615
sensors/bmm150: configure I2C frequency
2024-05-20 10:13:42 +08:00
raiden00pl
c9bf7a841e
sensors/bh1749nuc: configure I2C frequency
2024-05-20 10:13:42 +08:00
raiden00pl
147b5762f0
sensors/bh1749nuc_uorb.c: don't wait for VALID flag in fetch interface
...
otherwise the sensor freezes when we read RBG and IR data one after another
2024-05-20 10:13:42 +08:00
raiden00pl
9d768498ce
sensors/bh1749nuc_uorb.c: add sensor reset
2024-05-20 10:13:42 +08:00
Rodrigo Sim
29775f824b
drivers/sensors/Kconfig: Fix HC-SR04 configuration
...
Signed-off-by: Rodrigo Sim rcsim10@gmail.com
2024-05-19 10:21:23 -03:00
yinshengkai
20ebe0e64c
Replace all asserts in kernel code with ASSERT
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-05-17 10:18:16 -03:00
ChenChuang
1d19c6abe3
fix: call rwb->rhreload() when nblocks > 0
...
There is no need to call rwb->rhreloade() when nblocks is 0,
and some platform(eg: BES) has the limit that the parameter
of len in pltatform flash read function cant't be 0.
2024-05-17 19:15:49 +08:00
dulibo1
3762bda5e2
pm: procfs add pm prepare fail stats
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-05-17 19:07:44 +08:00
buxiasen
c9170c3b0a
pm: fix when RTC_HIRES enabled pm procfs err
...
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-05-16 16:23:18 +08:00
buxiasen
6ef6d75840
PM: change domain field state after callback done
...
Swap the sequence of domain state update and statechanged callback,
Make sure inside statechanged callback can get the old domain state.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-05-15 16:32:41 -03:00
yangsen5
33b5e1414c
arch/sim_encoder: g_bufsize initialization error in g_sim_encoder_ops structure
...
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-05-15 22:03:18 +08:00
shizhenghui
ed1ad1be65
Add v4l2m2m & sim decoder
...
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-05-15 22:03:18 +08:00
Zhe Weng
c234fac910
net/netdev: Check quota when registering lower-half devices
...
Some drivers may set too big quota by accident and consume all of our
buffers, so we add a check when registering devices.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2024-05-14 17:43:26 -03:00
meijian
667b9eabdd
[driver][tun]: add tx packets dump
...
Signed-off-by: meijian <meijian@xiaomi.com>
2024-05-14 22:05:08 +08:00
jianglianfang
a7961a3d48
driver/vnc:fix vnc kbd assert cause by wrong data conversion
...
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-05-13 18:12:48 +08:00
Jani Paalijarvi
975d99c3f6
drivers/mmcsd/mmcsd_sdio.c: Fix SD card 4-bit support
...
Fix a bug which causes that 1-bit mode is always selected.
This happens even if the driver sets SDIO_CAPS_4BIT capability
in case of the card and the host support 1- and 4-bit wide bus.
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-05-10 19:43:08 +08:00
simbit18
792b99473c
fix nxstyle
...
corrected comments in C89 style
2024-05-09 23:44:40 +08:00
Michal Lenc
a1f5fd4e72
icjx: use iC-JX interrupt config instead of the general one
...
There might be multiple expanders, one with interrupt used and other
without. This commit fixes initial incorrect interrupt design by
introducing ICJX_INT_ENABLE config option.
Also fixes naming of ICJX_MULTIPLE option.
Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-05-09 23:43:56 +08:00
hujun5
5cee996588
up_putc: int up_putc, enter_critical_section may be called
...
before kernel has been iniitialized,we use spin_lock_irqsave to replace.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-05-09 13:45:02 +08:00
Stuart Ianna
c4dbabb1bb
drivers/devicetree: Add a set of commonly used FDT utilities.
2024-05-09 01:37:11 +08:00
Yanfeng Liu
9d6e2b97fb
video/fb: add munmap support
...
This adds support to user-space munmap() requests in kernel build.
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-05 22:01:26 +08:00
Yanfeng Liu
041ef1d9ea
video/fb: kernel build framebuffer support
...
This supports running fb demo app in kernel build with new
config `rv-virt/kfb64`. The demo shows colored rectangles
in graphic window with the following console logs:
```
nsh> cat /proc/version
NuttX version 12.4.0 1ea10ddacc-dirty May 3 2024 07:03:59 rv-virt/kfb64
nsh> fb
VideoInfo:
fmt: 13
xres: 640
yres: 480
nplanes: 1
PlaneInfo (plane 0):
fbmem: 0x80218010
fblen: 1228800
stride: 2560
display: 0
bpp: 32
Mapped FB: 0xc2000010
0: ( 0, 0) (640,480)
1: ( 58, 43) (524,394)
2: (116, 86) (408,308)
3: (174,129) (292,222)
4: (232,172) (176,136)
5: (290,215) ( 60, 50)
Test finished
```
Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2024-05-03 23:58:39 +08:00
Jukka Laitinen
9277be2503
Add configuration option for RTL8211F RGMII PHY
...
Also extend the "struct phy_desc_s" to support for 1GB PHY's, the speed
detection always needs more than one bit.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2024-05-02 16:30:41 -03:00
hujun5
e4d0f404f1
driver: There is no need to use sched_[un]lock
...
purpose:
1 sched_lock is very time-consuming, and reducing its invocations can improve performance.
2 sched_lock is prone to misuse, and narrowing its scope of use is to prevent people from referencing incorrect code and using it
test:
We can use qemu for testing.
compiling
make distclean -j20; ./tools/configure.sh -l qemu-armv8a:nsh_smp ;make -j20
running
qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic -machine virt,virtualization=on,gic-version=3 -net none -chardev stdio,id=con,mux=on -serial chardev:con -mon chardev=con,mode=readline -kernel ./nuttx
We have also tested this patch on other ARM hardware platforms.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-04-30 11:35:13 -03:00
chao an
e4d4c67b78
serial/pl011: configurable clock frequency
...
move clock frequency into Kconfig
Signed-off-by: chao an <anchao@lixiang.com>
2024-04-30 17:26:39 +08:00
simbit18
7e30d38558
drivers/sensors/Kconfig: Added if SENSORS_BME680 for common dependency
...
sensor BME680: Added if SENSORS_BME680
2024-04-30 01:48:53 +08:00
raiden00pl
6621748fe8
sensors/bmi270_uorb.c: move init sequence to register function
...
otherwise default accel and gyro scale configured during registration is cleared
2024-04-28 21:31:39 +08:00
raiden00pl
322551b13b
sensors/adxl372_uorb: wait for data ready in thread
2024-04-28 13:21:54 +08:00
raiden00pl
a34007b81f
sensors/bmi270_uorb.c: fix condition for sensor stop
2024-04-28 13:21:54 +08:00
raiden00pl
1985dcd192
drivers/adxl362_uorb: various fixes
...
- fix compilation for fetch interface
- for data ready in thread
- add soft reset
2024-04-28 13:21:54 +08:00
raiden00pl
7a789d0775
sensors/bmm150_uorb.c: fix compilation for poll interface
2024-04-28 13:21:54 +08:00
raiden00pl
0f56d1df16
sensors/bh1749nuc_uorb.c: fix compilation when poll interface is disabled
2024-04-28 13:21:54 +08:00
anjiahao
0040e9a239
drivers/serial:support arm cmsdk drivers
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-04-26 18:42:35 -03:00
dongjiuzhu1
c093514cea
drivers/usbdev: Register the device after successful set configuration
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
443306793c
drivers/usbdev: support read ZLP packet
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
4bcad6115b
driver/usbdev: lock fs_ep resouce when call unbind
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
d6bfa87c8d
drivers/usbdev: support send ZLP(zero length packet) data packet in bulkin
...
status = write(g_usb_ep_in, (void*)0xFEE1DEAD, 0);
sched_backtrace
nuttx/arch/arm/src/../../../sched/sched/sched_backtrace.c:57
_assert
nuttx/arch/arm/src/../../../sched/misc/assert.c:659
__assert
nuttx/arch/arm/src/../../../libs/libc/assert/lib_assert.c:36
usbdev_fs_write
nuttx/arch/arm/src/../../../drivers/usbdev/usbdev_fs.c:770 (discriminator 1)
file_write
nuttx/arch/arm/src/../../../fs/vfs/fs_write.c:91
nx_write
nuttx/arch/arm/src/../../../fs/vfs/fs_write.c:148
ffs_transport_thread_usb_write
nuttx/arch/arm/src/../../../../external/mtp-responder/mtp-responder/src/mtp_usb_driver_nuttx.c:224
_transport_thread_usb_write
nuttx/arch/arm/src/../../../../external/mtp-responder/mtp-responder/src/mtp_usb_driver.c:80
pthread_startup
nuttx/arch/arm/src/../../../libs/libc/pthread/pthread_create.c:59 (discriminator 2)
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
2b571e1d11
drivers/usbdev: support config usb req buffer alignment bytes
...
we need to alloc req buffer in cacheline size units, othersize the
data may by incorrect.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
9ebed49d29
drivers/usbdev: update sem ptr before loop run
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
7feb547c6f
drivers/usbdev: stop read when container length is less than the maximum length.
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
0f269b1c2a
driver/usbdev: report POLLPRI event when usb connect
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
1355302036
drivers/usbdev_fs: update ctrlreq buffer len base on longest string descriptor
...
nuttx/mm/kasan/kasan.c:117
kasan_report
nuttx/mm/kasan/kasan.c:111
composite_mkstrdesc
nuttx/drivers/usbdev/composite.c:404
sunxi_ep0_disptach
nuttx/arch/arm/src/chip/drivers/rtos-hal/hal/source/usb/udc/udc.c:1287
up_common_handler
nuttx/arch/arm/src/chip/drivers/osal/src/hal_interrupt.c:10
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
070ecb480a
drivers/usbdev_fs: report POLLHUP when disconnect
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
sunkun3
e3a6368c9a
drivers/usbdev_fs: when the device is not opened, the received data is retained.
...
It is up to the app to determine whether the data is valid when opened
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 22:02:02 +08:00
dongjiuzhu1
e2f1ccdefc
drivers/misc/rwbuffer: fix rwbuffer overflow issue
...
issue:
in rwb_wrflush():
memmove(rwb->wrbuffer + padblocks * rwb->blocksize,
rwb->wrbuffer, rwb->wrnblocks * rwb->blocksize);
when the offest from rwb->wrblockstart to startblock plus rwb->wrnblocks is greater
than rwb->wralignblocks, it will be causing memory overflow since rwb->wrbuffer is
allocated rwb.wrmaxblock(rwb.wralignblocks) blocks.
fix:
Let us ensure that the wrblockstart in rwbuffer must be aligned according to
wralignblocks after writing, so there is no need to perform memmove when flushing
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 10:28:52 +08:00
dongjiuzhu1
0d609c451b
Revert "fix: the bug about rwbuffer causing mem overflow"
...
This reverts commit e43aa99ae8
.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-04-23 10:28:52 +08:00