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
anjiahao
ee94d58051
littlefs:fix rmdir can remove a file
...
MIRTOS-889
Signed-off-by: anjiahao <anjiahao@xiaomi.com >
Change-Id: I0cf6962f0f5c1fdbe4678918560d45d6c8acc681
2021-09-27 14:22:26 +08:00
songnannan
5766096fe8
feature: sensor: add lps27hhw baro sensor driver.
...
CHAMPION-96
Add lps27hhw baro sensor driver to sensor drivers.
Change-Id: I0b1c9809eef13b564166621961c1679ed8de415b
Signed-off-by: songnannan <songnannan@xiaomi.com >
2021-09-27 10:51:00 +08:00
chenhonglin
070ad15f14
sched/sched_setpriority.c: Fix CPU affinity issues in SMP
...
THOR-208
In "nxsched_nexttcb": the task may not running on this_cpu,
and rtrtcb->affinity(the affinity of the task in g_readytorun)
may not include the current cpu which should be the tcb->cpu.
Signed-off-by: chenhonglin <chenhonglin@xiaomi.com >
Change-Id: I2523c9431b480a3afeb29a9260804c5b37e91d4b
2021-09-27 10:13:37 +08:00
chenhonglin
1621fcb09e
sched/sched/remove_readytorun.c: Fix CPU affinity issues in SMP
...
THOR-208
In "nxsched_remove_readytorun":
the logical may choose the head of g_readytorun(the greatest priority)
task as the next while ignoring the cpu affinity of it.
Signed-off-by: chenhonglin <chenhonglin@xiaomi.com >
Change-Id: I819dd6f3fc0feff4e378cfda2a6c581814065cb3
2021-09-27 10:13:24 +08:00
liushuai25
7f3456de09
feat: driver: support double buffer for display
...
CHAMPION-91
add pan display for fb driver.
reference links:
https://github.com/torvalds/linux/blob/master/drivers/video/fbdev/core/fbmem.c
https://github.com/torvalds/linux/blob/master/drivers/video/fbdev/goldfishfb.c
Signed-off-by: liushuai25 <liushuai25@xiaomi.com >
Change-Id: If322cab9be2784e42f84060f8e94f52757c0dd8a
2021-09-27 09:53:35 +08:00
futerigele
ea1e5c3d2c
feat: touch: add nt38350 selftest
...
CHAMPION-95
add nt38350 selftest
Change-Id: I15cbaf04f9dc9131b4e661cd29e56d5bece6b4db
Signed-off-by: futerigele <futerigele@xiaomi.com >
2021-09-26 17:09:40 +08:00
zhangguoliang
4fc0e71ba6
fix: charge: initialize pump charger sc8551a driver
...
CHAMPION-25
fix commit miss to delete the config of battery fuel gauge CW2218
Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com >
Change-Id: I2b6fdfcdc8d3ce35a91defe9fa6a5d76681d5f8b
2021-09-24 11:19:29 +08:00
chao.an
c03abd35bf
arch/sim/naming: add getsockname/getpeername into naming list
...
Change-Id: I2e9c9dd2295f9f09e3e400729f5c5d06fbeeeb48
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-09-23 19:49:21 +08:00
chao.an
c4fcd68c9b
arch/sim/usrsock: correct the address length
...
Change-Id: I1ed880b0d531b86d2f91fd0b6153a5f641ec6313
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-09-23 19:47:47 +08:00
chao.an
538ef4f6d5
net/tcp: sanity check for the listen address
...
Change-Id: Idb6ce5b5cc22aa3b2586bcf1c0abe0268f136b51
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-09-23 15:57:55 +08:00
liangdongdong
95983c6e48
feature: bsp: optimize bq25618 driver function
...
CHAMPION-105
Signed-off-by: liangdongdong<liangdongdong@xiaomi.com >
Change-Id: Iafa079c12a9ec385a3cd8c7c53fd31a0960b25da
2021-09-23 15:45:15 +08:00
chao.an
3c67a53f7d
net/local: add socket message control support
...
Change-Id: I95350fdff292dbf1b4132f7a98a6454068ef6173
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-09-23 11:31:58 +08:00