summaryrefslogtreecommitdiff
path: root/src/vendorcode/google/chromeos
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode/google/chromeos')
-rw-r--r--src/vendorcode/google/chromeos/acpi.c9
-rw-r--r--src/vendorcode/google/chromeos/chromeos.h11
-rw-r--r--src/vendorcode/google/chromeos/gnvs.c3
3 files changed, 11 insertions, 12 deletions
diff --git a/src/vendorcode/google/chromeos/acpi.c b/src/vendorcode/google/chromeos/acpi.c
index 5a54d70527..383cd313f3 100644
--- a/src/vendorcode/google/chromeos/acpi.c
+++ b/src/vendorcode/google/chromeos/acpi.c
@@ -6,11 +6,16 @@
#endif
#include "chromeos.h"
-void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num)
+void chromeos_acpi_gpio_generate(void)
{
- size_t i;
+ const struct cros_gpio *gpios;
+ size_t i, num;
int gpio_num;
+ gpios = variant_cros_gpios(&num);
+ if (!gpios)
+ return;
+
acpigen_write_scope("\\");
acpigen_write_name("OIPG");
diff --git a/src/vendorcode/google/chromeos/chromeos.h b/src/vendorcode/google/chromeos/chromeos.h
index da25617121..34a9f57a8d 100644
--- a/src/vendorcode/google/chromeos/chromeos.h
+++ b/src/vendorcode/google/chromeos/chromeos.h
@@ -38,16 +38,9 @@ void chromeos_init_chromeos_acpi(void);
enum cb_err get_dsm_calibration_from_key(const char *key, uint64_t *value);
/*
- * Create the OIPG package containing the Chrome OS gpios described by
- * the chromeos_gpio array.
- */
-struct cros_gpio;
-void chromeos_acpi_gpio_generate(const struct cros_gpio *gpios, size_t num);
-
-/*
* Declaration for mainboards to use to generate ACPI-specific Chrome OS needs.
*/
-void mainboard_chromeos_acpi_generate(void);
+void chromeos_acpi_gpio_generate(void);
enum {
CROS_GPIO_REC = 1, /* Recovery */
@@ -104,4 +97,6 @@ struct cros_gpio {
#define CROS_GPIO_PE_AH(num, dev) \
CROS_GPIO_PE_INITIALIZER(CROS_GPIO_ACTIVE_HIGH, num, dev)
+const struct cros_gpio *variant_cros_gpios(size_t *num);
+
#endif /* __CHROMEOS_H__ */
diff --git a/src/vendorcode/google/chromeos/gnvs.c b/src/vendorcode/google/chromeos/gnvs.c
index 33389b4ebf..faaa646b43 100644
--- a/src/vendorcode/google/chromeos/gnvs.c
+++ b/src/vendorcode/google/chromeos/gnvs.c
@@ -98,6 +98,5 @@ void acpi_fill_cnvs(void)
acpigen_write_opregion(&cnvs_op);
acpigen_pop_len();
- /* Usually this creates OIPG package for GPIOs. */
- mainboard_chromeos_acpi_generate();
+ chromeos_acpi_gpio_generate();
}