Commit Graph

43805 Commits

Author SHA1 Message Date
anjiahao 2c9093ad9d mq_open: add long file name check and parameter check
N/A

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: I2d2c78e4477b4a6af13e51b79f24e8fd1794d291
2021-10-19 03:14:01 +08:00
raiden00pl 4ad06bc4ed drivers/sensors: add an upper half 3-phase Hall effect sensor driver
Change-Id: Ic8ea4c8defba54e6e288424b8ef02919dd5f10f2
2021-10-19 02:45:19 +08:00
YAMAMOTO Takashi a88aa01dd8 Revert "arch: Replace ar and nm with gcc-ar and gcc-nm"
This reverts commit b05737d78f.

Because it broke clang-based builds.

Change-Id: Icc97d325adacfc58198b082538f3db2d02ba9a90
2021-10-19 02:45:19 +08:00
ligd a498995a30 rpmgs_socket: set RPMSG_SOCKET_NAME_SIZE to 16 for handing prefix
Change-Id: I88dbb6a47f3ea8fc186f52c5966ff0dd4dd12b5b
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-10-18 23:36:14 +08:00
ligd c248a5c3ef local_socket: recv should return 0 NOT -ECONNRESET if remote closed
ref:
https://man7.org/linux/man-pages/man2/recv.2.html

Change-Id: Ic6f2d289eed7599d15049354b6bdb853ebc3834d
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-10-18 23:36:14 +08:00
liuhaitao 8637e2a550 Merge remote-tracking branch 'remotes/mirtos/dev-nuttx-10.1-20210927' into dev
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: If5a0166dbc7c9a595db9b7758cbacaf6af278d5d
2021-10-18 22:12:06 +08:00
ligd 5e47a24aba local_socket: set lc_peer when accept() instead of connect()
Change-Id: I878fb7c3dc165c1a0d969955cae818ecbcff155d
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-10-18 21:49:14 +08:00
Jiuzhu Dong e6dcc66bbe cpuload: fix crash because of the member of g_pidhash is NULL
Change-Id: Icaa49b33845d1aa2ecd20639409738d1a353308c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-18 20:43:37 +08:00
liuhaitao 7b3cb624e9 build.sh: correct typo errors
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I3ebeb6535c1661bc8d87e24dc872dcbc285ddfcd
2021-10-18 20:18:28 +08:00
zhuyanlin ca09f78003 arch:xtens:mpu: modify acc and memtype to uint32_t
The uint8_t and uint16_t will overflow in MPU_ENTRY_AR marco.

Change-Id: I2f660c13740fea725a076f7f208214aedc5ca0ee
2021-10-18 19:45:15 +08:00
Xiang Xiao 1fb1a77214 sched: Check g_pidhash[hash_ndx] isn't NULL before access pid field in nxsched_get_tcb
Fix the regression by commit:
commit 8b67944c75
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Thu Oct 14 11:03:07 2021 +0800

    sched: Remove pidhash_s and move ticks to tcb_s

    simplify the code logic and reduce memory a little bit

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ieca31cf486d519cde67c28279b815df894ec468b
2021-10-18 16:52:23 +08:00
Xiang Xiao ece151f20d sdio: Update the defintion to the latest spec
and correct the comment:
https://www.sdcard.org/downloads/pls/
https://www.jedec.org/standards-documents/technology-focus-areas/flash-memory-ssds-ufs-emmc/e-mmc

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-18 15:11:06 +08:00
Xiang Xiao 1f0383ab86 sched: Remove pidhash_s and move ticks to tcb_s
simplify the code logic and reduce memory a little bit

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I3824bfb634235bd0e2daad098ce5908201abd8c1
2021-10-18 14:32:30 +08:00
xiatian6 aaf9d3c760 fix: sensor: add factory test driver for ak09919c.
CHAMPION-139

Add read id and selftest interface in ioctl, it will
be called in the factory test. Fix some bugs in driver.

Change-Id: Ie57a78ec2c2fee65efdb5f8bd7073f9a8c788bb8
Signed-off-by: xiatian6 <xiatian6@xiaomi.com>
2021-10-18 13:50:16 +08:00
anjiahao b82c943d92 fix time_t overflow
VELAPLATFO-442

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: I93d2b9bb4e3e7c3a595a688becc3fa08b61b8c91
2021-10-18 11:39:45 +08:00
Abdelatif Guettouche a2cea014d3 xtensa_dumpstate.c: Fix the name of the TCB variable when dumping the
backtrace.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-10-14 18:30:27 +08:00
anjiahao 6bcd83eb04 time:follow POSIX use long to define time_t
MIRTOS-883
https: //man7.org/linux/man-pages/man3/clock_settime.3.html
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: If573ad33b1ff61d5549e476b191309d4d4024801
2021-10-14 15:02:55 +08:00
Jiuzhu Dong 725f98bb06 exfat: optimize and fix compile warnring
Change-Id: I86f037e6929aacc9e4dffd3a88bf3abc90932a12
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-13 14:29:36 +08:00
Jiuzhu Dong 2d3fc26cf3 i2c/bitbang: fix compile break when enable CONFIG_I2C_BITBANG_NO_DELAY
Change-Id: Ib99eb754601a995564ddf9da071e7b0cc0e2a110
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-13 10:38:23 +08:00
liucheng5 9c792338de fix: sensor: add 3 sensor types to sensor.c
CHAMPION-147

Three sensor types (ecg, ppg and impd) had been added in sensor.h(http://git.xiaomi.com/c/miot/mirtos/nuttx/+/813239), while they had not been added to sensor.c, causing that a sensor of these 3 types can't be registered. This fixes it.

Change-Id: I313b9bdc621d91b0ff934ca8322270fd6552948b
Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2021-10-12 19:22:49 +08:00
Xiang Xiao 0def56d17f power/polaris: Replace ops and batsem with dev
and remove the batsem initialization since it is arleady done in common code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I6561eb53f3211edae8f699fbf9d7625689ee581c
2021-10-11 19:34:08 +08:00
Xiang Xiao 1158068ade libc/vsprintf_internal: Call va_copy just like vsyslog
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I96cf364d9a6d438bcca4bf01f1a56c6cc172d19c
2021-10-11 12:04:38 +08:00
Xiang Xiao 7a017b5be0 lib/vasprintf: Shouldn't call va_end(ap) to avoid the double free
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I20e10803e7923fbbd8b5fdccca1fdb4c9d090434
2021-10-11 12:04:38 +08:00
Xiang Xiao cbb0f3483a audio/comp: Call va_start again instead of va_copy
since va_copy mayn't exist on all arch

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I4860b6c09cd20f93115bc73b4a4845af28a5ed86
2021-10-11 12:04:38 +08:00
genghuihui 7731367027 fix: update aw88266a lib
CHAMPION-140

update aw88266a lib of stable version

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
Change-Id: Ia426c3d895d3bb1b1bdf8a187bdc5a017be0ffe5
2021-10-11 11:08:04 +08:00
Xiang Xiao b8e99cf12f arch/arm: Remove -march and -mtune
since -mcpu is enough https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58869

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-10-09 15:57:53 +08:00
ligd b6e357eccf socket_rpmsg: support SOCK_SEQPACKET
Change-Id: Ib7d80210285386cb10de35400b3cd6d2854f5503
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-10-09 15:31:36 +08:00
chao.an 43fa44cd2a arch/sim/bluetooth: remove depends if native host stack
Change-Id: Icc4f5e88ac43e0ea14bd0b4ea4b86cb50f773b61
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-10-09 15:26:26 +08:00
anjiahao 1f37c8c3b4 battery_monitor:add poll support
N/A

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: Iefe3e632e98963c0e873d6266aacc3f687a77164
2021-10-09 15:25:22 +08:00
Jiuzhu Dong 4a7cdc93c3 net: always compile listen.c and accept.c when enable CONFIG_NET
N/A

Change-Id: Iefb46bac2c7322b44b8b1ae410db66d072703351
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-10-09 12:15:06 +08:00
anjiahao 924eee1e77 battery_gauge:add poll support
N/A

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: Id6363d9573176f4a922a31bcf6f4d770600826b8
2021-10-09 11:27:33 +08:00
zhangguoliang e6d84fccc9 feat: charge: initialize rx charger stwlc38 driver
CHAMPION-25

Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
Change-Id: Ifa5732ae2160d4bc083f9aaf4e3beb34096b7770
2021-10-09 11:17:18 +08:00
liushuai25 7df6d25fc3 fix: driver: modify some fields and comments
CHAMPION-91

change FBIOPAN_DISPLAY IOCTL command to _FBIOC(0x0016).
change  xoffest to xoffset in fb_planeinfo_s.
modify comments for xoffset and yoffset in fb_planeinfo_s.
add comment for pandisplay interface.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
Change-Id: Idb7805dd9691b849f19e3d7010bcfabbaa48797b
2021-10-08 16:23:57 +08:00
anjiahao a7f50294a5 battery_charger:add poll support
N/A

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Change-Id: I761c4f6d1cd9e6edbf14f6e026a5c3337bdf8134
2021-10-08 14:58:21 +08:00
liuhuan 4987e17e9a power: Open CONFIG_PM compilation failed
CHAMPION-144

include debug.h

Change-Id: I12b0c5a2d5e41178a4f158ce0de8393bae0ee26d
Signed-off-by: liuhuan <liuhuan16@xiaomi.com>
2021-09-30 16:16:51 +08:00
Xiang Xiao 3394b87f25 fs/partition: Make read_partition_block callable outside ptable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I42d036116783b7a08af6eb8a8f82905c485b7f91
2021-09-30 13:21:28 +08:00
chenhonglin 1b6104200a sched/sched: Updata out-of-data comment about SMP CPU affinity issue
THOR-208

As before commit 070ad15f14 and 1621fcb09e
Fix issue about CPU affinity, But these two comments don't
update comment. Github version updated that. So sync it.

Signed-off-by: chenhonglin <chenhonglin@xiaomi.com>
Change-Id: Ie5abf10893e66334d3dd9939bd85f2a40741a2c5
2021-09-29 18:26:21 +08:00
Xiang Xiao 8c2a40f864 power/battery: Move the enumurate to the common place
so the userspace program can handle the different battery driver equally

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ib00bb6bd6c543c01cb0ed03bc631ec8337720528
2021-09-29 17:33:23 +08:00
yinshengkai c40a7eb930 tool: add code coverage tool
N/A

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
Change-Id: I9388a08565508383e53b418696c14ae286b172ce
2021-09-29 16:34:00 +08:00
Jiuzhu Dong 959f5496de driver/sensor: support sensor_ops: selftest
Change-Id: I9aaadd2d6a61aed8212f2a88c507caeeb433c360
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-29 15:28:39 +08:00
Jiuzhu Dong 8ad2be7915 driver/power: using upper-half structure directly in the lower-half structure.
N/A

Change-Id: I29da755e303191788cb79ddb6972045a5c368c83
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-29 14:01:34 +08:00
Jiuzhu Dong cd9f115550 wd_start: use sclock_t type replace int
MIRTOS-1055

when enable SYSTEM_TIME64, tick may exceed the int32 range
example:
pthread_cond_clockwait
        ---->clock_abstime2ticks
                    ---->wd_start

Change-Id: Id6b8f9e92cbcad285c8fa684a73b7d75a8ccfebc
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-29 10:24:28 +08:00
ligd d5e4ed61ea rpmsg_socket: move rpmsg_send out of lock
Change-Id: I19a4d12979016de7bb254c4bd0309c80ce339769
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-09-28 14:17:42 +08:00
ligd c0ffee0728 mm: do kmm_checkcorruption in IRQ when TCB_FLAG_DEBUG_CHECK set
Change-Id: Iad5dc7e0aa07a854f64b79b6e3eae57c4112a998
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-09-28 12:36:05 +08:00
ligd caee5581c2 sem: remove limitation of irq context when do sem_trywait
Change-Id: I818c349d9396743877e99c5b04fc7265750a5ec3
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-09-28 12:36:05 +08:00
Huang Qi b897d4a2d6 sched/signal: Correct kill with cancellation
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I450041e9ec297ba4a9028cb5b1af8158e09fc90b
2021-09-28 09:27:53 +08:00
chao.an f2e15a47de net/local: set the filep to peer on stream mode
Change-Id: I2e0b8f31bcd3c1c238f1b18456416678d5deae1e
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-27 17:03:46 +08:00
zhuyanlin 758c042b01 sched:tcb_s:rearrange sched_priority/int_priority to word align
As pid_t is uint16_t,this could save space for many archs.

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2021-09-27 15:07:47 +08:00
zhuyanlin 7401411e13 tool: checkstack: add xtensa support
N/A

Change-Id: Ic06fc91f237319709705dc4ee79141ff47801ca4
2021-09-27 15:07:43 +08:00
zhuyanlin 147dc1a58b fs:procfs: add waiting_paging_fill state names
Follow task_state in tcb_s.

Change-Id: I0d3b3335d4f9ad772f3feee75d0138b9b9fb1ce2
2021-09-27 15:07:38 +08:00