Skip to content

Commit d4ee678

Browse files
Ayush1325kartben
authored andcommitted
drivers: i2c: omap: Use non-named mmio macros
- Since only one mmio region is used, use the non-named macros Signed-off-by: Ayush Singh <ayush@beagleboard.org>
1 parent 9db744b commit d4ee678

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/i2c/i2c_omap.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ typedef struct {
9999
typedef void (*init_func_t)(const struct device *dev);
100100
#define DEV_CFG(dev) ((const struct i2c_omap_cfg *)(dev)->config)
101101
#define DEV_DATA(dev) ((struct i2c_omap_data *)(dev)->data)
102-
#define DEV_I2C_BASE(dev) ((i2c_omap_regs_t *)DEVICE_MMIO_NAMED_GET(dev, base))
102+
#define DEV_I2C_BASE(dev) ((i2c_omap_regs_t *)DEVICE_MMIO_GET(dev))
103103

104104
struct i2c_omap_cfg {
105-
DEVICE_MMIO_NAMED_ROM(base);
105+
DEVICE_MMIO_ROM;
106106
uint32_t irq;
107107
uint32_t speed;
108108
const struct pinctrl_dev_config *pcfg;
@@ -121,7 +121,7 @@ struct i2c_omap_speed_config {
121121
};
122122

123123
struct i2c_omap_data {
124-
DEVICE_MMIO_NAMED_RAM(base);
124+
DEVICE_MMIO_RAM;
125125
enum i2c_omap_speed speed;
126126
struct i2c_omap_speed_config speed_config;
127127
struct i2c_msg current_msg;
@@ -704,7 +704,7 @@ static int i2c_omap_init(const struct device *dev)
704704
PINCTRL_DT_INST_DEFINE(inst); \
705705
LOG_INSTANCE_REGISTER(omap_i2c, inst, CONFIG_I2C_LOG_LEVEL); \
706706
static const struct i2c_omap_cfg i2c_omap_cfg_##inst = { \
707-
DEVICE_MMIO_NAMED_ROM_INIT(base, DT_DRV_INST(inst)), \
707+
DEVICE_MMIO_ROM_INIT(DT_DRV_INST(inst)), \
708708
.irq = DT_INST_IRQN(inst), \
709709
.speed = DT_INST_PROP(inst, clock_frequency), \
710710
.pcfg = PINCTRL_DT_INST_DEV_CONFIG_GET(inst), \

0 commit comments

Comments
 (0)