drivers/i2c/generic: Print error when using _CRS and PowerResource
Exposing the GPIOs via an ACPI PowerResource and the _CRS results in the OS driver and ACPI thinking they own the GPIO. This can cause timing problems because it's not clear which system should be controlling the GPIO. I'm making this an error because we should really clean these up. BUG=b:210694108 TEST=Boot guybrush and see error: > I2C: 02:5d: ERROR: Exposing GPIOs in Power Resource and _CRS > \_SB.I2C1.H05D: Goodix Touchscreen at I2C: 02:5d Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: Ifcc42ed81fff295fb168a0b343e96b3a650b1c84 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60174 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Van Patten <timvp@google.com>
This commit is contained in:
parent
b02a5014ea
commit
ae129fc6d6
|
@ -77,6 +77,16 @@ void i2c_generic_fill_ssdt(const struct device *dev,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (config->has_power_resource && !config->disable_gpio_export_in_crs) {
|
||||||
|
/*
|
||||||
|
* This case will most likely cause timing problems. The OS driver might be
|
||||||
|
* controlling the GPIOs, but the ACPI Power Resource will also be controlling
|
||||||
|
* them. This will result in the two fighting and stomping on each other.
|
||||||
|
*/
|
||||||
|
printk(BIOS_ERR, "%s: Exposing GPIOs in Power Resource and _CRS\n",
|
||||||
|
dev_path(dev));
|
||||||
|
}
|
||||||
|
|
||||||
/* Device */
|
/* Device */
|
||||||
acpigen_write_scope(scope);
|
acpigen_write_scope(scope);
|
||||||
acpigen_write_device(acpi_device_name(dev));
|
acpigen_write_device(acpi_device_name(dev));
|
||||||
|
|
Loading…
Reference in New Issue