projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4c0ad47
)
i2c: hisi: use HZ_PER_KHZ macro in units.h
author
Yicong Yang
<yangyicong@hisilicon.com>
Fri, 10 Jun 2022 07:51:06 +0000
(15:51 +0800)
committer
Wolfram Sang
<wsa@kernel.org>
Wed, 15 Jun 2022 20:40:13 +0000
(22:40 +0200)
HZ macros has been centralized in units.h since [1]. Use it to avoid
duplicated definition.
[1] commit
e2c77032fcbe
("units: add the HZ macros")
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-hisi.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-hisi.c
b/drivers/i2c/busses/i2c-hisi.c
index acf3948120613f969d5fb203cfcc733c4ce5cd94..76c3d8f6fc3c6e4ed24b9bc4619905bfab08b41d 100644
(file)
--- a/
drivers/i2c/busses/i2c-hisi.c
+++ b/
drivers/i2c/busses/i2c-hisi.c
@@
-15,6
+15,7
@@
#include <linux/mod_devicetable.h>
#include <linux/platform_device.h>
#include <linux/property.h>
+#include <linux/units.h>
#define HISI_I2C_FRAME_CTRL 0x0000
#define HISI_I2C_FRAME_CTRL_SPEED_MODE GENMASK(1, 0)
@@
-80,8
+81,6
@@
#define HISI_I2C_TX_F_AE_THRESH 1
#define HISI_I2C_RX_F_AF_THRESH 60
-#define HZ_PER_KHZ 1000
-
#define NSEC_TO_CYCLES(ns, clk_rate_khz) \
DIV_ROUND_UP_ULL((clk_rate_khz) * (ns), NSEC_PER_MSEC)