Skip to content

Commit 81fcd1f

Browse files
committed
[dm][nvmem] support nvmem
Support for NVMEM(Non Volatile Memory) devices like EEPROM, EFUSES... Signed-off-by: GuEe-GUI <[email protected]>
1 parent 2fb53c8 commit 81fcd1f

File tree

5 files changed

+581
-0
lines changed

5 files changed

+581
-0
lines changed

components/drivers/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ rsource "regulator/Kconfig"
3232
rsource "reset/Kconfig"
3333
rsource "thermal/Kconfig"
3434
rsource "virtio/Kconfig"
35+
rsource "nvmem/Kconfig"
3536
rsource "dma/Kconfig"
3637
rsource "mfd/Kconfig"
3738
rsource "ofw/Kconfig"

components/drivers/include/rtdevice.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ extern "C" {
118118
#ifdef RT_USING_THERMAL
119119
#include "drivers/thermal.h"
120120
#endif /* RT_USING_THERMAL */
121+
122+
#ifdef RT_USING_NVMEM
123+
#include "drivers/nvmem.h"
124+
#endif /* RT_USING_NVMEM */
121125
#endif /* RT_USING_DM */
122126

123127
#ifdef RT_USING_RTC

components/drivers/nvmem/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
menuconfig RT_USING_NVMEM
2+
bool "Using Non Volatile Memory (NVMEM) device drivers"
3+
depends on RT_USING_DM
4+
depends on RT_USING_OFW
5+
depends on RT_USING_PIN
6+
select RT_USING_ADT
7+
select RT_USING_ADT_REF
8+
default n
9+
10+
if RT_USING_NVMEM
11+
osource "$(SOC_DM_NVMEM_DIR)/Kconfig"
12+
endif
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
from building import *
2+
3+
group = []
4+
5+
if not GetDepend(['RT_USING_NVMEM']):
6+
Return('group')
7+
8+
cwd = GetCurrentDir()
9+
CPPPATH = [cwd + '/../include']
10+
11+
src = ['nvmem.c']
12+
13+
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
14+
15+
Return('group')

0 commit comments

Comments
 (0)