Lines Matching refs:context
84 struct i2c_gpio_context *context = dev->data; in i2c_gpio_configure() local
87 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_configure()
89 rc = i2c_bitbang_configure(&context->bitbang, dev_config); in i2c_gpio_configure()
91 k_mutex_unlock(&context->mutex); in i2c_gpio_configure()
98 struct i2c_gpio_context *context = dev->data; in i2c_gpio_get_config() local
101 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_get_config()
103 rc = i2c_bitbang_get_config(&context->bitbang, config); in i2c_gpio_get_config()
108 k_mutex_unlock(&context->mutex); in i2c_gpio_get_config()
116 struct i2c_gpio_context *context = dev->data; in i2c_gpio_transfer() local
119 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_transfer()
121 rc = i2c_bitbang_transfer(&context->bitbang, msgs, num_msgs, in i2c_gpio_transfer()
124 k_mutex_unlock(&context->mutex); in i2c_gpio_transfer()
131 struct i2c_gpio_context *context = dev->data; in i2c_gpio_recover_bus() local
134 k_mutex_lock(&context->mutex, K_FOREVER); in i2c_gpio_recover_bus()
136 rc = i2c_bitbang_recover_bus(&context->bitbang); in i2c_gpio_recover_bus()
138 k_mutex_unlock(&context->mutex); in i2c_gpio_recover_bus()
155 struct i2c_gpio_context *context = dev->data; in i2c_gpio_init() local
187 i2c_bitbang_init(&context->bitbang, &io_fns, (void *)config); in i2c_gpio_init()
190 err = i2c_bitbang_configure(&context->bitbang, in i2c_gpio_init()
197 err = k_mutex_init(&context->mutex); in i2c_gpio_init()