mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
i2c: synquacer: Use HZ_PER_GHZ constant instead of plain number
Use defined constant to avoid the possible mistakes and to provide an additional information on the units. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org> Link: https://lore.kernel.org/r/20260112134900.4142954-8-andriy.shevchenko@linux.intel.com
This commit is contained in:
parent
b77f0370b0
commit
361ad74a54
1 changed files with 2 additions and 1 deletions
|
|
@ -18,9 +18,10 @@
|
|||
#include <linux/sched.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/units.h>
|
||||
|
||||
#define WAIT_PCLK(n, rate) \
|
||||
ndelay(DIV_ROUND_UP(DIV_ROUND_UP(1000000000, rate), n) + 10)
|
||||
ndelay(DIV_ROUND_UP(DIV_ROUND_UP(HZ_PER_GHZ, rate), n) + 10)
|
||||
|
||||
/* I2C register address definitions */
|
||||
#define SYNQUACER_I2C_REG_BSR (0x00 << 2) // Bus Status
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue