summaryrefslogtreecommitdiff
path: root/zephyr
diff options
context:
space:
mode:
authorAndrew McRae <amcrae@google.com>2022-01-31 19:02:07 +1100
committerCommit Bot <commit-bot@chromium.org>2022-01-31 21:08:11 +0000
commit5645163e23cc6ae591bbb2d16c5388fba551daa6 (patch)
tree9fe89d105b44a390447953d280d110ca45c543de /zephyr
parent035fc6081a584d1943cdb3eab96575d39f114d47 (diff)
downloadchrome-ec-5645163e23cc6ae591bbb2d16c5388fba551daa6.tar.gz
lazor: Migrate GPIO access to Zephyr API
Migrate the GPIO access to use the Zephyr GPIO API. BUG=b:216466985 TEST=zmake configure -b lazor BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I4a7b516977aa2d9ba193b6c1ab48d32134bc4da2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426252 Reviewed-by: Aaron Massey <aaronmassey@google.com>
Diffstat (limited to 'zephyr')
-rw-r--r--zephyr/projects/trogdor/lazor/gpio.dts4
-rw-r--r--zephyr/projects/trogdor/lazor/src/led.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/zephyr/projects/trogdor/lazor/gpio.dts b/zephyr/projects/trogdor/lazor/gpio.dts
index 7ec9003c31..b38fea23a5 100644
--- a/zephyr/projects/trogdor/lazor/gpio.dts
+++ b/zephyr/projects/trogdor/lazor/gpio.dts
@@ -221,11 +221,11 @@
usb_a_cdp_ilim_en {
gpios = <&gpio7 5 GPIO_OUT_HIGH>;
};
- ec_chg_led_y_c1 {
+ gpio_ec_chg_led_y_c1: ec_chg_led_y_c1 {
gpios = <&gpioc 3 GPIO_OUT_LOW>;
enum-name = "GPIO_EC_CHG_LED_Y_C1";
};
- ec_chg_led_b_c1 {
+ gpio_ec_chg_led_b_c1: ec_chg_led_b_c1 {
gpios = <&gpioc 4 GPIO_OUT_LOW>;
enum-name = "GPIO_EC_CHG_LED_B_C1";
};
diff --git a/zephyr/projects/trogdor/lazor/src/led.c b/zephyr/projects/trogdor/lazor/src/led.c
index 6921068aa0..737be33b1d 100644
--- a/zephyr/projects/trogdor/lazor/src/led.c
+++ b/zephyr/projects/trogdor/lazor/src/led.c
@@ -44,9 +44,9 @@ enum led_color {
static void led_set_color(enum led_color color)
{
- gpio_set_level(GPIO_EC_CHG_LED_Y_C1,
+ gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ec_chg_led_y_c1),
(color == LED_AMBER) ? BAT_LED_ON : BAT_LED_OFF);
- gpio_set_level(GPIO_EC_CHG_LED_B_C1,
+ gpio_pin_set_dt(GPIO_DT_FROM_NODELABEL(gpio_ec_chg_led_b_c1),
(color == LED_BLUE) ? BAT_LED_ON : BAT_LED_OFF);
}