From ce01ecffdda38667a142baaa5d9882f0c7ee0c63 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Lothar=20Wa=C3=9Fmann?= Date: Thu, 15 Jan 2015 18:19:04 +0100 Subject: [PATCH] karo: tx6: Cleanup PMIC code Conflicts: board/karo/tx6/ltc3676.c board/karo/tx6/rn5t567.c board/karo/tx6/rn5t618.c --- board/karo/tx6/ltc3676.c | 2 +- board/karo/tx6/rn5t567.c | 2 +- board/karo/tx6/rn5t618.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/board/karo/tx6/ltc3676.c b/board/karo/tx6/ltc3676.c index c43e914304..53cf5e2382 100644 --- a/board/karo/tx6/ltc3676.c +++ b/board/karo/tx6/ltc3676.c @@ -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))) diff --git a/board/karo/tx6/rn5t567.c b/board/karo/tx6/rn5t567.c index a4a58844e4..6f791374b4 100644 --- a/board/karo/tx6/rn5t567.c +++ b/board/karo/tx6/rn5t567.c @@ -53,7 +53,7 @@ #define VDD_DDR_VAL_LP mV_to_regval(1350) /* calculate voltages in 10mV */ -#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) /* DCDC1-3 */ diff --git a/board/karo/tx6/rn5t618.c b/board/karo/tx6/rn5t618.c index 538dd5574a..19aba871af 100644 --- a/board/karo/tx6/rn5t618.c +++ b/board/karo/tx6/rn5t618.c @@ -51,7 +51,7 @@ #define VDD_DDR_VAL_LP mV_to_regval(1500) /* calculate voltages in 10mV */ -#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) /* DCDC1-3 */ -- 2.39.2