mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
i2c: qcom-geni: Use IRQF_NO_AUTOEN flag in request_irq()
disable_irq() after request_irq() still has a time gap in which
interrupts can come. request_irq() with IRQF_NO_AUTOEN flag will
disable IRQ auto-enable when request IRQ.
Fixes: 37692de5d5
("i2c: i2c-qcom-geni: Add bus driver for the Qualcomm GENI I2C controller")
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: <stable@vger.kernel.org> # v4.19+
Acked-by: Mukesh Kumar Savaliya <quic_msavaliy@quicinc.com>
Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
This commit is contained in:
parent
1db4da5507
commit
e2c85d85a0
@ -818,15 +818,13 @@ static int geni_i2c_probe(struct platform_device *pdev)
|
|||||||
init_completion(&gi2c->done);
|
init_completion(&gi2c->done);
|
||||||
spin_lock_init(&gi2c->lock);
|
spin_lock_init(&gi2c->lock);
|
||||||
platform_set_drvdata(pdev, gi2c);
|
platform_set_drvdata(pdev, gi2c);
|
||||||
ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, 0,
|
ret = devm_request_irq(dev, gi2c->irq, geni_i2c_irq, IRQF_NO_AUTOEN,
|
||||||
dev_name(dev), gi2c);
|
dev_name(dev), gi2c);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev, "Request_irq failed:%d: err:%d\n",
|
dev_err(dev, "Request_irq failed:%d: err:%d\n",
|
||||||
gi2c->irq, ret);
|
gi2c->irq, ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
/* Disable the interrupt so that the system can enter low-power mode */
|
|
||||||
disable_irq(gi2c->irq);
|
|
||||||
i2c_set_adapdata(&gi2c->adap, gi2c);
|
i2c_set_adapdata(&gi2c->adap, gi2c);
|
||||||
gi2c->adap.dev.parent = dev;
|
gi2c->adap.dev.parent = dev;
|
||||||
gi2c->adap.dev.of_node = dev->of_node;
|
gi2c->adap.dev.of_node = dev->of_node;
|
||||||
|
Loading…
Reference in New Issue
Block a user