Hello Patrick Rudolph, Julius Werner, Subrata Banik, Paul Menzel, build bot (Jenkins), Nico Huber, Patrick Georgi, Furquan Shaikh, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/35036
to look at the new patch set (#5).
Change subject: drivers/generic: Add new driver for power resource pseudo device ......................................................................
drivers/generic: Add new driver for power resource pseudo device
There is some duplication of fields dealing with ACPI power resources (see drivers/i2c/generic.c, also used by drivers/i2c/hid, as well as drivers/spi/acpi). This CL creates a new driver for this pseudo-device.
This patch allows a new style of dealing with power resources in the device tree:
device pci 00.0 chip drivers/generic/power_resource register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_A1)" device generic 0 on chip drivers/i2c/generic register ... end end end end
and then the power resource driver does most of the work. This should make it easier to support other drivers requiring ACPI power resources in the future (see the diff in the two changed here).
I tested this patch on a device using ACPI power resources, and it was successfully able to invoke the _ON and _OFF routines for the device, both with the new-style and old-style way of creating power resources.
My hope would be to update device trees in later patches to accomodate this new style, and then deprecate the old style.
Change-Id: I358c48f4d4e4c4ef591ecf09ea9e9488c2652c96 Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org --- M src/arch/x86/acpi_device.c M src/arch/x86/acpigen.c M src/arch/x86/include/arch/acpi_device.h M src/arch/x86/include/arch/acpigen.h M src/device/root_device.c A src/drivers/generic/power_resource/Makefile.inc A src/drivers/generic/power_resource/chip.h A src/drivers/generic/power_resource/power_resource.c M src/drivers/i2c/generic/generic.c M src/drivers/spi/acpi/acpi.c 10 files changed, 242 insertions(+), 52 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/35036/5