]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/tx6/ltc3676.c
karo: tx6: Cleanup PMIC code
[karo-tx-uboot.git] / board / karo / tx6 / ltc3676.c
index c43e91430464a2c1e680c3f9f905aa8619709892..53cf5e2382e423a699a7fe3efce318913655483a 100644 (file)
@@ -93,7 +93,7 @@
 #define R1(idx)                        R1_##idx
 #define R2(idx)                        R2_##idx
 
-#define v2r(v,n,m)             DIV_ROUND_UP(((((v) < (n)) ? (n) : (v)) - (n)), (m))
+#define v2r(v,n,m)             DIV_ROUND(((((v) < (n)) ? (n) : (v)) - (n)), (m))
 #define r2v(r,n,m)             (((r) * (m) + (n)) / 10)
 
 #define vout_to_vref(vout, idx)        ((vout) * R2(idx) / (R1(idx) + R2(idx)))