Merge branch 'matts/legion-go-2' into 'master'

Add Legion Go 2 support

Closes #5

See merge request holo/steamos-manager!14
This commit is contained in:
Matthew Schwartz 2025-06-19 00:45:52 +00:00
commit d0f2531b45
2 changed files with 49 additions and 1 deletions

View file

@ -7,27 +7,45 @@ variant = "83E1"
[[device]] [[device]]
dmi.sys_vendor = "LENOVO" dmi.sys_vendor = "LENOVO"
dmi.product_name = "83L3" dmi.product_name = "83L3"
# Legion Go S 8ARP1 - Z2 Go SKU1
device = "legion_go_s" device = "legion_go_s"
variant = "83L3" variant = "83L3"
[[device]] [[device]]
dmi.sys_vendor = "LENOVO" dmi.sys_vendor = "LENOVO"
dmi.product_name = "83N6" dmi.product_name = "83N6"
# Legion Go S 8APU1 - Z1E SKU1
device = "legion_go_s" device = "legion_go_s"
variant = "83N6" variant = "83N6"
[[device]] [[device]]
dmi.sys_vendor = "LENOVO" dmi.sys_vendor = "LENOVO"
dmi.product_name = "83Q2" dmi.product_name = "83Q2"
# Legion Go S 8ARP1 - Z2 Go SKU2
device = "legion_go_s" device = "legion_go_s"
variant = "83Q2" variant = "83Q2"
[[device]] [[device]]
dmi.sys_vendor = "LENOVO" dmi.sys_vendor = "LENOVO"
dmi.product_name = "83Q3" dmi.product_name = "83Q3"
# Legion Go S 8APU1 - Z1E SKU2
device = "legion_go_s" device = "legion_go_s"
variant = "83Q3" variant = "83Q3"
[[device]]
dmi.sys_vendor = "LENOVO"
dmi.product_name = "83N0"
# Legion Go 8ASP2 - Z2E SKU
device = "legion_go_2"
variant = "83N0"
[[device]]
dmi.sys_vendor = "LENOVO"
dmi.product_name = "83N1"
# Legion Go 8AHP2 - Z2 SKU
device = "legion_go_2"
variant = "83N1"
[performance_profile] [performance_profile]
platform_profile_name = "lenovo-wmi-gamezone" platform_profile_name = "lenovo-wmi-gamezone"
suggested_default = "custom" suggested_default = "custom"

View file

@ -471,6 +471,36 @@ pub mod test {
); );
} }
#[tokio::test]
async fn board_lookup_legion_go_2_83n0() {
let _h = setup_board("LENOVO\n", "INVALID\n", "83N0\n")
.await
.unwrap();
assert_eq!(
steam_deck_variant().await.unwrap(),
SteamDeckVariant::Unknown
);
assert_eq!(
device_variant().await.unwrap(),
(String::from("legion_go_2"), String::from("83N0"))
);
}
#[tokio::test]
async fn board_lookup_legion_go_2_83n1() {
let _h = setup_board("LENOVO\n", "INVALID\n", "83N1\n")
.await
.unwrap();
assert_eq!(
steam_deck_variant().await.unwrap(),
SteamDeckVariant::Unknown
);
assert_eq!(
device_variant().await.unwrap(),
(String::from("legion_go_2"), String::from("83N1"))
);
}
#[tokio::test] #[tokio::test]
async fn board_lookup_steam_deck_jupiter() { async fn board_lookup_steam_deck_jupiter() {
let _h = setup_board("Valve\n", "Jupiter\n", "Jupiter\n") let _h = setup_board("Valve\n", "Jupiter\n", "Jupiter\n")