]> git.sur5r.net Git - u-boot/blobdiff - drivers/power/sy8106a.c
clk: Add Actions Semi OWL clock support
[u-boot] / drivers / power / sy8106a.c
index bbf116f6559512a0794d6ced4086cdfcddc365e0..45f47939869af317dd5df8313450457f7b97d139 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * (C) Copyright 2016
  * Jelle van der Waa <jelle@vdwaa.nl>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 #include <common.h>
 #include <i2c.h>
@@ -12,6 +11,7 @@
 #define SY8106A_VOUT1_SEL 1
 #define SY8106A_VOUT1_SEL_ENABLE (1 << 7)
 
+#ifdef CONFIG_SPL_BUILD
 static u8 sy8106a_mvolt_to_cfg(int mvolt, int min, int max, int div)
 {
        if (mvolt < min)
@@ -27,3 +27,4 @@ int sy8106a_set_vout1(unsigned int mvolt)
        u8 data = sy8106a_mvolt_to_cfg(mvolt, 680, 1950, 10) | SY8106A_VOUT1_SEL_ENABLE;
        return i2c_write(SY8106A_I2C_ADDR, SY8106A_VOUT1_SEL, 1, &data, 1);
 }
+#endif