40 Commits

Author SHA1 Message Date
GuEe-GUI
4913211409 [dm][core] add common machine power interface
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-16 11:35:35 +08:00
GuEe-GUI
cbf3f8c3b4 [dm][core] Update the OFW CLk init flow
The clock should init before common platform devices.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-13 16:35:32 +08:00
GUI
1b4111a99e [dm][pinctrl] Set pinctrl default auto in platform bus. (#11052)
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-13 16:33:05 +08:00
GuEe-GUI
6270b2f97c [dm][core] Set default CLK config for platform device probe
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-12 13:33:28 +08:00
GuEe-GUI
056ae364cb [dm][core] add new API for DM
1. rt_dm_dev_is_big_endian
2. rt_dm_dev_get_prop_fuzzy_name

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 21:04:16 +08:00
GuEe-GUI
c857e03544 [dm][core] fixup the rt_dm_dev_prop_read_u8_array_index OFW check
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 21:04:16 +08:00
GuEe-GUI
7357abdc37 [dm][core] cleanup format
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-12-09 21:04:16 +08:00
Chuan
ee20484759 docs(utest):Add standardized documentation for Drivers Core Test
Signed-off-by: ChuanN-sudo <fjchuanil@gmail.com>
2025-11-16 10:28:46 +08:00
Chen Wang
c1363c77d6 utest: Improve the strings displayed in the menu
Use "Test" instead of "Unit Testcases" to make string shorter.
Use uppercase to make it look more eye-catching.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-10-16 18:34:43 +08:00
Chen Wang
01e015450f utest: move driver related case under to drivers
src/utest/device_tc.c is testing API: rt_device_find(),
which is a function defined in components/drivers/core/device.c.
So it should be a testcase for drivers core, not for core.

Move it to under components/drivers/core.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2025-09-26 16:53:44 +08:00
Bernard Xiong
d1628a1cf3 [dfs] enable procfs and tempfs in default when using smart; fix LWIP_ROUTE warning issue. 2025-05-20 17:27:55 +08:00
GUI
fc86cb9427 [DM/Platform] Fixup the node will probe more than once
If a node request a new node or it's parent node. the  request's node will probe a double time.
So we check the device object of node in ofw probe entry and ofw probe child exit.
2025-03-19 09:46:48 +08:00
GuEe-GUI
f506076281 [DM] Replace spinlock static init by RT_DEFINE_SPINLOCK
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2025-02-11 14:58:18 +08:00
yuqingli05
d57b7cb40a 修复编译过程中的 DFS_V2报错、FAL警告 2025-01-01 19:02:50 -05:00
GuEe-GUI
6185250c86 [DM/FEATURE] Support clock subprobe in OFW
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 15:03:23 +08:00
GuEe-GUI
cefe6d6380 [DM/FEATURE] Support driver depends fix auto
We need a API to fix the driver load auto when
a second driver get it in probe process that
we can not be careful of the driver-to-driver's
depends in different SoC.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 15:03:23 +08:00
GuEe-GUI
b6f67285e9 [DM/FIXUP] remove OFW switch macros
The drivers will support OFW and name probe both.
We should make build OK when OFW is disable.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 15:03:23 +08:00
GuEe-GUI
3b22dbd049 [DM/FEATURE] DM Device IDA management
Drivers can manage their own IDs without having to concern
themselves with the register/unregister in system

Link: https://github.com/RT-Thread/rt-thread/issues/9534

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-11-18 14:23:25 +08:00
milo
2a8aba4c8b [fix]:fix log format and reopen with a different oflag issue (#9452)
fix log format and reopen with a different oflag issue
2024-09-19 18:15:55 +08:00
GuEe-GUI
175a2ff954 Fixup platform not free device in OFW
Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-03 19:49:47 -04:00
GuEe-GUI
2ec69c3ce4 Fixup bus remove device option
The bus should call driver's `remove` callback not
instead of `shutdown` in rt_bus_remove_device.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-09-03 19:49:47 -04:00
Yaochenger
7469edd165 [fix][device] 修正使用rt_device_create创建设备,使用rt_device_destroy删除失败的问题 2024-09-03 18:24:45 -04:00
zhao maosheng
f543160ead fix rt_atomic_dec_and_test 2024-08-09 12:54:10 +08:00
Rui
3b1d4e9222 fix Compilation error in "driver.c", "completion_up.c", "syslog.c" and "dlmodule.c". (#9093) 2024-06-26 23:25:23 +08:00
zms123456
b785ef9ed7 [libcpu][aarch64]memory setup using memblock (#9092)
* memory setup using memblock

* map pages later
2024-06-26 14:36:49 +08:00
sp-cai
f1832fea24 [components] [drivers ] [Kconfig] 整理 components/drivers 的 Kconfig (#9054)
整理 components/drivers 的 Kconfig
2024-06-16 15:43:27 +08:00
GUI
e7cddf3a52 [Feature] Support simple power domain API (#9005)
* [Feature] Power domain for device

1.Support device power on/off.
2.Support attach/detach device.
3.Support power domain driver api.

Signed-off-by: GuEe-GUI <2991707448@qq.com>

* [DM/platform] Enhanced platform bus

1.Add power domain for device.
2.Support `remove` and `shutdown` bus interface.

Signed-off-by: GuEe-GUI <2991707448@qq.com>

---------

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-05-30 15:30:40 +08:00
GUI
6f6b0c3ba0 [DM/feature] Simple NUMA (Non-Uniform Memory Access) (#9000)
For some CPU memory access devices, that the drivers
will find memory and CPU affinity to config device.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-05-28 14:08:33 +08:00
GUI
754c59a411 [Feature] DFS mount auto by kernel parameters (#8989)
DFS mount auto by kernel parameters

1.Mount the rootfs options by parameters:
- root=: root device, like vda1, sda1, sd0p1, nvme0n0p1...
- rootfstype=: root file system type, like elm, ext, crom...
- rw/ro: root is readonly or all enable, if not have 'rw' flag,
         the 'ro' flag is default.
- rootwait: always wait for root device status is OK.
- rootdelay=: mount rootfs delay amount of time (millisecond).

2.Mount the other fs options by `fstab.sh`, it will read the script
after root mount is OK, it's format is a list of mount cmds in MSH:

mount vda2 /mnt elm
mount 192.168.1.1:/ /mnt/remote nfs

Signed-off-by: GuEe-GUI <2991707448@qq.com>
2024-05-28 00:26:57 +08:00
Shell
83e95bdff4 sync smart & dfs (#8672)
Signed-off-by: xqyjlj <xqyjlj@126.com>
Signed-off-by: Shell <smokewood@qq.com>
Co-authored-by: xqyjlj <xqyjlj@126.com>
2024-03-28 23:42:56 +08:00
Shell
3237efd089 fixup d1s (#8671)
Signed-off-by: Shell <smokewood@qq.com>
2024-03-25 20:29:56 +08:00
zms123456
195f94ef1d [components][drivers]add pic-gic (#8388) 2024-02-29 09:39:56 +08:00
fangjianzhou
10b16273b8 [drivers][core] 完善设备模型 (#8384) 2024-01-09 23:10:42 +08:00
Meco Man
589641258e [debug] rename RT_DEBUGING_INIT as RT_DEBUGING_AUTO_INIT 2023-11-10 05:24:33 -05:00
zms123456
d01dd05a0c [kernel][dm]适配新的设备驱动模型 (#8075) 2023-10-18 20:50:30 +08:00
Man, Jianting (Meco)
244b903e5d [debug] 整理debug宏并增加RT_DEBUGING_CONTEXT (#7805) 2023-07-22 10:36:42 +08:00
ErikChanHub
2f5e4ac27e 【dd2.0】Support the Core API for dd2.0 (#7791) 2023-07-13 14:49:35 +08:00
wusongjie
179157f4e1 Components/drivers: support DM device id management
We add the device name and id set api in DM, now driver
could set name like sprintf without know how many devices
it is.
The misc.h and byteorder.h add some macros to developers
that they always use in drivers.

Signed-off-by: GuEe-GUI <GuEe-GUI@github.com>
2023-07-04 13:55:07 +08:00
Shicheng Chu
e2c031643c [include][dbg]update: no longer use RT_DEBUG_LOG in rtdebug.h (#7750) 2023-06-29 11:24:25 -04:00
Bernard Xiong
e3f068f058 [DeviceDrivers] prepare for device driver v2.0 (#7697) 2023-06-22 14:16:03 +08:00