Commit graph

4261 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
yangjiukui
17ce9d6956 fix: sensor: add factory test for lsm6dso.
CHAMPION-124

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

Change-Id: I4bd63ad68f4fec11d51dd05f27e03d58635cf21f
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-09-18 14:25:40 +08:00
Jiuzhu Dong
de00e567da syslog: reslove crash because vmov.i32 instruction is not ready when system boot
So avoid to use vmov.i32 instruction before FPU is ready.

Before modification:
3c03b35c <nx_vsyslog>:
3c03b35c:	f2c00010 	vmov.i32	d16, #0	; 0x00000000
3c03b360:	f2c02050 	vmov.i32	q9, #0	; 0x00000000
3c03b364:	e92d40f0 	push	{r4, r5, r6, r7, lr}
3c03b368:	e24dd08c 	sub	sp, sp, #140	; 0x8c
3c03b36c:	e28d301c 	add	r3, sp, #28
3c03b370:	e2505000 	subs	r5, r0, #0
3c03b374:	edcd0b0f 	vstr	d16, [sp, #60]	; 0x3c
3c03b378:	edcd0b01 	vstr	d16, [sp, #4]

After modification:
3c03b35c <nx_vsyslog>:
3c03b35c:       e92d40f0        push    {r4, r5, r6, r7, lr}
3c03b360:       e2505000        subs    r5, r0, #0
3c03b364:       e24dd08c        sub     sp, sp, #140    ; 0x8c
3c03b368:       e1a06001        mov     r6, r1
3c03b36c:       e1a07002        mov     r7, r2
3c03b370:       e28d000c        add     r0, sp, #12
3c03b374:       1a00003a        bne     3c03b464 <nx_vsyslog+0x108>

Change-Id: I643c19f5416c94a529764fdaa81f3088fcf95355
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
(cherry picked from commit 696bf0d368a62493c3d7462735127ed2c6ef7594)
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-16 10:50:31 +08:00
Xiang Xiao
c1c478538f drivers/sdmmc: Remove rwbuffer to avoid panic
since rwbuffer isn't fully initiailized in mmcsd_slotinitialize.
BTW, if the cache is important for performance, it is better to
implement a general block cache and put in a common location.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-16 10:45:54 +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
Xiang Xiao
c1cd83cf9e drivers/mmcsd: Fix the wrong format argument in mmcsd_dmpcsd
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:59:55 +08:00
Xiang Xiao
703c4b9b8c drivers/mmcsd: Handle the failure correctly in mmcsd_slotinitialize
1.Return -ENOMEM directly if kmm_malloc return NULL
2.Call nxsem_destroy if the initialization can't succeed

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:59:47 +08:00
Xiang Xiao
ad864dcf8e drivers/mmcsd: Change up_udelay to nxsig_usleep if delay >= 1ms
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:58:42 +08:00
Xiang Xiao
8df6a1de6a drivers/mmcsd: Change mmsd_ prefix to mmcsd_ prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-09-06 11:58:22 +08:00
Jiuzhu Dong
93d0da801a rptun: add CONFIG_RPTUN_LOADER to optimize code size
Change-Id: I8a8d85eba5058d455d4ca8a8627169cf29060a4d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-09-02 18:28:19 +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
yangjiukui
c5488010c2 fix: sensor: fix the bug that lsm6dsl selftest is invalid in nuttx.
N/A

according to the ST manual, the logic part of
selftest that is meaningless is modified.

Change-Id: Ie7218b502236a0c27136f8ec80ed8ac482c4285f
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-08-25 20:46:33 +08:00
yangjiukui
cc07094c69 fix: sensor: fix lsm6dso get a null pointer in non-fifo mode.
CHAMPION-63

get the parent pointer in front of the batch.

Change-Id: Ie309c6df942ecd3ae0f87966fe68053fe4fe4520
Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2021-08-24 17:13:19 +08:00
jordi
cd2fbf0b3c Kconfig: add quotes in source to clean warnings from setconfig
To avoid the setconfig warning "style: quotes recommended around xxx in
source xxx"

Change-Id: Iaec3ae59ba2ec15337652c9962b25081ff03e1d7
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-18 19:35:59 +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
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
liuhaitao
3aa1adc6ec mtd: include nuttx/fs/fs.h explicitly
To fix struct partition_info_s undefined type issue.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
Change-Id: I7c67d0e2f84f4251574a13c22f3bd917742975ea
2021-08-17 10:14:32 +08:00
Xiang Xiao
e91c95b197 mtd: Implement BIOC_PARTINFO for all drivers
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-16 22:07:02 +08:00
chao.an
00b373112b driver/pipe: add nonblock open support
Change-Id: Ibdf627167b1a30e698607b4f32f6b1c8cc2f15ae
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-16 21:38:00 +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
9b58b77b88 mtd: Remove the empty MTDIOC_XIPBASE implmentation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-11 23:39:24 +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
336222524a mtd: Translate BIOC_PARTINFO into MTDIOC_PARTINFO on FTL driver
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