summaryrefslogtreecommitdiffstats
path: root/src/superio/ite/it8772f/early_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio/ite/it8772f/early_init.c')
-rw-r--r--src/superio/ite/it8772f/early_init.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/superio/ite/it8772f/early_init.c b/src/superio/ite/it8772f/early_init.c
index 893e69b31266..eed1e9c39fb2 100644
--- a/src/superio/ite/it8772f/early_init.c
+++ b/src/superio/ite/it8772f/early_init.c
@@ -81,3 +81,22 @@ void it8772f_gpio_setup(pnp_devfn_t dev, int set, u8 select, u8 polarity,
it8772f_sio_write(dev, GPIO_REG_PULLUP(set), pullup);
it8772f_exit_conf(dev);
}
+
+/* Configure LED GPIOs */
+void it8772f_gpio_led(pnp_devfn_t dev,int set, u8 select, u8 polarity, u8 pullup,
+ u8 output, u8 enable, u8 led_pin_map, u8 led_freq)
+{
+ set--; /* Set 1 is offset 0 */
+ it8772f_enter_conf(dev);
+ it8772f_sio_write(dev, IT8772F_CONFIG_REG_LDN, IT8772F_GPIO);
+ if (set < 5) {
+ it8772f_sio_write(dev, IT8772F_GPIO_LED_BLINK1_PINMAP, led_pin_map);
+ it8772f_sio_write(dev, IT8772F_GPIO_LED_BLINK1_CONTROL, led_freq);
+ it8772f_sio_write(dev, GPIO_REG_SELECT(set), select);
+ it8772f_sio_write(dev, GPIO_REG_ENABLE(set), enable);
+ it8772f_sio_write(dev, GPIO_REG_POLARITY(set), polarity);
+ }
+ it8772f_sio_write(dev, GPIO_REG_OUTPUT(set), output);
+ it8772f_sio_write(dev, GPIO_REG_PULLUP(set), pullup);
+ it8772f_exit_conf(dev);
+}