+3
-1
drivers/i2c/busses/i2c-qup.c
+3
-1
drivers/i2c/busses/i2c-qup.c
+1
-23
drivers/i2c/busses/i2c-tegra.c
+1
-23
drivers/i2c/busses/i2c-tegra.c
···
607
607
static int tegra_i2c_init(struct tegra_i2c_dev *i2c_dev)
608
608
{
609
609
u32 val, clk_divisor, clk_multiplier, tsu_thd, tlow, thigh, non_hs_mode;
610
-
acpi_handle handle = ACPI_HANDLE(i2c_dev->dev);
611
610
struct i2c_timings *t = &i2c_dev->timings;
612
611
int err;
613
612
···
618
619
* emit a noisy warning on error, which won't stay unnoticed and
619
620
* won't hose machine entirely.
620
621
*/
621
-
if (handle)
622
-
err = acpi_evaluate_object(handle, "_RST", NULL, NULL);
623
-
else
624
-
err = reset_control_reset(i2c_dev->rst);
625
-
622
+
err = device_reset(i2c_dev->dev);
626
623
WARN_ON_ONCE(err);
627
624
628
625
if (IS_DVC(i2c_dev))
···
1661
1666
i2c_dev->is_vi = true;
1662
1667
}
1663
1668
1664
-
static int tegra_i2c_init_reset(struct tegra_i2c_dev *i2c_dev)
1665
-
{
1666
-
if (ACPI_HANDLE(i2c_dev->dev))
1667
-
return 0;
1668
-
1669
-
i2c_dev->rst = devm_reset_control_get_exclusive(i2c_dev->dev, "i2c");
1670
-
if (IS_ERR(i2c_dev->rst))
1671
-
return dev_err_probe(i2c_dev->dev, PTR_ERR(i2c_dev->rst),
1672
-
"failed to get reset control\n");
1673
-
1674
-
return 0;
1675
-
}
1676
-
1677
1669
static int tegra_i2c_init_clocks(struct tegra_i2c_dev *i2c_dev)
1678
1670
{
1679
1671
int err;
···
1769
1787
return err;
1770
1788
1771
1789
tegra_i2c_parse_dt(i2c_dev);
1772
-
1773
-
err = tegra_i2c_init_reset(i2c_dev);
1774
-
if (err)
1775
-
return err;
1776
1790
1777
1791
err = tegra_i2c_init_clocks(i2c_dev);
1778
1792
if (err)
+8
-7
drivers/i2c/busses/i2c-virtio.c
+8
-7
drivers/i2c/busses/i2c-virtio.c
···
116
116
for (i = 0; i < num; i++) {
117
117
struct virtio_i2c_req *req = &reqs[i];
118
118
119
-
wait_for_completion(&req->completion);
120
-
121
-
if (!failed && req->in_hdr.status != VIRTIO_I2C_MSG_OK)
122
-
failed = true;
119
+
if (!failed) {
120
+
if (wait_for_completion_interruptible(&req->completion))
121
+
failed = true;
122
+
else if (req->in_hdr.status != VIRTIO_I2C_MSG_OK)
123
+
failed = true;
124
+
else
125
+
j++;
126
+
}
123
127
124
128
i2c_put_dma_safe_msg_buf(reqs[i].buf, &msgs[i], !failed);
125
-
126
-
if (!failed)
127
-
j++;
128
129
}
129
130
130
131
return j;