chao an
3a0fdb019d
nuttx: replace all ARRAY_SIZE()/ARRAYSIZE() to nitems()
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 20:05:44 +08:00
Gustavo Henrique Nihei
e6b204f438
nuttx: Use MIN/MAX definitions from "sys/param.h"
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-01 23:47:44 +08:00
Petro Karashchenko
8e72b07a62
nuttx: Add missing FAR and CODE
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-01-27 13:23:25 +08:00
chentao9
1e8d9466d6
ref: charge: add support for voltage infomation
...
Signed-off-by: chentao9 <chentao9@xiaomi.com>
2023-01-27 00:40:43 +02:00
ligd
23d1d4c42a
power: avoid sem_wait called in IRQ handler
...
error backrace:
_assert --- assert again
sem_wait
pm_unregister
wdog_notifier
panic_notifier_call_chain
_assert
dataabort
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:25:27 +08:00
ligd
38c6f20d17
pm: add pm_domain_lock/unlock support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:25:27 +08:00
ligd
d2ef505684
pm: add lock for pm_auto_updatestate_cb()
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-17 01:25:27 +08:00
TimJTi
f5e8c30808
Add ACT8945A power driver
...
Update act8945a.c
Update Kconfig
Update act8945a.c
Corrections (xiaoxiang781216)
2023-01-14 18:49:25 +08:00
Xiang Xiao
b0a0ba3ad7
fs: Move mmap callback before truncate in [file|mountpt]_operations
...
since mmap may exist in block_operations, but truncate may not,
moving mmap beforee truncate could make three struct more compatible
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 17:43:59 +02:00
Xiang Xiao
779a610ca3
Remove the unnecessary NULL fields in global instance definition of file_operations
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-04 00:32:13 +02:00
Jukka Laitinen
f33dc4df3f
Change FIOC_MMAP into file operation call
...
- Add mmap into file_operations and remove it from ioctl definitions.
- Add mm_map structure definitions to support future unmapping
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Jukka Laitinen
41e9df2f3e
Add ftruncate into file operation calls
...
- Add truncate into file_operations
- Move truncate to be common for mountpt_operations and file_operations
- Modify all drivers to initialize the operations struct accordingly
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2023-01-02 11:23:20 -03:00
Xiang Xiao
02e92d2ba5
Fix ower/pm/pm_procfs.c:46:15: error: format '%lu' expects argument of type 'long unsigned int', but argument 5 has type 'time_t' {aka 'long long int'}
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-24 11:26:48 -03:00
wangbowen6
069fac1c67
power/relay: add relay driver framework for NuttX
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-12-22 20:30:49 +08:00
chao an
dff81756cf
drivers/regulator_rpmsg: destroy nxsem properly
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-21 01:15:48 +08:00
anjiahao
5724c6b2e4
sem:remove sem default protocl
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-10-22 14:50:48 +08:00
anjiahao
d1d46335df
Replace nxsem API when used as a lock with nxmutex API
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-17 15:59:46 +09:00
Fotis Panagiotopoulos
bbf3f2866d
Fixed non-UTF8 characters.
2022-09-28 09:38:55 +08:00
Xiang Xiao
40ef5bc6db
libc: Move queue.h from include to include/nuttx
...
to avoid the conflict with libuv's queue.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-09-26 08:04:58 +02:00
wangbowen6
344c8be049
poll: add poll_notify() api and call it in all drivers
...
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2022-09-26 12:06:32 +08:00
Xiang Xiao
2b37909c9e
libc: Move crc8.h, crc16.h and crc32.h from include to include/nuttx
...
to avoid the conflict with the 3rd party library
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-13 13:28:24 +03:00
Jiuzhu Dong
fe17f747a7
fs/directory: move private directory information to filesystem
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Jiuzhu Dong
90db4daca9
fs/directory: update readdir interface for all filesystem
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-09 23:30:01 +08:00
Xiang Xiao
8582a12388
drivers: Reorganize the power related code layout
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-04 10:28:28 +03:00
Xiang Xiao
992747cef3
drivers/battery: Handle the early changed event correctly
...
since it may happen before battery_xxx_register sometime
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-02 18:50:46 +03:00
Xiang Xiao
f09f75f2c9
power/axp202: Replace battery_charger_operations_s * with battery_charger_dev_s
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-01 13:00:30 +03:00
ligd
8a3683fb9f
rptun: add ns_match callback to resolve rptun deadlock
...
thread A: accept -> net_lock -> socket_rpmsg_accept
-> rpmsg_register_callabck -> rptun_lock
thread B: ns_bind -> rpmsg_socket_ns_bind -> get_tx_payload_buffer
-> rptun_wait_tx -> usrsock_rpmsg_ept_cb -> usrsockdev_write
-> net_lock -> deadlock
fix:
add ns_match callback
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-27 20:36:51 +08:00
anjiahao
645ff50609
power:record features by add mask to drivers
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-26 12:07:51 +03:00
Jiuzhu Dong
4ef7cf068b
driver/power: add charge protocol get
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-26 12:07:51 +03:00
ligd
7fa3ecde5a
pm: modify for nxstyle
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
3ea2dbb7b4
power: change pm_count to pm_empty to optimize speed
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
487771033d
power: move EXPLICIT_RELAX operation to pm_initialize()
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
d8ebe98c6c
pm: use rmutex_xx API for recursive lock
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
f9849c7f60
pm: memset when do pm_wakelock_init
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
Xiang Xiao
959031ebca
power/greedy: Call pm_auto_updatestate in timeout callback
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
0d1515f7fb
pm_procfs: show stay-time-to-now when pm in stay state
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
695b296681
pm: fix build warning
...
power/pm_procfs.c:282:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
dom->wake[state].tv_sec,
^~~~~~~~~~~~~~~~~~~~~~~
make[2]: Entering directory '/home/ligd/platform/m2/audio/frameworks/media'
power/pm_procfs.c:283:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
100 * dom->wake[state].tv_sec / sum,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:284:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
dom->sleep[state].tv_sec,
^~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:285:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
100 * dom->sleep[state].tv_sec / sum,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
power/pm_procfs.c:286:27: warning: format specifies type 'unsigned long' but the argument has type 'time_t' (aka 'unsigned int') [-Wformat]
total.tv_sec,
^~~~~~~~~~~~
power/pm_procfs.c:287:27: warning: format specifies type 'unsigned long' but the argument has type 'unsigned int' [-Wformat]
100 * total.tv_sec / sum);
^~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
c0f2b7811e
pm: add pm procfs support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
f7a1c2a585
pm: move wdog from domain to wakelock
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
0ca0c017fd
pm: move pm_wakelock_global_init to the top
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
82713d9eac
pm: PM_RESTORE don't need do prepare_all
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
88def0244c
power: add pm_wakelock support
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
f606689715
power: change pm_stay_timeout to pm_staytimout
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
b34925e6eb
power: move EXPLICIT_RELAX opreation to common place
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
f0a1a2dc0b
power: add pm_stay_timeout API
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
479689eae9
power: fill acivity callback to greedy_governor
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
ligd
25b16576e8
pm: pm_lock support recursive_lock
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-26 11:11:00 +08:00
zhuyanlin
4329967a01
pm: use pm_lock/unlock with domain lock
...
Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-07-26 11:11:00 +08:00
Gustavo Henrique Nihei
e999708b31
drivers: Convert DEBUGASSERT(false) into more intuitive DEBUGPANIC()
...
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2022-07-14 12:08:45 +08:00
anjiahao
b88a8cf39f
use rmutex inside of all repeated implementation
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2022-05-30 19:43:48 +08:00