Commit Graph

5171 Commits

Author SHA1 Message Date
Zhe Weng
f21742899f net/netdev: Use upper half of netdev to simplify sim driver
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
Zhe Weng
72b77d36e2 net/netdev: Add upper half of netdev to simplify driver logic
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
raiden00pl
b737d410b9 bt_rpmsghci: fix warnings 2023-04-22 01:37:24 +08:00
Tiago Medicci Serrano
4d6a8663fa drivers/pipe: make pipe and named pipe (mkfifo) POSIX-compliant
According to https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html

"
 When opening a FIFO with O_RDONLY or O_WRONLY set:
  * If O_NONBLOCK is set, an open() for reading-only shall return
    without delay. An open() for writing-only shall return an error
    if no process currently has the file open for reading.

  * If O_NONBLOCK is clear, an open() for reading-only shall block
    the calling thread until a thread opens the file for writing.
    An open() for writing-only shall block the calling thread until
    a thread opens the file for reading.
"

This commit has an equivalent on nuttx-apps: EXAMPLES_PIPE app
was updated to be able to check pipes and named pipes behavior.
2023-04-22 01:28:33 +08:00
pengyiqiang
0ed82e8380 video/fb: add vsync offset support
Android Documentation: https://source.android.com/docs/core/graphics/implement-vsync#vsync_offset

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-04-22 01:09:09 +08:00
Huang Qi
c7a935dc1a drivers/telnet: Implement part of termios
Implement local mode control (ECHO only) for telnet, this allow application to disable ECHO of telnet, it's useful to input password during shell login and other case.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-22 01:03:51 +08:00
Huang Qi
d6c56e7105 driver/telnet: Remove TELNET_CHARACTER_MODE
If TELNET_CHARACTER_MODE is set, the ECHO must be handled by the telnet server.

So this option is useless. We need a new approach to control the ECHO behavior.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-22 01:03:51 +08:00
ZhongAn
596f52c3ee Nuttx/dma: add dma framework for nuttx
Signed-off-by: ZhongAn <zhongan@pinecone.net>
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-04-22 01:02:51 +08:00
yinshengkai
a297ff61f5 drivers/note: replace sched_note_filter_dump to sched_note_filter_tag
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-19 02:53:34 +08:00
Fotis Panagiotopoulos
ab1b3c0337 Added missing checks in strdup'ed strings. 2023-04-19 02:49:31 +08:00
simbit18
433ec4c9de drivers/sensors/Kconfig: Fix bmp280 texts in Kconfig
Fix SENSORS_BMP280 texts in Kconfig
2023-04-19 02:46:09 +08:00
XinStellaris
a4546f35d2 drivers/mtd:fix uninit data in mtd_config_fs
Signed-off-by: XinStellaris <tianxin7@xiaomi.com>
2023-04-19 02:45:46 +08:00
SPRESENSE
20424a8a59 drivers/audio/cxd56.c: Fix freeze audio and add underrun notify
Fix freeze audio driver when it start 2nd time.
And add underrun notify to application as an event.
2023-04-17 10:24:48 +02:00
Zhe Weng
7671ed9615 usrsock_server: Raise error earlier for large sendto request
It's better to raise error before client sends its (NIOVEC+1)th buffer
(and release buffers held by server), otherwise the client may stuck at
getting (NIOVEC+1)th tx buffer if NIOVEC is equal to rpmsg buffer num.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-15 21:56:03 +09:00
Zhe Weng
0d118ec214 usrsock_server: Use remain instead of iov[0] to figure out partial requests
Found a problem:

When sendto handler gets an error, it will release all its rx buffer,
then iov_base becomes NULL. But it cannot let client stop its request,
then the next data from client cannot be handled by usrsock server
correctly.

It's better to note down the remaining bytes, then we can stop at
correct time.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-15 21:56:03 +09:00
simbit18
2309eacf9f drivers/sensors/Kconfig: Fix bmi160 help texts in Kconfig
Fix bmi160 help texts in Kconfig
2023-04-12 07:54:19 +02:00
zhangyuan21
c239d19df0 nuttx: add more dependent header file
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-11 09:13:32 +03:00
wangming9
a7fc26124d arch/arm64: the arm64 perf interface supports pmu
Summary:
- Support arm64 pmu api, Currently only the cycle counter function is supported.
- Using ARM64 PMU hardware capability to implement perf interface, modify all
  perf interface related code.
- Support for pmu init under smp.

Signed-off-by: wangming9 <wangming9@xiaomi.com>
2023-04-10 16:23:49 -03:00
zouboan
90ff76dfd6 drivers/sensors: add support of InvenSense MPU-9250 sensor 2023-04-10 11:25:42 -03:00
yinshengkai
b3e1004658 sched_note: add function auto-tracing
After enabling this option, you can automatically trace the function instrumentation without adding tracepoint manually.
This is similar to the Function Trace effect of the linux kernel

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-10 11:04:24 -03:00
Dong Heng
a51e102a41 xtensa/esp32: Make asprintf and lib_free corresponding 2023-04-06 20:57:19 +03:00
raiden00pl
478f2f3d5f rndis: move private definitions from a public header to the source file 2023-03-31 08:17:01 +09:00
raiden00pl
58e817db76 rndis: do not configure endpoints from Kconfig when composite enabled
This should be done from a board specific logic, as for other composite devices
2023-03-31 08:17:01 +09:00
Lwazi Dube
18d196e968 usbhost_hidkbd: Add the option to use interrupt transfers.
Using the interrupt pipe is recommended in the Get_Report
request section of the HID standard. This option has been
added to support some keyboards that refuse to return valid
keys when polled using the Get_Report request. Support for
the Caps Lock key, including LED, has also been added.
2023-03-29 09:22:41 -03:00
Zhe Weng
9fd4d6b767 usrsock_server: Do not poll SOCK_CTRL.
It seems that we don't need to poll the SOCK_CTRL sockets, so skip them in usrsock server.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-29 09:18:36 -03:00
zhanghongyu
0550082966 usrsock_server: add debug info for poll_setup
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-03-29 09:18:36 -03:00
raiden00pl
bed53538e8 rndis: EP0 belongs to composite class if composite enabled 2023-03-28 19:43:56 -03:00
raiden00pl
8de2197773 rndis: exclude the logic that belongs to composite 2023-03-28 19:43:56 -03:00
raiden00pl
cb05700acf rndis: interface association descriptor should depend on CONFIG_COMPOSITE_IAD 2023-03-28 19:43:56 -03:00
raiden00pl
10f1d3e76e rndis: fix dev info init for composite 2023-03-28 19:43:56 -03:00
raiden00pl
9b70e010dc rndis: refactor usbdev_rndis_get_composite_devdesc to make it more like in other composite drivers 2023-03-28 19:43:56 -03:00
Huang Qi
c623a7b731 drivers/lcd/st7789: Support mirror X/Y
Support mirror display by X/Y axis, it's useful for
single portrait/landscape but need to mirror specific direction.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-27 17:55:49 -03:00
Xiang Xiao
bc3e6c84e1 arch: Rename up_[early]serialinit to [arm64|riscv|x86_64][early]serialinit
The naming standard at:
https://cwiki.apache.org/confluence/display/NUTTX/Naming+of+Architecture%2C+MCU%2C+and+Board+Interfaces
requires that all MCU-private function begin with the name of the architecture, not up_.

follow the change from: https://github.com/apache/nuttx/pull/930

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-27 12:35:04 +03:00
Lwazi Dube
21ffb4de72 boards/sama5d3-xplained: Make hot plugging more reliable. 2023-03-26 13:03:21 -03:00
Huang Qi
7ce78dd66a Revert "driver/uart_rpmsg: Passthrough data by default"
This reverts commit 64e611d71e.
2023-03-24 14:59:41 -03:00
raiden00pl
50cf84c99a usbdev-composite: ep0 submit should be send only once for the composite class 2023-03-24 14:54:31 -03:00
raiden00pl
d014b9d384 rndis: use composite_ep0submit to send the ep0 when composite 2023-03-24 14:54:31 -03:00
raiden00pl
6caa9317f6 usbmsc: do not send deferred response if we are part of the composite device
EP0 is owned by the composite class so it shouldn't be directly accessed by usbmsc
2023-03-24 14:52:50 -03:00
chao an
cdcdce16f7 wireless/bcm43xxx: enter power saving only if IEEE80211_BROADCOM_LOWPOWER enabled
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
266774939f wireless/bcm43xxx: downgrade log level of allocate frame fail
Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
4e3480554d mmcsd/sdio: enlarge cmd53 timeout to 1s
cmd53 need a longer tolerance on some slow devices

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-22 17:26:52 -03:00
chao an
1b46484849 mmcsd/sdio: fix potential race condition in sdio
sdio driver should ensure the thread safety

Signed-off-by: chao an <anchao@xiaomi.com>
2023-03-21 14:40:44 -03:00
Lwazi Dube
84a3ddd79b boards/sama5d3-xplained: Fix OHCI clock.
Choose a divider value that matches the description provided within
the same header file.
Include stddef.h to fix compiler errors because NULL is not defined.
Make logs print protocol, vid and pid consistently, (decimal hex hex).
2023-03-21 14:08:03 -03:00
Lucas Saavedra Vaz
326261dd7d drivers/audio/es8388: Add input support 2023-03-21 12:13:59 -03:00
yinshengkai
64e7e43f1f drivers/note: adjust the note_driver_ops definition
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
yinshengkai
9ecaa022c8 note: fix assignment warning
note/note_driver.c:154:7: warning: unsigned conversion from ‘int’ to ‘unsigned char’ changes value from ‘65535’ to ‘255’ [-Woverflow]
  154 |     , CONFIG_SCHED_INSTRUMENTATION_CPUSET
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
yinshengkai
d73fb5ca21 note: fix sched_note_suspend logic error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-03-21 12:13:38 -03:00
Huang Qi
fab77cd322 drivers/pty: Echo input by default
Align the pty behavior to linux/bsd,

Also fix the ECHO issue with microadb after https://github.com/apache/nuttx/pull/8691.

adb shell will echo normally with this patch.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-21 07:23:17 +09:00
Sebastien Lorquet
13d823f307 spi_xx25xx: Repair the spi bus locking mechanism when waiting for write completion 2023-03-20 07:08:16 -07:00
Xiang Xiao
e7090022a0 drivers/serial: Fix some typo error report in https://github.com/apache/nuttx/pull/8843
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-20 08:08:04 +01:00