summaryrefslogtreecommitdiff
path: root/test/boot
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2024-10-14 16:31:58 -0600
committerSimon Glass <[email protected]>2024-10-18 14:10:22 -0600
commit012e1e86523e3591ed5a986f894e207e1bcb32f1 (patch)
tree997dd98215123ff46ced04bd89858fbfb0a0dfb0 /test/boot
parentd8ff97ce91529263c9d82a4bc00e133822673ab0 (diff)
expo: Allow menu items to have values
At present menu items are stored according to their sequence number in the menu. In some cases we may want to have holes in that sequence, or not use a sequence at all. Add a new 'value' property for menu items. This will be used for reading and writing, if present. If there is no 'value' property, then the normal sequence number will be used instead. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'test/boot')
-rw-r--r--test/boot/expo.c1
-rw-r--r--test/boot/files/expo_layout.dts3
2 files changed, 4 insertions, 0 deletions
diff --git a/test/boot/expo.c b/test/boot/expo.c
index b0bf2988bf0..1c2e746decc 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -717,6 +717,7 @@ static int expo_test_build(struct unit_test_state *uts)
ut_asserteq(0, item->desc_id);
ut_asserteq(0, item->preview_id);
ut_asserteq(0, item->flags);
+ ut_asserteq(0, item->value);
txt = scene_obj_find(scn, item->label_id, SCENEOBJT_NONE);
ut_asserteq_str("2 GHz", expo_get_str(exp, txt->str_id));
diff --git a/test/boot/files/expo_layout.dts b/test/boot/files/expo_layout.dts
index bed552288f4..ebe5adb27bb 100644
--- a/test/boot/files/expo_layout.dts
+++ b/test/boot/files/expo_layout.dts
@@ -39,6 +39,9 @@
item-id = <ID_CPU_SPEED_1 ID_CPU_SPEED_2
ID_CPU_SPEED_3>;
+ /* values for the menu items */
+ item-value = <(-1) 3 6>;
+
start-bit = <0x400>;
bit-length = <2>;
};