summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/generic/generic.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2019-08-09 07:59:06 -0700
committerShelley Chen <shchen@google.com>2019-08-13 19:47:54 +0000
commit8ce36ac54844cf95552dc818fa6d566249b3457e (patch)
tree86b55880cd16fcb3203f55ea384a729f33a6b8d7 /src/drivers/i2c/generic/generic.c
parent8c206c9fdddca7e69130ab3a6fa3bc505c6e4cc1 (diff)
drivers/i2c/generic: Add "compatible" property to _DSD
This change adds support for allowing devices to provide a "compatible" property string that can be used when _HID is set to PRP00001. This is used to allow Linux kernel drivers to match the device to appropriate driver based on the OF-style compatible string. Reference: https://www.kernel.org/doc/Documentation/acpi/enumeration.txt BUG=b:129162037 TEST=Verified that atmel touchscreen gets enumerated correctly on kohaku using PRP0001 and compatible string. Change-Id: I8a306854c67ab2f056ea8774df46599ef0c55761 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34813 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Diffstat (limited to 'src/drivers/i2c/generic/generic.c')
-rw-r--r--src/drivers/i2c/generic/generic.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index 598f211ed8..9b4f00daa4 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -116,10 +116,13 @@ void i2c_generic_fill_ssdt(struct device *dev,
}
/* DSD */
- if (config->probed || config->property_count ||
+ if (config->probed || config->property_count || config->compat_string ||
(reset_gpio_index != -1) ||
(enable_gpio_index != -1) || (irq_gpio_index != -1)) {
dsd = acpi_dp_new_table("_DSD");
+ if (config->compat_string)
+ acpi_dp_add_string(dsd, "compatible",
+ config->compat_string);
if (config->probed)
acpi_dp_add_integer(dsd, "linux,probed", 1);
if (irq_gpio_index != -1)