Skip to content

Commit e2f83fb

Browse files
authored
feat: add support for Lenovo ThinkBook 14 MP2PQAZG (#45)
1 parent 24566c0 commit e2f83fb

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

contrib/hw/30c9-00c2.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[device]
2+
vendor_id = 0x30C9
3+
product_id = 0x00C2
4+
name = "Lenovo ThinkBook 14 MP2PQAZG IR Camera"
5+
6+
[emitter]
7+
unit = 7
8+
selector = 6
9+
control_bytes = [1, 3, 2, 0, 0, 0, 0, 0, 0]

crates/visage-hw/src/quirks.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ use std::sync::OnceLock;
1111
const QUIRK_04F2_B6D9: &str = include_str!("../../../contrib/hw/04f2-b6d9.toml");
1212
/// Compile-time embedded quirk for the Lenovo ThinkPad X1 Carbon Gen 9 20XW00FPUS IR camera.
1313
const QUIRK_174F_2454: &str = include_str!("../../../contrib/hw/174f-2454.toml");
14+
/// Compile-time embedded quirk for the Lenovo ThinkBook 14 MP2PQAZG IR camera.
15+
const QUIRK_30C9_00C2: &str = include_str!("../../../contrib/hw/30c9-00c2.toml");
1416

1517
static QUIRK_DB: OnceLock<Vec<QuirkFile>> = OnceLock::new();
1618

@@ -45,7 +47,7 @@ pub type CameraQuirk = QuirkFile;
4547
fn quirk_db() -> &'static Vec<QuirkFile> {
4648
QUIRK_DB.get_or_init(|| {
4749
let mut db = Vec::new();
48-
for src in [QUIRK_04F2_B6D9, QUIRK_174F_2454] {
50+
for src in [QUIRK_04F2_B6D9, QUIRK_174F_2454, QUIRK_30C9_00C2] {
4951
match toml::from_str::<QuirkFile>(src) {
5052
Ok(q) => db.push(q),
5153
Err(e) => eprintln!("visage-hw: bad quirk TOML: {e}"),

0 commit comments

Comments
 (0)