Loading drivers/char/tpm/tpm_i2c_infineon.c +4 −4 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ static int iic_tpm_read(u8 addr, u8 *buffer, size_t len) /* Lock the adapter for the duration of the whole sequence. */ if (!tpm_dev.client->adapter->algo->master_xfer) return -EOPNOTSUPP; i2c_lock_adapter(tpm_dev.client->adapter); i2c_lock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); if (tpm_dev.chip_type == SLB9645) { /* use a combined read for newer chips Loading Loading @@ -192,7 +192,7 @@ static int iic_tpm_read(u8 addr, u8 *buffer, size_t len) } out: i2c_unlock_adapter(tpm_dev.client->adapter); i2c_unlock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); /* take care of 'guard time' */ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); Loading Loading @@ -224,7 +224,7 @@ static int iic_tpm_write_generic(u8 addr, u8 *buffer, size_t len, if (!tpm_dev.client->adapter->algo->master_xfer) return -EOPNOTSUPP; i2c_lock_adapter(tpm_dev.client->adapter); i2c_lock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); /* prepend the 'register address' to the buffer */ tpm_dev.buf[0] = addr; Loading @@ -243,7 +243,7 @@ static int iic_tpm_write_generic(u8 addr, u8 *buffer, size_t len, usleep_range(sleep_low, sleep_hi); } i2c_unlock_adapter(tpm_dev.client->adapter); i2c_unlock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); /* take care of 'guard time' */ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); Loading drivers/i2c/busses/i2c-brcmstb.c +4 −4 Original line number Diff line number Diff line Loading @@ -689,9 +689,9 @@ static int brcmstb_i2c_suspend(struct device *dev) { struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev); i2c_lock_adapter(&i2c_dev->adapter); i2c_lock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); i2c_dev->is_suspended = true; i2c_unlock_adapter(&i2c_dev->adapter); i2c_unlock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); return 0; } Loading @@ -700,10 +700,10 @@ static int brcmstb_i2c_resume(struct device *dev) { struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev); i2c_lock_adapter(&i2c_dev->adapter); i2c_lock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); brcmstb_i2c_set_bsc_reg_defaults(i2c_dev); i2c_dev->is_suspended = false; i2c_unlock_adapter(&i2c_dev->adapter); i2c_unlock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); return 0; } Loading drivers/i2c/busses/i2c-davinci.c +2 −2 Original line number Diff line number Diff line Loading @@ -714,14 +714,14 @@ static int i2c_davinci_cpufreq_transition(struct notifier_block *nb, dev = container_of(nb, struct davinci_i2c_dev, freq_transition); i2c_lock_adapter(&dev->adapter); i2c_lock_bus(&dev->adapter, I2C_LOCK_ROOT_ADAPTER); if (val == CPUFREQ_PRECHANGE) { davinci_i2c_reset_ctrl(dev, 0); } else if (val == CPUFREQ_POSTCHANGE) { i2c_davinci_calc_clk_dividers(dev); davinci_i2c_reset_ctrl(dev, 1); } i2c_unlock_adapter(&dev->adapter); i2c_unlock_bus(&dev->adapter, I2C_LOCK_ROOT_ADAPTER); return 0; } Loading drivers/i2c/busses/i2c-gpio.c +20 −20 Original line number Diff line number Diff line Loading @@ -82,18 +82,18 @@ static int fops_##wire##_get(void *data, u64 *val) \ { \ struct i2c_gpio_private_data *priv = data; \ \ i2c_lock_adapter(&priv->adap); \ i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ *val = get##wire(&priv->bit_data); \ i2c_unlock_adapter(&priv->adap); \ i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ return 0; \ } \ static int fops_##wire##_set(void *data, u64 val) \ { \ struct i2c_gpio_private_data *priv = data; \ \ i2c_lock_adapter(&priv->adap); \ i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ set##wire(&priv->bit_data, val); \ i2c_unlock_adapter(&priv->adap); \ i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ return 0; \ } \ DEFINE_DEBUGFS_ATTRIBUTE(fops_##wire, fops_##wire##_get, fops_##wire##_set, "%llu\n") Loading @@ -107,7 +107,7 @@ static void i2c_gpio_incomplete_transfer(struct i2c_gpio_private_data *priv, struct i2c_algo_bit_data *bit_data = &priv->bit_data; int i; i2c_lock_adapter(&priv->adap); i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); /* START condition */ setsda(bit_data, 0); Loading @@ -123,7 +123,7 @@ static void i2c_gpio_incomplete_transfer(struct i2c_gpio_private_data *priv, udelay(bit_data->udelay); } i2c_unlock_adapter(&priv->adap); i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); } static int fops_incomplete_addr_phase_set(void *data, u64 addr) Loading drivers/i2c/busses/i2c-s3c2410.c +2 −2 Original line number Diff line number Diff line Loading @@ -919,9 +919,9 @@ static int s3c24xx_i2c_cpufreq_transition(struct notifier_block *nb, if ((val == CPUFREQ_POSTCHANGE && delta_f < 0) || (val == CPUFREQ_PRECHANGE && delta_f > 0)) { i2c_lock_adapter(&i2c->adap); i2c_lock_bus(&i2c->adap, I2C_LOCK_ROOT_ADAPTER); ret = s3c24xx_i2c_clockrate(i2c, &got); i2c_unlock_adapter(&i2c->adap); i2c_unlock_bus(&i2c->adap, I2C_LOCK_ROOT_ADAPTER); if (ret < 0) dev_err(i2c->dev, "cannot find frequency (%d)\n", ret); Loading Loading
drivers/char/tpm/tpm_i2c_infineon.c +4 −4 Original line number Diff line number Diff line Loading @@ -117,7 +117,7 @@ static int iic_tpm_read(u8 addr, u8 *buffer, size_t len) /* Lock the adapter for the duration of the whole sequence. */ if (!tpm_dev.client->adapter->algo->master_xfer) return -EOPNOTSUPP; i2c_lock_adapter(tpm_dev.client->adapter); i2c_lock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); if (tpm_dev.chip_type == SLB9645) { /* use a combined read for newer chips Loading Loading @@ -192,7 +192,7 @@ static int iic_tpm_read(u8 addr, u8 *buffer, size_t len) } out: i2c_unlock_adapter(tpm_dev.client->adapter); i2c_unlock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); /* take care of 'guard time' */ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); Loading Loading @@ -224,7 +224,7 @@ static int iic_tpm_write_generic(u8 addr, u8 *buffer, size_t len, if (!tpm_dev.client->adapter->algo->master_xfer) return -EOPNOTSUPP; i2c_lock_adapter(tpm_dev.client->adapter); i2c_lock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); /* prepend the 'register address' to the buffer */ tpm_dev.buf[0] = addr; Loading @@ -243,7 +243,7 @@ static int iic_tpm_write_generic(u8 addr, u8 *buffer, size_t len, usleep_range(sleep_low, sleep_hi); } i2c_unlock_adapter(tpm_dev.client->adapter); i2c_unlock_bus(tpm_dev.client->adapter, I2C_LOCK_SEGMENT); /* take care of 'guard time' */ usleep_range(SLEEP_DURATION_LOW, SLEEP_DURATION_HI); Loading
drivers/i2c/busses/i2c-brcmstb.c +4 −4 Original line number Diff line number Diff line Loading @@ -689,9 +689,9 @@ static int brcmstb_i2c_suspend(struct device *dev) { struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev); i2c_lock_adapter(&i2c_dev->adapter); i2c_lock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); i2c_dev->is_suspended = true; i2c_unlock_adapter(&i2c_dev->adapter); i2c_unlock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); return 0; } Loading @@ -700,10 +700,10 @@ static int brcmstb_i2c_resume(struct device *dev) { struct brcmstb_i2c_dev *i2c_dev = dev_get_drvdata(dev); i2c_lock_adapter(&i2c_dev->adapter); i2c_lock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); brcmstb_i2c_set_bsc_reg_defaults(i2c_dev); i2c_dev->is_suspended = false; i2c_unlock_adapter(&i2c_dev->adapter); i2c_unlock_bus(&i2c_dev->adapter, I2C_LOCK_ROOT_ADAPTER); return 0; } Loading
drivers/i2c/busses/i2c-davinci.c +2 −2 Original line number Diff line number Diff line Loading @@ -714,14 +714,14 @@ static int i2c_davinci_cpufreq_transition(struct notifier_block *nb, dev = container_of(nb, struct davinci_i2c_dev, freq_transition); i2c_lock_adapter(&dev->adapter); i2c_lock_bus(&dev->adapter, I2C_LOCK_ROOT_ADAPTER); if (val == CPUFREQ_PRECHANGE) { davinci_i2c_reset_ctrl(dev, 0); } else if (val == CPUFREQ_POSTCHANGE) { i2c_davinci_calc_clk_dividers(dev); davinci_i2c_reset_ctrl(dev, 1); } i2c_unlock_adapter(&dev->adapter); i2c_unlock_bus(&dev->adapter, I2C_LOCK_ROOT_ADAPTER); return 0; } Loading
drivers/i2c/busses/i2c-gpio.c +20 −20 Original line number Diff line number Diff line Loading @@ -82,18 +82,18 @@ static int fops_##wire##_get(void *data, u64 *val) \ { \ struct i2c_gpio_private_data *priv = data; \ \ i2c_lock_adapter(&priv->adap); \ i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ *val = get##wire(&priv->bit_data); \ i2c_unlock_adapter(&priv->adap); \ i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ return 0; \ } \ static int fops_##wire##_set(void *data, u64 val) \ { \ struct i2c_gpio_private_data *priv = data; \ \ i2c_lock_adapter(&priv->adap); \ i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ set##wire(&priv->bit_data, val); \ i2c_unlock_adapter(&priv->adap); \ i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); \ return 0; \ } \ DEFINE_DEBUGFS_ATTRIBUTE(fops_##wire, fops_##wire##_get, fops_##wire##_set, "%llu\n") Loading @@ -107,7 +107,7 @@ static void i2c_gpio_incomplete_transfer(struct i2c_gpio_private_data *priv, struct i2c_algo_bit_data *bit_data = &priv->bit_data; int i; i2c_lock_adapter(&priv->adap); i2c_lock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); /* START condition */ setsda(bit_data, 0); Loading @@ -123,7 +123,7 @@ static void i2c_gpio_incomplete_transfer(struct i2c_gpio_private_data *priv, udelay(bit_data->udelay); } i2c_unlock_adapter(&priv->adap); i2c_unlock_bus(&priv->adap, I2C_LOCK_ROOT_ADAPTER); } static int fops_incomplete_addr_phase_set(void *data, u64 addr) Loading
drivers/i2c/busses/i2c-s3c2410.c +2 −2 Original line number Diff line number Diff line Loading @@ -919,9 +919,9 @@ static int s3c24xx_i2c_cpufreq_transition(struct notifier_block *nb, if ((val == CPUFREQ_POSTCHANGE && delta_f < 0) || (val == CPUFREQ_PRECHANGE && delta_f > 0)) { i2c_lock_adapter(&i2c->adap); i2c_lock_bus(&i2c->adap, I2C_LOCK_ROOT_ADAPTER); ret = s3c24xx_i2c_clockrate(i2c, &got); i2c_unlock_adapter(&i2c->adap); i2c_unlock_bus(&i2c->adap, I2C_LOCK_ROOT_ADAPTER); if (ret < 0) dev_err(i2c->dev, "cannot find frequency (%d)\n", ret); Loading