Combine Broadwell Chromeboxes using variant board scheme
[coreboot.git] / src / mainboard / google / jecht / led.c
blob50cf32e3e1580b5c64c15caab6bcbeeba7fdd0a7
1 /*
2 * This file is part of the coreboot project.
4 * Copyright (C) 2015 Google Inc.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
16 #include <types.h>
17 #include <superio/ite/it8772f/it8772f.h>
18 #include "onboard.h"
20 void set_power_led(int state)
22 it8772f_gpio_led(IT8772F_GPIO_DEV,
23 1, /* set */
24 0x01, /* select */
25 state == LED_OFF ? 0x00 : 0x01, /* polarity */
26 state == LED_BLINK ? 0x01 : 0x00, /* pullup/pulldown */
27 0x01, /* output */
28 state == LED_BLINK ? 0x00 : 0x01, /* I/O function */
29 SIO_GPIO_BLINK_GPIO10,
30 IT8772F_GPIO_BLINK_FREQUENCY_1_HZ);