diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2023-05-26 14:57:37 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2023-06-05 12:03:35 +0200 |
commit | 252f211bd0328c6a3d7d30eaf4d59a8363f3d578 (patch) | |
tree | 6dc16a11e24288240a9b797aa3fb9f707c974308 /drivers/i2c | |
parent | 3c4b88de7e2f61a8c742c7cf0ae59e83cf1e6b35 (diff) |
i2c: rzv2m: Replace lowercase macros with static inline functions
Convert macros bit_setl and bit_clrl with static inline functions
as normally we'd put macro names in all uppercase.
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-rzv2m.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-rzv2m.c b/drivers/i2c/busses/i2c-rzv2m.c index dee9b6e655c5..f4b805eae0f6 100644 --- a/drivers/i2c/busses/i2c-rzv2m.c +++ b/drivers/i2c/busses/i2c-rzv2m.c @@ -50,9 +50,6 @@ #define IICB0MDSC BIT(7) /* Bus Mode */ #define IICB0SLSE BIT(1) /* Start condition output */ -#define bit_setl(addr, val) writel(readl(addr) | (val), (addr)) -#define bit_clrl(addr, val) writel(readl(addr) & ~(val), (addr)) - struct rzv2m_i2c_priv { void __iomem *base; struct i2c_adapter adap; @@ -78,6 +75,16 @@ static const struct bitrate_config bitrate_configs[] = { [RZV2M_I2C_400K] = { 52, 900 }, }; +static inline void bit_setl(void __iomem *addr, u32 val) +{ + writel(readl(addr) | val, addr); +} + +static inline void bit_clrl(void __iomem *addr, u32 val) +{ + writel(readl(addr) & ~val, addr); +} + static irqreturn_t rzv2m_i2c_tia_irq_handler(int this_irq, void *dev_id) { struct rzv2m_i2c_priv *priv = dev_id; |