Commit Graph

5202 Commits

Author SHA1 Message Date
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
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