From b9cd5ece14f0aeaa713299d114fcdca46276acf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Fri, 24 Apr 2015 16:05:58 +0300 Subject: sandy/ivy boards: Rename defines from onboard.h for ACPI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adopted style from later Chromebooks. Change-Id: I4993b8f40489b6bf5d08e00089f36f293853629e Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/9992 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin --- src/mainboard/google/link/acpi/mainboard.asl | 11 ++++++++--- src/mainboard/google/link/mainboard.c | 18 +++++++++--------- src/mainboard/google/link/onboard.h | 21 ++++++++++----------- 3 files changed, 27 insertions(+), 23 deletions(-) (limited to 'src/mainboard/google/link') diff --git a/src/mainboard/google/link/acpi/mainboard.asl b/src/mainboard/google/link/acpi/mainboard.asl index a2778a0e1a..ee727e0f5e 100644 --- a/src/mainboard/google/link/acpi/mainboard.asl +++ b/src/mainboard/google/link/acpi/mainboard.asl @@ -19,6 +19,8 @@ * MA 02110-1301 USA */ +#include + Scope (\_SB) { Device (LID0) { @@ -48,15 +50,18 @@ Scope (\_SB) { Name(_HID, EisaId("PNP0C0E")) // Trackpad Wake is GPIO12 - Name(_PRW, Package(){0x1c, 0x03}) + Name(_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x03 } ) Name(_CRS, ResourceTemplate() { // PIRQE -> GSI20 - Interrupt (ResourceConsumer, Edge, ActiveLow) {20} + Interrupt (ResourceConsumer, Edge, ActiveLow) + { + BOARD_TRACKPAD_IRQ + } // SMBUS Address 0x4b - VendorShort (ADDR) {0x4b} + VendorShort (ADDR) { BOARD_TRACKPAD_I2C_ADDR } }) } diff --git a/src/mainboard/google/link/mainboard.c b/src/mainboard/google/link/mainboard.c index ed40f8fa32..a3a98fcc62 100644 --- a/src/mainboard/google/link/mainboard.c +++ b/src/mainboard/google/link/mainboard.c @@ -173,28 +173,28 @@ static int link_onboard_smbios_data(device_t dev, int *handle, len += smbios_write_type41( current, handle, - LINK_LIGHTSENSOR_NAME, /* name */ - LINK_LIGHTSENSOR_IRQ, /* instance */ + BOARD_LIGHTSENSOR_NAME, /* name */ + BOARD_LIGHTSENSOR_IRQ, /* instance */ 0, /* segment */ - LINK_LIGHTSENSOR_I2C_ADDR, /* bus */ + BOARD_LIGHTSENSOR_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */ len += smbios_write_type41( current, handle, - LINK_TRACKPAD_NAME, /* name */ - LINK_TRACKPAD_IRQ, /* instance */ + BOARD_TRACKPAD_NAME, /* name */ + BOARD_TRACKPAD_IRQ, /* instance */ 0, /* segment */ - LINK_TRACKPAD_I2C_ADDR, /* bus */ + BOARD_TRACKPAD_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */ len += smbios_write_type41( current, handle, - LINK_TOUCHSCREEN_NAME, /* name */ - LINK_TOUCHSCREEN_IRQ, /* instance */ + BOARD_TOUCHSCREEN_NAME, /* name */ + BOARD_TOUCHSCREEN_IRQ, /* instance */ 0, /* segment */ - LINK_TOUCHSCREEN_I2C_ADDR, /* bus */ + BOARD_TOUCHSCREEN_I2C_ADDR, /* bus */ 0, /* device */ 0); /* function */ diff --git a/src/mainboard/google/link/onboard.h b/src/mainboard/google/link/onboard.h index eaac383a29..2ecbdc45eb 100644 --- a/src/mainboard/google/link/onboard.h +++ b/src/mainboard/google/link/onboard.h @@ -20,18 +20,17 @@ #ifndef LINK_ONBOARD_H #define LINK_ONBOARD_H -#include +#define BOARD_LIGHTSENSOR_NAME "lightsensor" +#define BOARD_LIGHTSENSOR_I2C_ADDR 0x44 +#define BOARD_LIGHTSENSOR_IRQ 0 -#define LINK_LIGHTSENSOR_NAME "lightsensor" -#define LINK_LIGHTSENSOR_I2C_ADDR 0x44 -#define LINK_LIGHTSENSOR_IRQ 0 +#define BOARD_TRACKPAD_NAME "trackpad" +#define BOARD_TRACKPAD_I2C_ADDR 0x4b +#define BOARD_TRACKPAD_IRQ 20 +#define BOARD_TRACKPAD_WAKE_GPIO 0x1c -#define LINK_TRACKPAD_NAME "trackpad" -#define LINK_TRACKPAD_I2C_ADDR 0x4b -#define LINK_TRACKPAD_IRQ 20 - -#define LINK_TOUCHSCREEN_NAME "touchscreen" -#define LINK_TOUCHSCREEN_I2C_ADDR 0x4a -#define LINK_TOUCHSCREEN_IRQ 22 +#define BOARD_TOUCHSCREEN_NAME "touchscreen" +#define BOARD_TOUCHSCREEN_I2C_ADDR 0x4a +#define BOARD_TOUCHSCREEN_IRQ 22 #endif -- cgit v1.2.3