diff mbox series

[v5,1/4] units: Add Watt units

Message ID 20201208164145.19493-2-daniel.lezcano@linaro.org
State Accepted
Commit 2ee5f8f05949735fa2f4c463a5e13fcb3660c719
Headers show
Series powercap/dtpm: Add the DTPM framework | expand

Commit Message

Daniel Lezcano Dec. 8, 2020, 4:41 p.m. UTC
As there are the temperature units, let's add the Watt macros definition.

Cc: Thara Gopinath <thara.gopinath@linaro.org>
Cc: Lina Iyer <ilina@codeaurora.org>
Cc: Ram Chandrasekar <rkumbako@codeaurora.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>

---
 include/linux/units.h | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.17.1
diff mbox series

Patch

diff --git a/include/linux/units.h b/include/linux/units.h
index aaf716364ec3..92c234e71cab 100644
--- a/include/linux/units.h
+++ b/include/linux/units.h
@@ -4,6 +4,10 @@ 
 
 #include <linux/kernel.h>
 
+#define MILLIWATT_PER_WATT	1000L
+#define MICROWATT_PER_MILLIWATT	1000L
+#define MICROWATT_PER_WATT	1000000L
+
 #define ABSOLUTE_ZERO_MILLICELSIUS -273150
 
 static inline long milli_kelvin_to_millicelsius(long t)