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>
This commit is contained in:
Sean Rhodes 2024-08-01 08:51:59 +01:00 committed by Felix Held
parent 8c509f3645
commit 45d2c3d543

View File

@ -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();