Commit Graph

5953 Commits

Author SHA1 Message Date
chenwen@espressif.com
e0b99216b0 driver/net/lan9250: Add lan9250_ioctl and lan9250_uninitialize APIs
- use 'lan9250_ioctl' to set and get the value of lan9250 phy register
    - use `lan9250_uninitialize` to un-initialize the ethernet driver

Signed-off-by: chenwen@espressif.com <chenwen@espressif.com>
2024-07-15 19:41:15 +08:00
hujun5
a4fece3450 spin_lock: inline spin_lock
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
2024-07-15 02:29:30 +08:00
simbit18
f12c4e05cc Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs
2024-07-12 06:37:59 +08:00
Saurav Pal
6f0daf08eb fs/mnemofs: Adds Block Allocator
Adds Block Allocator logic to mnemofs.

Signed-off-by: Saurav Pal <resyfer.dev@gmail.com>
2024-07-10 18:40:47 -03:00
Michal Lenc
816b1b28a0 can: enhance API to allow better CAN FD handling
This commit moves can_bytes2dlc and can_dlc2bytes from kernel internal
functions to API. These functions are necessary to convert bytes to
dlc for CAN FD frames and has to be accessible from the application
since can_hdr_s does not store message length in bytes but directly in
dlc.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-07-10 11:33:03 -03:00
xuxingliang
bbc31d70f4 drivers: add API for drivers early initialization
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-07-09 16:05:59 +08:00
xuxingliang
ae03313473 drivers/segger: upgrade to v3.54
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-07-03 17:31:23 +08:00
SPRESENSE
573fb2b016 drivers/audio: Remove useless descriptions from CMakeLists.txt
Remove useless descriptions from CMakeLists.txt.
2024-06-28 17:53:56 +08:00
Alan Carvalho de Assis
9cfe255a81 Fix allocated memory test
Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-06-28 09:30:42 +02:00
Jani Paalijarvi
92747b7529 drivers/net/ksz9477: Add port mirroring support
Signed-off-by: Jani Paalijarvi <jani.paalijarvi@unikie.com>
2024-06-27 18:09:57 +08:00
Huang Qi
add8b71fee serial/gdbstub: Change GDBSTUB_ to GDB_
Fix nameing convention inconsistent

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-06-24 23:51:43 +08:00
buxiasen
142a1e186e pm: remove pm_lock spinlock wrapper
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-23 11:16:56 +08:00
shizhenghui
80da796897 video/v4l2_cap: fix no return after checked null
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
shizhenghui
aa451d3740 video/v4l2_cap: fix use after free
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
shizhenghui
47905c9132 video/v4l2_cap: fix dereference before null check
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
shizhenghui
33b539a07d video/v4l2_cap: fix type overflow
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-06-22 11:50:25 -03:00
buxiasen
d7ab3cc1be pm: change pm lock from mutex to spinlock
as we always want to take critical_section, and it is not long time job,
take mutex is not necessary, use spinlock_irq_save as a replace is
better, dont't have to take global critial_section in pm.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-21 12:28:57 -03:00
buxiasen
596aa1d51b pm_runtime: lock use pm_runtime_lock
isolate with pm_runtime and pm_domain, for further usage optimise

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-21 03:08:23 +08:00
Richard Tucker
e40cbfd589 drivers/can/sja1000: fix cmd register write 2024-06-19 01:54:27 +08:00
Richard Tucker
02cce1ec71 sensors/bmi270: fix bmi270_uorb build 2024-06-17 18:29:18 +08:00
buxiasen
292b213be2 pm: pm_runtime fix header
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-17 16:23:53 +08:00
Richard Tucker
6d4356662d sensors/bmi270: fix typo 2024-06-17 16:22:15 +08:00
Richard Tucker
6953814425 drivers/can/sja1000: fix Rx buffer pointer issue
When initialising the SJA1000 peripheral on some implementations
(SJA1000_FDTOL), "releasing" the buffer when the Rx buffer is empty
causes a buffer pointer misalignment.

On peripheral initialise, remove the flag to "release" the buffer.
This should be safe for all systems using the SJA1000 CAN controller
as a "reset" to the peripheral clears the Rx FIFO.
2024-06-17 15:25:45 +08:00
raiden00pl
11ae500fab drivers/1wire/ds28e17.c: fix printf warnings 2024-06-13 02:21:29 +08:00
raiden00pl
b076b5dfb6 drivers/motor: fix printf warnings 2024-06-13 02:21:29 +08:00
raiden00pl
6c5f8bd61f drivers/contactless: fix gcc14 errors 2024-06-13 02:21:29 +08:00
raiden00pl
e700bb5051 drivers/1wire/1wire.c: fix printf warning 2024-06-13 02:21:29 +08:00
raiden00pl
84fb99b118 drivers/wireless/gs2200m.c: fix warning
/home/raiden00/git/RTOS/nuttx/nuttx/drivers/wireless/gs2200m.c:2071:3: note: ‘snprintf’ output between 7 and 9 bytes into a destination of size 8
 2071 |   snprintf(cmd, sizeof(cmd), "ATE%d\r\n", on);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2024-06-13 02:21:29 +08:00
buxiasen
3d1b3ba1f5 pm: shorten the pm procfs domain lock time.
snprintf and procfs_memcpy don't have to do inside lock.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 12:02:13 +08:00
buxiasen
112e67f863 driver/1wire: update pm callback use container_of
pretty the code using container_of inside nuttx.h

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 11:59:59 +08:00
buxiasen
30188dc587 watchdog: fix idle callback maybe not upperhalf
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-08 11:59:26 +08:00
chao an
e456c88c09 Revert "sched: replace some global variables to macro"
sched implementation not depends on macro abstraction, so revert below commit:

This reverts commit 4e62d0005a
This reverts commit 0f0c370520
This reverts commit ad0efd04ee

Signed-off-by: chao an <anchao@lixiang.com>
2024-06-06 22:00:25 +08:00
buxiasen
1933f9648d pm: remove pm global, make per domain isolated
After change, when CONFIG_PM_NDOMAINS > 1,
the pm_register will not able to get notificaion
from not PM_IDLE_DOMAIN.
Should use pm_domain_register as a replacement.

Isolate domains from global callbacks can decrease
not necessary execution, and reduce the
lock instruction requirements.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-06-04 22:04:25 +08:00
Stuart Ianna
39e6e25565 drivers/devicetree/fdt: add additional fdt parsing utilities.
These utilities remove some of the boilerplate needed for FDT parsing and device initialization.
2024-06-03 22:05:00 +08:00
TakuyaMiyasita
d6445484fe drivers/serial/uart_pl011.c : add the bitmask according to PL011 spec. (Although almost no problem.) 2024-06-03 21:18:44 +08:00
TakuyaMiyasita
c93383407b drivers/serial/uart_pl011.c : add the interface about clock and reset control for reducing power consumption. 2024-06-03 21:18:44 +08:00
TakuyaMiyasita
99dee09146 drivers/serial/uart_pl011.c : bug fix about the function : pl011_txready(). 2024-06-03 21:18:44 +08:00
raiden00pl
d942e373bc drivers/foc_dummy.c: fix compilation for CONFIG_MOTOR_FOC_BEMF_SENSE=y 2024-06-02 09:27:36 -03:00
Michal Lenc
3cc65d5d35 timers/mcp794xx: add option to digital trimming
MCP794XX supports digital trimming that periodically adds or subtracts
clock cycles, resulting in small adjustments in the internal timing.
This way inaccuracies of clock source can be compensated.

This commit adds option to set the trimming register for MCP794XX.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-05-28 16:34:41 -03:00
Michal Lenc
c59b48355c timers/mcp794xx: add possibility to store datetime in UTC
This commit adds configuration option CONFIG_MCP794XX_DATETIME_UTC.
If set, the datetime is stored in UTC instead of local time. The
default value is kept at local time to keep backwards compatibility
with devices currently using the RTC.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-05-28 16:34:41 -03:00
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