]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
units: add conversion macros for percentage related units
authorJonathan Santos <Jonathan.Santos@analog.com>
Wed, 14 Jan 2026 09:27:03 +0000 (06:27 -0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 22 Jan 2026 20:53:18 +0000 (20:53 +0000)
commit404a3b4c36f2e1987ff28d1d61d309292d2e33cb
tree66f9d626bf5daa93a9a5494fa6aed8984460dfc1
parentfa087f5babbc24db76d5b24073216fa2d7d7b57d
units: add conversion macros for percentage related units

Add macros to convert between ratio and percentage related units,
including percent (1/100), permille (1/1,000), permyriad (1/10,000,
also equivalent to one Basis point) and per cent mille (1/100,000).
Those are  Used for precise fractional calculations in engineering,
finance, and measurement applications.

Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
include/linux/units.h