Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions drivers/i2c/gpio_i2c_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define DT_DRV_COMPAT gpio_i2c_switch

#define GPIO_I2C_TOGGLE_DELAY_US 1
#define GPIO_I2C_LOCK_TIMEOUT_US (GPIO_I2C_TOGGLE_DELAY_US * 2 + 100)
#define GPIO_I2C_LOCK_TIMEOUT_US (GPIO_I2C_TOGGLE_DELAY_US * 2 + 100)

#include <zephyr/kernel.h>
#include <zephyr/device.h>
Expand Down Expand Up @@ -91,8 +91,9 @@ static int gpio_i2c_switch_init(const struct device *dev)
.gpio = GPIO_DT_SPEC_GET(DT_DRV_INST(inst), gpios), \
}; \
\
I2C_DEVICE_DT_INST_DEFINE(inst, gpio_i2c_switch_init, device_pm_control_nop, \
&gpio_i2c_switch_dev_data_##inst, &gpio_i2c_switch_dev_cfg_##inst, \
POST_KERNEL, CONFIG_I2C_INIT_PRIORITY, &gpio_i2c_switch_api_funcs);
I2C_DEVICE_DT_INST_DEFINE(inst, gpio_i2c_switch_init, NULL, \
&gpio_i2c_switch_dev_data_##inst, \
&gpio_i2c_switch_dev_cfg_##inst, POST_KERNEL, \
CONFIG_I2C_INIT_PRIORITY, &gpio_i2c_switch_api_funcs);

DT_INST_FOREACH_STATUS_OKAY(DEFINE_GPIO_I2C_SWITCH)