Commit graph

5374 commits

Author SHA1 Message Date
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
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
Jiuzhu Dong
aa1c65a364 errno: use staic errno to replace tl_errno before tls initialization
Change-Id: I44a53b2f5cdb3f4e6c755e5663867cd74361bc7c
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-09 21:18:32 +08:00
liushuai25
00d49aa9c2 feature: driver: add interface for fb driver
CHAMPION-99

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>
Change-Id: I4121411280027b12e7ab68c56a68d1efbbcc7641
2021-09-09 20:31:28 +08:00
liushuai25
193e898b51 feature: driver: add interface for lcd dev driver
CHAMPION-100

add get and set framerate interface for lcd dev driver.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
Change-Id: I42584fa2adde9783fac9ac31bfe0b29b426a82e1
2021-09-09 20:28:58 +08:00
chao.an
1d52c08bdd sys/socket/scm: add more socket message control helper
Change-Id: I051e82f1722d092b62f1ff52a6492a91191cfe25
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-09-02 22:46:41 +08:00
futerigele
e3b87ea0aa feat: touch: add io command for touch firmware version
CHAMPION-53

add io command for touch firmware version

Change-Id: I777285d2343b32ffd9caef2fc746fe491c5890d7
Signed-off-by: futerigele <futerigele@xiaomi.com>
2021-08-31 20:18:35 +08:00
Jiuzhu Dong
40380c117c fs/ioctl: using FIOC_FILEPATH instead of FIOC_FILENAME.
Change-Id: Ib285455a251bd3c475e8ff402936070da209eb67
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 19:17:20 +08:00
Jiuzhu Dong
4743c089d0 libc/rexec: support remote execution
Change-Id: I0f61326081f87d9bdf7234088f352328b8828adb
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-31 10:19:09 +08:00
zhuyanlin
46a93b5045 stddef: Let offset be defined from toolchain
Let `offset` could be defined from toolchain,
Which will be usefull for fixed code project.
2021-08-28 09:39:32 +08:00
Xiang Xiao
2659ab121f fs: Remove magic field from partition_info_s
since it is wrong and impossible to return file
system magic number from the block or mtd layer.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-28 09:26:22 +08:00
Jiuzhu Dong
7561882938 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

Change-Id: I6d97515dce3f10a880145a1ff7fcba5e9cbebd37
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-27 11:08:48 +08:00
pengyiqiang
b8f12c357f libc/misc: add lib_glob.
N/A

Change-Id: I1bace79c4c580e3a7e84aaf37e7963f789a896ef
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2021-08-26 16:57:07 +08:00
pengyiqiang
01cbfec897 libc/string: fix lib_strchrnul warning.
N/A

Change-Id: I4661a42923b7e2f59155c734cba2131bddb94211
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2021-08-25 15:08:37 +08:00
Jiuzhu Dong
2862e57495 debug: allow customize EXTRA_FMT
Change-Id: I8c74871fa841584f31ba4873d0adf639e49eafd9
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-24 12:26:19 +08:00
chao.an
93bd61a0e8 nuttx/up_backtrace: add up_backtrace interface
Change-Id: Ic056d679ae68a579b94a75dd05abbe390f7c7a4f
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-23 12:08:43 +08:00
Jiuzhu Dong
b3cb28a9ae fs: support exfat filesystem
VELAPLATFO-15

Change-Id: I222cc45cec45018db26f7e0d1551d6e84285b739
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-20 22:14:46 +08:00
chao.an
7f192ca255 sched/backtrace: add sched_backtrace support
Change-Id: Ia764cf54dfa215b313f9d5f1a060aac18d765982
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-18 19:36:38 +08:00
chao.an
db06f769ff libs/libc: move the backtrace implement to sched
1. move the backtrace implement to sched
2. rename CONFIG_UNWINDER to CONFIG_SCHED_BACKTRACE

Change-Id: I8176727602bfc695184b88210a3aaf90c6acaac7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-18 19:36:23 +08:00
Xiang Xiao
c906f1d482 fs: Add model field to geometry and mtd_geometry_s
the model is very to track the device info

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-18 18:37:51 +08:00
liucheng5
4a38b651c6 Feature: Sensor: Add new sensor types
N/A

New sensor types ECG(25), PPG(26), impedance(27), and their event types are added to sensor.h.

Change-Id: I2a2558e744b777178c4bf49505a92021595eb150
Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2021-08-17 15:56:29 +08:00
liucheng5
7feeda8882 Feature: Sensor: Add sensor driver for MAX86178
CHAMPION-51

Add a driver for the Maxim MAX86178 vital-sign AFE, used for ECG and PPG measurements.

Change-Id: Iae10315abf9d1889af5257495da64c3221014dd7
Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2021-08-17 15:25:22 +08:00
Xiang Xiao
6803b6d23d fs: Support 64bit in register_[block|mtd]partition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-16 22:07:08 +08:00
genghuihui
11a0bb3e98 feature:add audio AUDIOIOC_SETPARAMTER ioctl command
add AUDIOIOC_SETPARAMTER iotcl command in include/nuttx/audio/audio.h

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
Change-Id: I8d88c649a87cb5fbdd0fb1f83c111a1fff380507
2021-08-13 15:47:56 +08:00
genghuihui
d8c0f7279e feature:add awinic88266a smart pa nuttx driver
awinic88266a smart pa driver use nuttx/audio framework to register audio device,
use i2c to control smart pa configuration

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
Change-Id: I05361a582dde49af71c5dbd08ab9365b4ea0f80a
2021-08-13 15:44:03 +08:00
Xiang Xiao
4bee1e5690 mtd: Replace MTDIOC_XIPBASE with BIOC_XIPBASE
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 20:29:18 +08:00
Xiang Xiao
1e557e16ff Revert "mtd: Add MTDIOC_FLUSH IOCTL like MTDIOC_XIPBASE"
to simplify flt and partion layer implementation

This reverts commit 2e49e1bc5c.
2021-08-12 20:29:12 +08:00
Xiang Xiao
0705ae633e mtd: Replace MTDIOC_PARTINFO with BIOC_PARTINFO
to simplify flt and partion layer implementation

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-12 20:28:45 +08:00
Xiang Xiao
36e744d88a fs: Remove endsector from partition_info_s
since it can be computed from startsector and numsectors simply

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 23:39:02 +08:00
Gustavo Henrique Nihei
e66503788e fs: Add ioctl command for retrieving partition info of a block device
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:39:02 +08:00
Gustavo Henrique Nihei
1767685a9e mtd: Enable retrieval of MTD partition information
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:39:02 +08:00
Gustavo Henrique Nihei
5883abbe77 fs: Add data structure for Partition Information
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:39:02 +08:00
Gustavo Henrique Nihei
f5964d55dd mtd: Add MTDIOC_ERASESTATE command for retrieving erase state value
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2021-08-11 23:30:30 +08:00
Xiang Xiao
622c637832 fs/userfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 18:18:52 +08:00
Jiuzhu Dong
36ac863777 endian.h: add prefix for __LITTLE/__BIG_ENDIAN, __BYTE_ODRER
Change-Id: If072b69e37a89ccd6dc62e1d485b15703da029ac
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-11 17:58:17 +08:00
Jiuzhu Dong
10f091fdbb byteswap.h: add byteswap.h header file
Change-Id: I2b00618f608efbb8834328823b5e0eaa66f42aba
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-08-11 16:49:39 +08:00
Xiang Xiao
d27a86486f fs/hostfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-10 14:33:14 +08:00
Xiang Xiao
7afb3354cc fs: Add utimens and lutimens
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-09 21:09:35 +08:00
Xiang Xiao
ad827673b2 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: If32db0451e10fb02e0c12ed48f2b7120859b8ae3
2021-08-09 21:03:17 +08:00
Xiang Xiao
4bffde887d Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I66cf8f3201560ce71576279640e94ae3147ad0a2
2021-08-09 21:03:17 +08:00
liuhaitao
6442b8ea2d Revert "libc: Implement fesetround & fegetround for arm"
The updated GNU Arm Embedded Toolchain Version 10.3-2021.07 has implemented
fesetround & fegetround.

This reverts commit 5c0a079aea.

Change-Id: I6418c1f47a6c1a319a2973f01340480d50f54e8e
2021-08-09 20:02:47 +08:00
xiatian6
ca095b2d90 Feature: Sensor: Add ct7117 temperature sensor driver.
N/A

Add ct7117 temperature sensor driver for nuttx.

Change-Id: Ibc21e732c418ab2d61cc40a806c82cc76ad400bd
2021-08-09 18:30:04 +08:00
yangjiukui
fe98e909d2 L61: Sensor: Add sensor driver for LSM6DSO.
N/A

Add driver for the STMicro LSM6DSO.

Change-Id: I462a2912cf8c7f141f285e482c8222bdb854b5ee
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-08-09 11:39:42 +08:00
Xiang Xiao
6c9ea8d293 fs: Change off_t and related types to int64_t if long long is supported
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I019dc08aff02f9ea01eb6d750033bbc358994da5
2021-08-04 14:06:26 +08:00
Xiang Xiao
b2b4ad864b libc: Implement gettext function
https://www.man7.org/linux/man-pages/man3/dcgettext.3.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I5817bb8114a1bb05c4dfa133baa084d1cd5f1b06
2021-08-04 14:02:16 +08:00
Xiang Xiao
b7ca3dbbc8 fs: Save umask to tls_task_s for non kernel mode only
since the kernel mode has the dedicated userspace

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 14:43:34 +08:00
Xiang Xiao
af26bc798d libc: Remove include/nuttx/lib/regex.h and libs/libc/misc/lib_match.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-03 14:39:11 +08:00