acpi: Call acpi_fill_ssdt() only for enabled devices
Individual drivers check whether the concerned device is enabled before filling in the SSDT. Move the check before calling acpi_fill_ssdt() and remove the check in the individual drivers. BUG=None TEST=util/abuild/abuild Change-Id: Ib042bec7e8c68b38fafa60a8e965d781bddcd1f0 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/47148 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Christian Walter <christian.walter@9elements.com>
This commit is contained in:
committed by
Patrick Georgi
parent
04582e9001
commit
d1c0f958d1
@@ -27,7 +27,7 @@ static void da7219_fill_ssdt(const struct device *dev)
|
||||
};
|
||||
struct acpi_dp *dsd, *aad;
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -824,9 +824,6 @@ void dw_i2c_acpi_fill_ssdt(const struct device *dev)
|
||||
const char *path;
|
||||
unsigned int speed;
|
||||
|
||||
if (!dev->enabled)
|
||||
return;
|
||||
|
||||
bus = dw_i2c_soc_dev_to_bus(dev);
|
||||
|
||||
if (bus < 0)
|
||||
|
@@ -57,7 +57,7 @@ void i2c_generic_fill_ssdt(const struct device *dev,
|
||||
int reset_gpio_index = -1, enable_gpio_index = -1, irq_gpio_index = -1;
|
||||
const char *path = acpi_device_path(dev);
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
if (!config->hid) {
|
||||
|
@@ -22,7 +22,7 @@ static void i2c_gpiomux_bus_fill_ssdt(const struct device *dev)
|
||||
const char *scope = acpi_device_scope(dev);
|
||||
const char *path = acpi_device_path(dev);
|
||||
|
||||
if (!dev || !dev->enabled || !scope || !path)
|
||||
if (!dev || !scope || !path)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -27,7 +27,7 @@ static void i2c_gpiomux_mux_fill_ssdt(const struct device *dev)
|
||||
struct acpi_gpio_res_params param[MAX_NUM_MUX_GPIOS];
|
||||
int i;
|
||||
|
||||
if (!dev->enabled || !scope || !path)
|
||||
if (!scope || !path)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -24,7 +24,7 @@ static void max98373_fill_ssdt(const struct device *dev)
|
||||
};
|
||||
struct acpi_dp *dp;
|
||||
|
||||
if (!dev->enabled || !scope) {
|
||||
if (!scope) {
|
||||
printk(BIOS_ERR, "%s: dev not enabled\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@ static void max98390_fill_ssdt(const struct device *dev)
|
||||
struct acpi_dp *dp;
|
||||
uint64_t r0_value, temp_value;
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -24,7 +24,7 @@ static void max98927_fill_ssdt(const struct device *dev)
|
||||
};
|
||||
struct acpi_dp *dp;
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -30,7 +30,7 @@ static void nau8825_fill_ssdt(const struct device *dev)
|
||||
};
|
||||
struct acpi_dp *dp = NULL;
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
if (config->sar_threshold_num > NAU8825_MAX_BUTTONS)
|
||||
return;
|
||||
|
@@ -28,7 +28,7 @@ static void rt1011_fill_ssdt(const struct device *dev)
|
||||
struct acpi_dp *dp;
|
||||
uint64_t r0_value, temp_value;
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -27,7 +27,7 @@ static void rt5663_fill_ssdt(const struct device *dev)
|
||||
};
|
||||
struct acpi_dp *dp;
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
/* Device */
|
||||
|
@@ -28,7 +28,7 @@ static void i2c_sx9310_fill_ssdt(const struct device *dev)
|
||||
};
|
||||
struct acpi_dp *dsd;
|
||||
|
||||
if (!dev->enabled || !scope || !config)
|
||||
if (!scope || !config)
|
||||
return;
|
||||
|
||||
if (config->speed)
|
||||
|
@@ -20,7 +20,7 @@ static void i2c_tpm_fill_ssdt(const struct device *dev)
|
||||
.resource = scope,
|
||||
};
|
||||
|
||||
if (!dev->enabled || !scope)
|
||||
if (!scope)
|
||||
return;
|
||||
|
||||
if (!config->hid) {
|
||||
|
Reference in New Issue
Block a user