Attention is currently required from: Raul Rangel, Furquan Shaikh. Tim Wawrzynczak has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/54133 )
Change subject: ec/google/chromeec: Implement support for DRIVERS_ACPI_THERMAL_ZONE ......................................................................
Patch Set 2:
(1 comment)
File src/ec/google/chromeec/ec_acpi.c:
https://review.coreboot.org/c/coreboot/+/54133/comment/4c7398fa_c5e91ccb PS2, Line 267: : void google_chromeec_acpigen_write_TMP(const struct device *dev) : { : struct drivers_acpi_thermal_zone_config *config = config_of(dev); : static char buf[DEVICE_PATH_MAX] = {}; : const char *ec_path = acpi_device_path(config->temperature_controller); : : /* : * The cros EC device returns EC0.CREC as the acpi_name. The method : * we want is on the EC0 device. : */ : snprintf(buf, sizeof(buf), "%.*s.TSRD", strlen(ec_path) - 5, : acpi_device_path(config->temperature_controller)); : : acpigen_write_method_serialized("_TMP", 0); : : acpigen_emit_byte(RETURN_OP); : acpigen_emit_namestring(buf); : acpigen_write_integer(config->sensor_id); : : acpigen_write_method_end(); : } consider a refactor? https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/src...
also regarding EC0 vs. EC0.CREC, I have considered at least for now, until we can straighten out the ASL vs. the acpigen'd AML... we could have a function in `ec_acpi.c` that does this: https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/src...
like: ``` const struct device *google_chromeec_get_EC0(void) { static struct device *ec0;
if (!ec0) { create_it; }
return ec0; } ```
that was my thought, since I have a few other places I wanted to acpigen some more EC-related things... WDYT?