summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/i2c/generic/chip.h4
-rw-r--r--src/drivers/i2c/generic/generic.c3
-rw-r--r--src/drivers/spi/acpi/acpi.c3
-rw-r--r--src/drivers/spi/acpi/chip.h5
4 files changed, 13 insertions, 2 deletions
diff --git a/src/drivers/i2c/generic/chip.h b/src/drivers/i2c/generic/chip.h
index 8b285f054c..037a8004bc 100644
--- a/src/drivers/i2c/generic/chip.h
+++ b/src/drivers/i2c/generic/chip.h
@@ -61,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;
+ /* GPIO used to stop operation of device. */
+ struct acpi_gpio stop_gpio;
+ /* Delay to be inserted after disabling stop. */
+ unsigned stop_delay_ms;
/* Generic properties for exporting device-specific data to the OS */
struct acpi_dp property_list[MAX_GENERIC_PROPERTY_LIST];
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c
index fa27b0e9fd..460f01514b 100644
--- a/src/drivers/i2c/generic/generic.c
+++ b/src/drivers/i2c/generic/generic.c
@@ -145,7 +145,8 @@ void i2c_generic_fill_ssdt(struct device *dev,
if (config->has_power_resource)
acpi_device_add_power_res(
&config->reset_gpio, config->reset_delay_ms,
- &config->enable_gpio, config->enable_delay_ms);
+ &config->enable_gpio, config->enable_delay_ms,
+ &config->stop_gpio, config->stop_delay_ms);
/* Callback if any. */
if (callback)
diff --git a/src/drivers/spi/acpi/acpi.c b/src/drivers/spi/acpi/acpi.c
index 102780f65d..2a39814c3d 100644
--- a/src/drivers/spi/acpi/acpi.c
+++ b/src/drivers/spi/acpi/acpi.c
@@ -168,7 +168,8 @@ static void spi_acpi_fill_ssdt_generator(struct device *dev)
if (config->has_power_resource)
acpi_device_add_power_res(
&config->reset_gpio, config->reset_delay_ms,
- &config->enable_gpio, config->enable_delay_ms);
+ &config->enable_gpio, config->enable_delay_ms,
+ &config->stop_gpio, config->stop_delay_ms);
acpigen_pop_len(); /* Device */
acpigen_pop_len(); /* Scope */
diff --git a/src/drivers/spi/acpi/chip.h b/src/drivers/spi/acpi/chip.h
index 6b54100536..35341d33be 100644
--- a/src/drivers/spi/acpi/chip.h
+++ b/src/drivers/spi/acpi/chip.h
@@ -47,6 +47,11 @@ struct drivers_spi_acpi_config {
struct acpi_gpio enable_gpio;
/* Delay to be inserted after device is enabled. */
unsigned enable_delay_ms;
+
+ /* GPIO used to stop operation of device. */
+ struct acpi_gpio stop_gpio;
+ /* Delay to be inserted after disabling stop. */
+ unsigned stop_delay_ms;
};
#endif /* __SPI_ACPI_CHIP_H__ */