Lines Matching refs:gpio_res
1283 struct mlxbf_i2c_resource *gpio_res; in mlxbf_i2c_get_gpio() local
1288 gpio_res = mlxbf_i2c_get_shared_resource(priv, MLXBF_I2C_GPIO_RES); in mlxbf_i2c_get_gpio()
1289 if (!gpio_res) in mlxbf_i2c_get_gpio()
1297 lockdep_assert_held(gpio_res->lock); in mlxbf_i2c_get_gpio()
1300 if (gpio_res->io) in mlxbf_i2c_get_gpio()
1303 params = gpio_res->params; in mlxbf_i2c_get_gpio()
1309 gpio_res->io = devm_ioremap(dev, params->start, size); in mlxbf_i2c_get_gpio()
1310 if (!gpio_res->io) { in mlxbf_i2c_get_gpio()
1321 struct mlxbf_i2c_resource *gpio_res; in mlxbf_i2c_release_gpio() local
1325 gpio_res = mlxbf_i2c_get_shared_resource(priv, MLXBF_I2C_GPIO_RES); in mlxbf_i2c_release_gpio()
1326 if (!gpio_res) in mlxbf_i2c_release_gpio()
1329 mutex_lock(gpio_res->lock); in mlxbf_i2c_release_gpio()
1331 if (gpio_res->io) { in mlxbf_i2c_release_gpio()
1333 params = gpio_res->params; in mlxbf_i2c_release_gpio()
1334 devm_iounmap(dev, gpio_res->io); in mlxbf_i2c_release_gpio()
1339 mutex_unlock(gpio_res->lock); in mlxbf_i2c_release_gpio()
1411 struct mlxbf_i2c_resource *gpio_res; in mlxbf_i2c_init_master() local
1420 gpio_res = mlxbf_i2c_get_shared_resource(priv, MLXBF_I2C_GPIO_RES); in mlxbf_i2c_init_master()
1421 if (!gpio_res) in mlxbf_i2c_init_master()
1430 mutex_lock(gpio_res->lock); in mlxbf_i2c_init_master()
1435 mutex_unlock(gpio_res->lock); in mlxbf_i2c_init_master()
1450 config_reg = readl(gpio_res->io + MLXBF_I2C_GPIO_0_FUNC_EN_0); in mlxbf_i2c_init_master()
1453 writel(config_reg, gpio_res->io + MLXBF_I2C_GPIO_0_FUNC_EN_0); in mlxbf_i2c_init_master()
1455 config_reg = readl(gpio_res->io + MLXBF_I2C_GPIO_0_FORCE_OE_EN); in mlxbf_i2c_init_master()
1458 writel(config_reg, gpio_res->io + MLXBF_I2C_GPIO_0_FORCE_OE_EN); in mlxbf_i2c_init_master()
1460 mutex_unlock(gpio_res->lock); in mlxbf_i2c_init_master()