From aea9871a62173264fd4878486c49df5f5d4f8cfc Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 10 Apr 2019 10:22:06 -0700 Subject: drivers/i2c/sx9310: Add support for GPIO IRQ This change adds support for mainboards to use GPIO IRQ instead of IOAPIC to accomodate for cases where IOAPIC routing might not be available for certain pads. BUG=b:129794308 Change-Id: I3e2bb4280303cea177cc0c803d29140731e2b44a Signed-off-by: Furquan Shaikh Reviewed-on: https://review.coreboot.org/c/coreboot/+/32273 Reviewed-by: Aaron Durbin Reviewed-by: Duncan Laurie Tested-by: build bot (Jenkins) --- src/drivers/i2c/sx9310/sx9310.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/drivers/i2c/sx9310/sx9310.c') diff --git a/src/drivers/i2c/sx9310/sx9310.c b/src/drivers/i2c/sx9310/sx9310.c index afd9e3581f..aafd7c7cc8 100644 --- a/src/drivers/i2c/sx9310/sx9310.c +++ b/src/drivers/i2c/sx9310/sx9310.c @@ -59,7 +59,12 @@ static void i2c_sx9310_fill_ssdt(struct device *dev) acpigen_write_name("_CRS"); acpigen_write_resourcetemplate_header(); acpi_device_write_i2c(&i2c); - acpi_device_write_interrupt(&config->irq); + + if (config->irq_gpio.pin_count) + acpi_device_write_gpio(&config->irq_gpio); + else + acpi_device_write_interrupt(&config->irq); + acpigen_write_resourcetemplate_footer(); /* DSD */ -- cgit v1.2.3