Commit Graph

5214 Commits

Author SHA1 Message Date
simbit18 f12b9c44cb drivers/power/relay/Kconfig: Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
2023-05-10 22:51:11 +08:00
simbit18 e320299ba7 drivers/audio/Kconfig: Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
2023-05-10 22:51:11 +08:00
hujun5 7f4cb3057a arch/arm64: merge serial_pl011.c and qemu_serial.c
At present, the serial drivers qemu_serial.c and serial_pl011.c on the fvp-v8r and qemu platforms in arm64 are duplicated
and need to be merged. The plan is to place them under the drivers\serial directory to create a common code module,
so that both fvp-v8r and qemu can use the same code.
In the future, if new platforms use pl011 serial ports, they can also be directly reused

Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-05-10 09:06:59 +02:00
gaojiawei 64b51bbbf7 driver/serial/pty.c fix update local flags for the pty device attribute
Signed-off-by: gaojiawei <gaojiawei@xiaomi.com>
2023-05-10 00:47:33 +08:00
raiden00pl b7341975ab drivers/usbhost/usbhost_cdcacm.c: fix warning 2023-05-09 20:48:51 +08:00
chao an d3240061db syslog/Kconfig: fix kconfig warning
warning: The int symbol SYSLOG_RPMSG_WORK_DELAY (defined at drivers/syslog/Kconfig:274) is being evaluated in a logical context somewhere. It will always evaluate to n.
make: *** [tools/Unix.mk:663: olddefconfig] Error 1

Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-08 21:36:45 +03:00
Xiang Xiao 325f395300 Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Xiang Xiao 6f6fce95a2 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Xiang Xiao fa8719bb5a Replace all strcat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 09:57:01 +02:00
Lucas Saavedra Vaz 8b9dc54a0a drivers/audio: Add support for the ES8311 codec
Adds support for the ES8311 audio codec by Everest Semiconductor on NuttX. Both output and input are supported.
2023-05-04 18:41:54 -03:00
Lucas Saavedra Vaz d82d73c660 audio: Separate common settings for the ESXXXX family of products
To avoid code duplication, the common settings for Everest Semiconductor's codecs were separated in an "esxxxx_common" header
2023-05-04 18:41:54 -03:00
Lucas Saavedra Vaz a5a3b919a0 audio: Add i2s_getmclkfrequency function
Rename i2s_mclkfrequency to i2s_setmclkfrequency and add i2s_getmclkfrequency for getting the current MCLK frequency from the I2S interface
2023-05-04 18:41:54 -03:00
Xiang Xiao a514c0a13e mtd/nand: Implement isbad and markbad callback
these new callbacks are added by:
https://github.com/apache/nuttx/pull/8683

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-03 17:40:18 +03:00
Xiang Xiao 3e1ddb3de9 mtd/nand: Return -EUCLEAN when the bit error happen but fixed by ecc
follow how Linux report the correction information from ecc:
http://www.infradead.org/pipermail/linux-mtd/2012-March/040305.html
since this information is very useful to file system(e.g. yaffs, ubi/buifs)
which is specially designed for nand flash.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-03 17:40:18 +03:00
Xiang Xiao 7a725019bc mtd/nand: Add nand_raw_initialize to skip the probing
Since not all nand devices follow ONFI spec, nand_raw_initialize could be used to skip ONFI special action

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-02 15:02:38 +02:00
Xiang Xiao b4814811f5 mtd/nand: Implement MTDIOC_ERASESECTORS ioctl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-02 12:15:56 +02:00
Xiang Xiao 3fc882df9e mtd/nand: Implement MTDIOC_ERASESTATE ioctl
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-02 12:15:56 +02:00
Xiang Xiao 3c54e66683 mtd/nand: Fix the comment and remove the uneeded inclusion
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-01 22:47:00 +03:00
Xiang Xiao 25a1191763 mtd/nand: Correct the check of erasing bad blocks
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-01 22:47:00 +03:00
Xiang Xiao c1680d2f03 mtd/nand: Call nandmodel_getdevpagesize directly to get the page number
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-01 22:47:00 +03:00
Michal Lenc 02aa7bcefe mtd: add support for MTDIOC_ERASESECTORS ioctl
Current driver supports MTDIOC_BULKERASE ioctl that erases the entire
device. The added ioctl MTDIOC_ERASESECTORS adds possibility to erase
just sectors defined by the user.

This is similar to MEMERASE call in Linux kernel.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2023-04-29 21:23:08 +08:00
anjiahao 0c9ca52f37 tty:support tty c_cc VMIN & VTIME
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-29 13:48:52 +08:00
Huang Qi 9de449c8b6 drivers/telnet: Refused to enter character mode
Refuse SGA to work in line mode, it's OK for modern rich featured telnet clients.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-04-28 13:44:51 +03:00
Masayuki Ishikawa 8355ab9070 drivers: wireless: Fix mtu info for gs2200m
Summary:
- I noticed that mtu info with ifconfig shows incorrect size.
- This commit fixes this issue.

Impact:
- None

Testing:
- Tested with spresense:wifi_smp

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-28 18:25:37 +08:00
Tiago Medicci Serrano d4e7fe55c7 drivers/pipe: fix blocking file_pipe
Similar to the fix introduced by
4d6a8663fa, it's necessary to set
one end of the file_pipe as non-blocking temporarily while opening
the other end to avoid it blocking unexpectedily.
2023-04-28 09:42:17 +08:00
chao an 507c8145a9 sched/spawn: remove spawn proxy thread to simplify task/posix_spawn()
The spawn proxy thread is a special existence in NuttX, usually some developers
spend a lot of time on stack overflow of spawn proxy thread:

https://github.com/apache/nuttx/issues/9046
https://github.com/apache/nuttx/pull/9081

In order to avoid similar issues, this PR will remove spawn proxy thread to simplify
the process of task/posix_spawn().

1. Postpone the related processing of spawn file actions until after task_init()
2. Delete the temporary thread of spawn proxy and related global variables

Signed-off-by: chao an <anchao@xiaomi.com>
2023-04-27 17:35:58 +08:00
SPRESENSE 307839ab6d drivers/spi/spi_bitbang: Add private data on spi_bitbang
Add private data for spi_bitbang low-level driver to add an instance
specific private data.
And add spi_destroy_bitbang() to clean up a driver instance.
2023-04-27 17:06:14 +08:00
SPRESENSE e542ef9175 drivers/video: Support spot position setting
Add new control id V4L2_CID_EXPOSURE_METERING_SPOT_POSITION
to support spot position setting in spot exposure metering.
2023-04-27 17:05:32 +08:00
Radek Pesina 3ba792cb52 Fix missing instantiation of return value in rwb_mediaremoved. 2023-04-27 17:03:25 +08:00
Lucas Saavedra Vaz 506b57eebf drivers/lcd/st7789: Add color inversion 2023-04-27 02:18:32 +08:00
SPRESENSE 93a1adf83e drivers/spi/spi_bitbang: Fix build warnings
Fix build warnings of spi_bitbang.c
2023-04-26 11:51:31 +02:00
pengyiqiang 0939634b42 video/fb: fix pollnotify calling crash in advance
When executing up_fbinitialize, the driver may turn on the vsync interrupt. If the vsync interrupt calls fb_pollnotify before executing fb->vtable->priv = fb it will cause null pointer access and crash.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-04-26 11:51:21 +02:00
Radek Pesina 50a8ec62c4 Add eMMC driver support
- Fix DMA addressing issues within litex_sendsetup/litex_recvsetup
- Extend with handling specific to eMMC commands during init & use.
- Cleanup of 4-bit BUS handling for SD and eMMC
- For eMMC, Send CMD0 during init as per JEDEC v4.41 for pre-idle
2023-04-26 00:34:36 -04:00
Masayuki Ishikawa 8c89052fb3 drivers/net, include/nuttx/net: Add AR8031 PHY
Summary:
- This commit adds AR8031 PHY definitions

Impact:
- None

Testing:
- Tested with sabre-6quad:netnsh_ar8031 (will be added later)

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-04-25 11:45:19 +08:00
Xiang Xiao dd631265c4 fs: Add g_ prefix for all global mountpt_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
Xiang Xiao 51dc67ad5f fs: Add g_ prefix for all global file_operations instances
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
TimJTi 4719e44b8b APDS9922
WIP

WIP - ALS now OK with full IOCTL.

WIP

WIP

ALS now works as intended

WIP - getting to bottom of crash when ctrl-c the app

Seems to all work...

ioctl #define changes

Update ioctl.h

Maybe final changes

Maybe final changes - again

Delete .settings directory

Delete nuttx Default.launch

Maybe final changes - again

changes after initial feedback

changes after initial feedback

Add snerr error when incorrect device ID seen

Update apds9922.c

Revert "Merge branch 'apds9922' of https://github.com/TimJTi/nuttx into apds9922"

This reverts commit 8fdf5cbfb783d25251d13bc338ece6adca1308bc, reversing
changes made to 0d58237ba27f3cf87cf711658f5388d974be502e.

Improve probe error messages

APDS9922

WIP

WIP - ALS now OK with full IOCTL.

WIP

WIP

ALS now works as intended

WIP - getting to bottom of crash when ctrl-c the app

Seems to all work...

ioctl #define changes

Update ioctl.h

Maybe final changes

Maybe final changes - again

Delete .settings directory

Delete nuttx Default.launch

Maybe final changes - again

changes after initial feedback

changes after initial feedback

Add snerr error when incorrect device ID seen

Update apds9922.c

Revert "Merge branch 'apds9922' of https://github.com/TimJTi/nuttx into apds9922"

This reverts commit 8fdf5cbfb783d25251d13bc338ece6adca1308bc, reversing
changes made to 0d58237ba27f3cf87cf711658f5388d974be502e.

Improve probe error messages

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Update drivers/sensors/apds9922.c

Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>

Delete .gitignore

Changes after PR review

Remove static arrays from header file

Update apds9922.c

improvements to enum usage

Restore .gitignore

Update Kconfig

Update .gitignore

Update .gitignore
2023-04-22 20:38:29 +08:00
zouboan 9bc3a9e4bb drivers/mpu60x0 Fix the error when mpu60x0 in SPI case 2023-04-22 20:38:21 +08:00
Xiang Xiao c6d210289f procfs: remove procfs_ from procfs_operations variables
to aglin the naming style with other implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
Xiang Xiao 149cafe450 procfs: Add g_ prefix to all procfs_operations
to conform the coding style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
rongyichang e6490694a1 drivers/video: passthrough unknown ioctl commands for customized scenarios in fb
driver

Signed-off-by: rongyichang <rongyichang@xiaomi.com>
2023-04-22 12:48:46 +08:00
ZhongAn 7eeba71366 audio: add audio_dma device driver.
Signed-off-by: ZhongAn <zhongan@pinecone.net>
2023-04-22 01:50:51 +08:00
Zhe Weng 60e66d5e29 net/netdev: Support dedicated thread in upper half driver
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-22 01:41:01 +08:00
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