summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/generic/chip.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2017-08-29 08:28:58 -0700
committerDuncan Laurie <dlaurie@chromium.org>2017-08-30 15:36:54 +0000
commit1533a3cae8cdeeef8ed397c4965e7deca3c73adc (patch)
tree4e88248c84cc22ffc86930b9f234b5f0d4fbfbcd /src/drivers/i2c/generic/chip.h
parentb3023b697adb3d7049a6d9ed98a313c356739d91 (diff)
drivers/i2c/generic: Support additional device properties
Add support for providing additional free form device properties via devicetree in order to make this driver suitable for kernel drivers that need additional board-specific device properties. This currently allows adding up to 10 additional properties to a device. BUG=b:63413023 TEST=manual testing to ensure that newly added properties are in SSDT Change-Id: I2b8ceb208f4aba01053746547def6d07c8f8f3a2 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/21270 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/drivers/i2c/generic/chip.h')
-rw-r--r--src/drivers/i2c/generic/chip.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h
index c5d458b6ee..8b285f054c 100644
--- a/src/drivers/i2c/generic/chip.h
+++ b/src/drivers/i2c/generic/chip.h
@@ -19,6 +19,8 @@
#include <arch/acpi_device.h>
#include <device/i2c_simple.h>
+#define MAX_GENERIC_PROPERTY_LIST 10
+
struct drivers_i2c_generic_config {
const char *hid; /* ACPI _HID (required) */
const char *cid; /* ACPI _CID */
@@ -59,6 +61,10 @@ struct drivers_i2c_generic_config {
struct acpi_gpio enable_gpio;
/* Delay to be inserted after device is enabled. */
unsigned enable_delay_ms;
+
+ /* Generic properties for exporting device-specific data to the OS */
+ struct acpi_dp property_list[MAX_GENERIC_PROPERTY_LIST];
+ int property_count;
};
/*