aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/gpio.c
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@google.com>2016-08-29 22:51:41 -0700
committerFurquan Shaikh <furquan@google.com>2016-09-01 07:30:56 +0200
commit477bc97ba0298fe03d52a0b580fd219a0958c621 (patch)
treecdc653763640c34196840a5ab2a92c6dce0adf2d /src/soc/intel/apollolake/gpio.c
parent079feec561c3433f0e64e11695b6477a9442b903 (diff)
soc/intel/apollolake: Use consistent convention for community names
Instead of using a mix of _N and _NORTH, _NW and _NORTHWEST for GPIO community names, follow one single convention. This allows for re-using macros easily. Change-Id: Icd9cf9ef70d03576d864688cf5d6946124c259c3 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://review.coreboot.org/16353 Reviewed-by: Lijian Zhao <lijian.zhao@intel.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/apollolake/gpio.c')
-rw-r--r--src/soc/intel/apollolake/gpio.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/soc/intel/apollolake/gpio.c b/src/soc/intel/apollolake/gpio.c
index 1073e169d2..e56f147b5a 100644
--- a/src/soc/intel/apollolake/gpio.c
+++ b/src/soc/intel/apollolake/gpio.c
@@ -31,25 +31,25 @@ static const struct pad_community {
const char *grp_name;
} gpio_communities[] = {
{
- .port = GPIO_SOUTHWEST,
+ .port = GPIO_SW,
.first_pad = SW_OFFSET,
.num_gpi_regs = NUM_SW_GPI_REGS,
.gpi_offset = 0,
.grp_name = "GPIO_GPE_SW",
}, {
- .port = GPIO_WEST,
+ .port = GPIO_W,
.first_pad = W_OFFSET,
.num_gpi_regs = NUM_W_GPI_REGS,
.gpi_offset = NUM_SW_GPI_REGS,
.grp_name = "GPIO_GPE_W",
}, {
- .port = GPIO_NORTHWEST,
+ .port = GPIO_NW,
.first_pad = NW_OFFSET,
.num_gpi_regs = NUM_NW_GPI_REGS,
.gpi_offset = NUM_W_GPI_REGS + NUM_SW_GPI_REGS,
.grp_name = "GPIO_GPE_NW",
}, {
- .port = GPIO_NORTH,
+ .port = GPIO_N,
.first_pad = N_OFFSET,
.num_gpi_regs = NUM_N_GPI_REGS,
.gpi_offset = NUM_NW_GPI_REGS+ NUM_W_GPI_REGS + NUM_SW_GPI_REGS,
@@ -229,13 +229,13 @@ const char *gpio_acpi_path(gpio_t gpio_num)
const struct pad_community *comm = gpio_get_community(gpio_num);
switch (comm->port) {
- case GPIO_NORTH:
+ case GPIO_N:
return "\\_SB.GPO0";
- case GPIO_NORTHWEST:
+ case GPIO_NW:
return "\\_SB.GPO1";
- case GPIO_WEST:
+ case GPIO_W:
return "\\_SB.GPO2";
- case GPIO_SOUTHWEST:
+ case GPIO_SW:
return "\\_SB.GPO3";
}
@@ -247,13 +247,13 @@ uint16_t gpio_acpi_pin(gpio_t gpio_num)
const struct pad_community *comm = gpio_get_community(gpio_num);
switch (comm->port) {
- case GPIO_NORTH:
+ case GPIO_N:
return PAD_N(gpio_num);
- case GPIO_NORTHWEST:
+ case GPIO_NW:
return PAD_NW(gpio_num);
- case GPIO_WEST:
+ case GPIO_W:
return PAD_W(gpio_num);
- case GPIO_SOUTHWEST:
+ case GPIO_SW:
return PAD_SW(gpio_num);
}