Duncan Laurie (dlaurie@chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/15514
-gerrit
commit 8691a16ba90f0544b14fce2a9728d8fb510d1d0f Author: Duncan Laurie dlaurie@chromium.org Date: Wed Jun 29 22:34:01 2016 -0700
drivers/generic/max98357a: Fix naming and ACPI path handling
The upstream kernel driver is not using the of-style naming for sdmode-gpio so remove the maxim prefix, and remove the duplicate entry for the sdmode-delay value as well.
Also fix the usage of the path variable, since the device path uses a static variable it can't be assigned that early or it will be overwritten by later calls.
This results in the following output for the _DSD when tested on reef mainboard:
Name (_DSD, Package (0x02) { ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") Package (0x02) { Package (0x02) { "sdmode-gpio", Package (0x04) { _SB.PCI0.HDAS.MAXM, Zero, Zero, Zero } }, Package (0x02) { "sdmode-delay", Zero } } })
Change-Id: Iab33182a5f64c89151966f5e79f4f7c30840c46f Signed-off-by: Duncan Laurie dlaurie@chromium.org --- src/drivers/generic/max98357a/max98357a.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/src/drivers/generic/max98357a/max98357a.c b/src/drivers/generic/max98357a/max98357a.c index cbd7efd..0d522d4 100644 --- a/src/drivers/generic/max98357a/max98357a.c +++ b/src/drivers/generic/max98357a/max98357a.c @@ -31,9 +31,9 @@ static void max98357a_fill_ssdt(struct device *dev) { struct drivers_generic_max98357a_config *config = dev->chip_info; - const char *path = acpi_device_path(dev); + const char *path;
- if (!dev->enabled || !path || !config) + if (!dev->enabled || !config) return;
/* Device */ @@ -53,10 +53,8 @@ static void max98357a_fill_ssdt(struct device *dev) /* _DSD for devicetree properties */ acpi_dp_write_header(); /* This points to the first pin in the first gpio entry in _CRS */ - acpi_dp_write_gpio("maxim,sdmode-gpio", path, 0, 0, 0); - /* This is the correctly formatted Device Property name */ - acpi_dp_write_integer("maxim,sdmode-delay", config->sdmode_delay); - /* This is used by the chromium kernel but is not upstream */ + path = acpi_device_path(dev); + acpi_dp_write_gpio("sdmode-gpio", path, 0, 0, 0); acpi_dp_write_integer("sdmode-delay", config->sdmode_delay); acpi_dp_write_footer();