Commit graph

5511 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
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
liuhaitao
999fe1f9f8 Merge remote-tracking branch 'mirtos/master' into dev
Last commit id:
commit 649f99ce30 (mirtos/master)
Author: FASTSHIFT <vifextech@foxmail.com>
Date:   Wed Sep 22 15:38:43 2021 +0800

    libc/misc: add lib_glob.

    Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I2f584a4432f835c661e3c02cf7324d5e92e9c738
2021-09-26 21:59:56 +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
FASTSHIFT
649f99ce30 libc/misc: add lib_glob.
Signed-off-by: FASTSHIFT <vifextech@foxmail.com>
2021-09-25 07:54:39 -03:00
zhuyanlin
a41f92d1f6 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-23 23:08:51 -07:00
chao.an
c132e5bed4 net/tcp: sanity check for the listen address
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-23 23:07:57 -07:00
futerigele
5a62cff0e5 feat: touch: bring up novatek nt38350 touch panel
CHAMPION-95

bring up novatek nt38350 touch panel

Change-Id: Ia890518620a00df0bd9e51aface1bb019034ec94
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-09-23 11:18:47 +08:00
FASTSHIFT
f3477a86d2 libc/string: add lib_strchrnul. 2021-09-22 09:20:06 -03:00
Alexander Lunev
eafe6e50ac net/devif/devif_callback.c: corrected the connection event list to work as FIFO instead of LIFO.
In case of enabled packet forwarding mode, packets were forwarded in a reverse order
because of LIFO behavior of the connection event list.
The issue exposed only during high network traffic. Thus the event list started to grow
that resulted in changing the order of packets inside of groups of several packets
like the following: 3, 2, 1, 6, 5, 4, 8, 7 etc.

Remarks concerning the connection event list implementation:
* Now the queue (list) is FIFO as it should be.
* The list is singly linked.
* The list has a head pointer (inside of outer net_driver_s structure),
  and a tail pointer is added into outer net_driver_s structure.
* The list item is devif_callback_s structure.
  It still has two pointers to two different list chains (*nxtconn and *nxtdev).
* As before the first argument (*dev) of the list functions can be NULL,
  while the other argument (*list) is effective (not NULL).
* An extra (*tail) argument is added to devif_callback_alloc()
  and devif_conn_callback_free() functions.
* devif_callback_alloc() time complexity is O(1) (i.e. O(n) to fill the whole list).
* devif_callback_free() time complexity is O(n) (i.e. O(n^2) to empty the whole list).
* devif_conn_event() time complexity is O(n).

Change-Id: I1123657f9a591b29f2a7546691d58dff58896a18
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-22 19:30:52 +08:00
zhangguoliang
a87fbef0f1 feat: charge: initialize pump charger sc8551a driver
CHAMPION-25

Change-Id: I32bf77d04fc5c67f52dcc7ec8081a3feb4b08795
Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
2021-09-22 19:13:02 +08:00
zhangguoliang
888ea2ae84 fix: charger: change the operations of battery ioctl to common
Almost all charger chip need the same oprations, which was not
appropriate only for BQ2429X. Therefore, open the operations to
all charger chips.

Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
Change-Id: Iac5653eab68e551391537d6b5c2a18004a8023fe
2021-09-22 09:01:41 +00:00
weizhifang
d6a798ebf2 feature: charge: modify battery_gauge code
CHAMPION-137

1.add temperature and current ioctl api

Signed-off-by: weizhifang <weizhifang@xiaomi.com>
Change-Id: I958f37aa385d942b24a44c696a7b8d5c45d3b9c5
2021-09-22 09:36:15 +08:00
weizhifang
9391f43482 feature: charge: add battery gauge cw2218 driver
CHAMPION-137

1.add cw2218 driver code

Signed-off-by: weizhifang <weizhifang@xiaomi.com>
Change-Id: I32bdb045fdddf976b0643b064b892b6092109f2a
2021-09-22 09:35:55 +08:00
iceaway
beba1056a8 userleds: add missing include (stdbool.h)
Would not compile without stdbool.h included (uses the bool type in
the header file)
2021-09-20 02:01:47 -07:00
Alexander Lunev
36fbedcbfc net/devif/devif_callback.c: corrected the connection event list to work as FIFO instead of LIFO.
In case of enabled packet forwarding mode, packets were forwarded in a reverse order
because of LIFO behavior of the connection event list.
The issue exposed only during high network traffic. Thus the event list started to grow
that resulted in changing the order of packets inside of groups of several packets
like the following: 3, 2, 1, 6, 5, 4, 8, 7 etc.

Remarks concerning the connection event list implementation:
* Now the queue (list) is FIFO as it should be.
* The list is singly linked.
* The list has a head pointer (inside of outer net_driver_s structure),
  and a tail pointer is added into outer net_driver_s structure.
* The list item is devif_callback_s structure.
  It still has two pointers to two different list chains (*nxtconn and *nxtdev).
* As before the first argument (*dev) of the list functions can be NULL,
  while the other argument (*list) is effective (not NULL).
* An extra (*tail) argument is added to devif_callback_alloc()
  and devif_conn_callback_free() functions.
* devif_callback_alloc() time complexity is O(1) (i.e. O(n) to fill the whole list).
* devif_callback_free() time complexity is O(n) (i.e. O(n^2) to empty the whole list).
* devif_conn_event() time complexity is O(n).
2021-09-18 21:01:39 -05:00
liangdongdong
af949ba40d feature: bsp: add bq25618 driver
CHAMPION-105

Signed-off-by: liangdongdong<liangdongdong@xiaomi.com>
Change-Id: I061f297e7a65137b610f6fe4edc0305bf86934b9
2021-09-18 18:46:22 +08:00
Alin Jerpelea
48f92e6f1d author: Bill Gatliff : update licenses to Apache
Gregory Nutt has submitted the SGA
Bill Gatliff has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-16 21:56:08 -05:00
Abdelatif Guettouche
3b2aea204c sched/irq/irq_csection.c: Fix typos and correct some comments.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-16 10:53:51 -05:00
Peter Bee
a5406c63cb drivers/lcd: Add GC9A01 driver and refine ST7735
Added custom resolution, offset and BGR mode for ST7735 driver
Added GC9A01 driver (based on ST7789 driver)

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2021-09-16 08:39:35 -03:00
Alin Jerpelea
49667a230e include: author: Hexagon AB: update licenses to Apache
Hexagon AB has submitted the SGA
as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-15 18:19:42 +08:00
SPRESENSE
ebd736240e drivers/video: Replace error output macro to verr
Add video debug macros verr/vwarn/vinfo, and replace error output macro to verr.
2021-09-15 07:06:35 +02:00
SPRESENSE
74df4b70b3 drivers: video: Rearchitect video driver
Rearchitect video driver:
- Define two video I/F(struct imgsensor_ops_s and struct imgdata_ops_s),
  and support them.
- CISIF driver supports new video I/F struct imgdata_ops_s.
- ISX012 driver supports new video I/F struct imgsensor_ops_s.
- Move ISX012 driver to general driver directory.
2021-09-15 07:06:35 +02:00
chao.an
e8d7779ab1 sys/socket/scm: add more socket message control helper
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-15 12:04:01 +08:00
Abdelatif Guettouche
20d34cce98 sched/irq_section.c: irq_waitlock is a private function; remove its
prototype from irq.h and define it as static.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-15 06:20:59 +09:00
liushuai25
fdcd1228b2 feature: driver: add interface for lcd dev driver
add get and set framerate interface for lcd dev driver.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2021-09-13 18:18:27 -03:00
liushuai25
3183251de0 feature: driver: add interface for fb driver
add get and set panel power interface for fb driver.
add get and set framerate interface for fb driver.
add panel information at videoinfo for fb driver.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2021-09-13 18:18:27 -03:00
Alin Jerpelea
bb54ed4227 author: OffCode Ltd : update licenses to Apache
OffCode Ltd has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-09-13 22:43:36 +08:00
Jiuzhu Dong
6df9d1907c fs/ioctl: using FIOC_FILEPATH instead of FIOC_FILENAME.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-13 08:56:10 +08:00
Jiuzhu Dong
dfb4b6e3d8 lib_vsprintf: Add %pV format support
test case:
void test(const char *fmt, ...)
{
  struct va_format vaf;
  va_list ap;

  va_start(ap, fmt);
  vaf.fmt = fmt;
  vaf.va = &ap;
  printf("func:%s, %pV, line:%d\n", __func__, &vaf, __LINE__);
  va_end(ap);
}

int main(int argc, FAR char *argv[])
{
  char str[] = "Hello Boy and Girl!";
  int count = 10;

  test("%s %d", str, count);
  return 0;
}

>> test
func:test, Hello Boy and Girl! 10, line:49

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:46 +08:00
Jiuzhu Dong
2438403f23 libc/rexec/rexec_af: support remote execution
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 21:14:06 +08:00
Jiuzhu Dong
d8ea482b58 errno: use staic errno to replace tl_errno before tls initialization
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:48:31 +08:00
Jiuzhu Dong
c9c284089f debug: allow customize EXTRA_FMT
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-12 11:33:20 +08:00
Abdelatif Guettouche
083272ad92 spinlock.h: In single CPU case force the lock passed to
spin_lock_irqsave to be unused in the macro to avoid spreading
UNUSED() or void throughout the code base.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-09-11 23:24:32 +09:00