diff --git a/data/devices/legion-go-series.toml b/data/devices/legion-go-series.toml index c2b57af..fd0e58f 100644 --- a/data/devices/legion-go-series.toml +++ b/data/devices/legion-go-series.toml @@ -7,27 +7,45 @@ variant = "83E1" [[device]] dmi.sys_vendor = "LENOVO" dmi.product_name = "83L3" +# Legion Go S 8ARP1 - Z2 Go SKU1 device = "legion_go_s" variant = "83L3" [[device]] dmi.sys_vendor = "LENOVO" dmi.product_name = "83N6" +# Legion Go S 8APU1 - Z1E SKU1 device = "legion_go_s" variant = "83N6" [[device]] dmi.sys_vendor = "LENOVO" dmi.product_name = "83Q2" +# Legion Go S 8ARP1 - Z2 Go SKU2 device = "legion_go_s" variant = "83Q2" [[device]] dmi.sys_vendor = "LENOVO" dmi.product_name = "83Q3" +# Legion Go S 8APU1 - Z1E SKU2 device = "legion_go_s" 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] platform_profile_name = "lenovo-wmi-gamezone" suggested_default = "custom" @@ -37,4 +55,4 @@ method = "firmware_attribute" [tdp_limit.firmware_attribute] attribute = "lenovo-wmi-other-0" -performance_profile = "custom" +performance_profile = "custom" \ No newline at end of file diff --git a/src/hardware.rs b/src/hardware.rs index 661984a..777a89e 100644 --- a/src/hardware.rs +++ b/src/hardware.rs @@ -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] async fn board_lookup_steam_deck_jupiter() { let _h = setup_board("Valve\n", "Jupiter\n", "Jupiter\n")