summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/generic/generic.c
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-08-01 08:51:59 +0100
committerFelix Held <felix-coreboot@felixheld.de>2024-08-02 14:36:31 +0000
commit45d2c3d5436e30178dae1c95c53de38ff9b45a35 (patch)
tree02324a5b69695b8da0c94498395e420901f62a74 /src/drivers/i2c/generic/generic.c
parent8c509f36451162dd9a30aa6cc94e8f33e9b50df7 (diff)
i2c/drivers/generic: Return ROTM in a package
The ROTM method should return a package: ``` Name (RBUF, Package (0x03) { "0 1 0", "1 0 0", "0 0 1" }) Return (RBUF) ``` Adjust the acpigen to do this. Change-Id: Id493f6955c1d0dc3449402262a8575091a828226 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/83721 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Diffstat (limited to 'src/drivers/i2c/generic/generic.c')
-rw-r--r--src/drivers/i2c/generic/generic.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 1875bacb2d..27bef49218 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -149,6 +149,7 @@ void i2c_generic_fill_ssdt(const struct device *dev,
/* Rotation Matrix */
if (config->has_rotation_matrix) {
acpigen_write_method("ROTM", 0);
+ acpigen_write_name("RBUF");
acpigen_write_package(3);
for (int i = 0; i < 3; i++) {
@@ -160,6 +161,8 @@ void i2c_generic_fill_ssdt(const struct device *dev,
acpigen_write_string(matrix_row);
}
+ acpigen_pop_len();
+ acpigen_write_return_namestr("RBUF");
acpigen_pop_len();
acpigen_pop_len();