Xiang Xiao
4d2cc2ab4d
supply/regulator: Refine rpmsg regulator
...
1.Change priv to client or server
2.Allocate memory for name in regulator_rpmsg_get
3.Lock/unlock regulator_list in regulator_rpmsg_server_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:33:09 +08:00
dulibo1
ac62a08ac9
support pm runtime base function
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-09-16 14:44:08 +08:00
wanggang26
dcadd87919
pm: fix issue that system crash when passed invalid relpath value
...
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-09-13 21:47:27 +08:00
chao an
664927c86e
mm/alloc: remove all unnecessary cast for alloc
...
Fix the minor style issue and remove unnecessary cast
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
chao an
7aa45305b7
fs/inode: remove all unnecessary check for filep/inode
...
Since VFS layer already contains sanity checks, so remove unnecessary lower half checks
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-29 09:47:11 +08:00
dulibo1
127bd81674
regulator:check id conflict when register
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-29 02:59:59 +08:00
dulibo1
3591de08c6
fix g_goldfish_gauge_ops init C89 compatible and align style
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-14 13:40:38 +08:00
dulibo1
3f9a76e131
battery:add goldfish battery driver
...
support the goldfish emulator battery driver
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-11 15:30:35 +08:00
dulibo1
af60bf8213
regulator:optimize the lock to support call the interface in idle task by pm
...
support call api in idle task
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
dulibo1
1456919e58
regulator:support lp mode and auto pm register
...
1.add new intf regulator_set_mode to manual set rehulator lower power mode;
2.when add auto lp desc,the regulator lp mode is controlled by pm framework;
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
dulibo1
935359fa3f
regulator: support link to supply
...
when add supply desc,the regulator is linked to the parent regulator
1.if enable the regualtor, the parent regulator is enabled
2.if disable all child regulator, the parent regualtor is disabled
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
dulibo1
67aa12e762
regulator:support always on
...
when add always on desc,the regulator is always enabled
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-08-10 23:17:51 +08:00
ligd
bfe962ce2c
pm: fix second time add wakelock dq caused error
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-03 10:16:41 -07:00
chao an
f10b54a081
cmake: fix CMake build break
...
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-15 23:32:36 +08:00
dulibo1
7ccdb2cfa8
battery:fix poll return type
...
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2023-07-12 11:06:47 -03:00
chao an
6ee9ec7656
build: add initial cmake build system
...
1. Update all CMakeLists.txt to adapt to new layout
2. Fix cmake build break
3. Update all new file license
4. Fully compatible with current compilation environment(use configure.sh or cmake as you choose)
------------------
How to test
From within nuttx/. Configure:
cmake -B build -DBOARD_CONFIG=sim/nsh -GNinja
cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
cmake -B build -DBOARD_CONFIG=sabre-6quad/smp -GNinja
cmake -B build -DBOARD_CONFIG=lm3s6965-ek/qemu-flat -GNinja
(or full path in custom board) :
cmake -B build -DBOARD_CONFIG=$PWD/boards/sim/sim/sim/configs/nsh -GNinja
This uses ninja generator (install with sudo apt install ninja-build). To build:
$ cmake --build build
menuconfig:
$ cmake --build build -t menuconfig
--------------------------
2. cmake/build: reformat the cmake style by cmake-format
https://github.com/cheshirekow/cmake_format
$ pip install cmakelang
$ for i in `find -name CMakeLists.txt`;do cmake-format $i -o $i;done
$ for i in `find -name *\.cmake`;do cmake-format $i -o $i;done
Co-authored-by: Matias N <matias@protobits.dev>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:50:48 +08:00
simbit18
3f4151525d
Fix Kconfig style
...
Remove TABs from Kconfig files
Add comments
2023-06-19 20:05:57 +03:00
simbit18
ca026a5b0f
drivers\power\supply\Kconfig: Fix indentation
...
Remove TABs
2023-05-18 15:43:22 +03:00
simbit18
f12b9c44cb
drivers/power/relay/Kconfig: Fix Kconfig style
...
Remove spaces from Kconfig files
Add TABs
2023-05-10 22:51:11 +08:00
Xiang Xiao
51dc67ad5f
fs: Add g_ prefix for all global file_operations instances
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-24 16:13:29 +02:00
Xiang Xiao
149cafe450
procfs: Add g_ prefix to all procfs_operations
...
to conform the coding style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-22 03:33:50 -04:00
zhangyuan21
c239d19df0
nuttx: add more dependent header file
...
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-04-11 09:13:32 +03:00
TimJTi
94f0283bdd
Correct DEBUGASSERT code error, _err format error, better C89 compatability
...
Update drivers/power/supply/act8945a.c
Co-authored-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-03-06 17:25:39 +02:00
Xiang Xiao
2c5f653bfd
Remove the tail spaces from all files except Documentation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-26 13:24:24 -08:00
lilei19
38f64f559d
change strcpy to strlcpy
...
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-24 12:15:40 +08:00
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