From 0d4a633c6569f4d3ea80560adae71a7b5af05839 Mon Sep 17 00:00:00 2001 From: Christoffer Sandberg Date: Mon, 10 Jan 2022 19:44:15 +0100 Subject: [PATCH] Add IBP14gen6 id and refactor model numbers --- src/tuxedo_io/tuxedo_io.c | 6 +++--- src/uniwill_interfaces.h | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/tuxedo_io/tuxedo_io.c b/src/tuxedo_io/tuxedo_io.c index 3a532d6..94e5625 100644 --- a/src/tuxedo_io/tuxedo_io.c +++ b/src/tuxedo_io/tuxedo_io.c @@ -96,13 +96,13 @@ static int *tdp_max_defs = NULL; void uw_id_tdp(void) { - if (uw_feats->model == 0x13) { + if (uw_feats->model == UW_MODEL_PH4TUX) { tdp_min_defs = tdp_min_ph4tux; tdp_max_defs = tdp_max_ph4tux; - } else if (uw_feats->model == 0x12) { + } else if (uw_feats->model == UW_MODEL_PH4TRX) { tdp_min_defs = tdp_min_ph4trx; tdp_max_defs = tdp_max_ph4trx; - } else if (dmi_string_in(DMI_PRODUCT_SERIAL, "PH4TQX")) { + } else if (uw_feats->model == UW_MODEL_PH4TQF) { tdp_min_defs = tdp_min_ph4tqx; tdp_max_defs = tdp_max_ph4tqx; } else if (dmi_match(DMI_PRODUCT_SKU, "POLARIS1XA02")) { diff --git a/src/uniwill_interfaces.h b/src/uniwill_interfaces.h index b7f29f1..fbc1d71 100644 --- a/src/uniwill_interfaces.h +++ b/src/uniwill_interfaces.h @@ -46,6 +46,10 @@ struct uniwill_interface_t { uniwill_write_ec_ram_t *write_ec_ram; }; +#define UW_MODEL_PH4TUX 0x13 +#define UW_MODEL_PH4TRX 0x12 +#define UW_MODEL_PH4TQF 0x14 + struct uniwill_device_features_t { u8 model; /**