Skip to content

Commit c2911af

Browse files
pawpawhecarlescufi
authored andcommitted
fs: littlefs: get block_cycles value from dts
Property "block-cycles" is required for node "zephyr,fstab,littlefs", but source code did not get the value from dts file, now add it. Additionally correct the wrong description of property "block-cycles" in binding file. Signed-off-by: Paul He <[email protected]>
1 parent 640a2ad commit c2911af

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

dts/bindings/fs/zephyr,fstab,littlefs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,4 @@ properties:
7575
is moved to another block. Set to a non-positive value to disable
7676
leveling.
7777
78-
This corresponds to CONFIG_FS_LITTLEFS_LOOKAHEAD_SIZE.
78+
This corresponds to CONFIG_FS_LITTLEFS_BLOCK_CYCLES.

subsys/fs/littlefs_fs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,7 @@ static struct fs_littlefs fs_data_##inst = { \
10611061
.prog_size = DT_INST_PROP(inst, prog_size), \
10621062
.cache_size = DT_INST_PROP(inst, cache_size), \
10631063
.lookahead_size = DT_INST_PROP(inst, lookahead_size), \
1064+
.block_cycles = DT_INST_PROP(inst, block_cycles), \
10641065
.read_buffer = read_buffer_##inst, \
10651066
.prog_buffer = prog_buffer_##inst, \
10661067
.lookahead_buffer = lookahead_buffer_##inst, \

0 commit comments

Comments
 (0)