mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
i2c: rcar: make sure irq is not threaded on Gen2 and earlier
[ Upstream commit 24c6d4bc56 ]
Ensure this irq runs as fast as possible.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
f41d2bfef5
commit
11e2b2b6f6
|
|
@ -928,6 +928,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||||
struct rcar_i2c_priv *priv;
|
struct rcar_i2c_priv *priv;
|
||||||
struct i2c_adapter *adap;
|
struct i2c_adapter *adap;
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
|
unsigned long irqflags = 0;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Otherwise logic will break because some bytes must always use PIO */
|
/* Otherwise logic will break because some bytes must always use PIO */
|
||||||
|
|
@ -976,6 +977,9 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
|
||||||
|
|
||||||
|
if (priv->devtype < I2C_RCAR_GEN3)
|
||||||
|
irqflags |= IRQF_NO_THREAD;
|
||||||
|
|
||||||
if (priv->devtype == I2C_RCAR_GEN3) {
|
if (priv->devtype == I2C_RCAR_GEN3) {
|
||||||
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
|
||||||
if (!IS_ERR(priv->rstc)) {
|
if (!IS_ERR(priv->rstc)) {
|
||||||
|
|
@ -995,7 +999,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
|
||||||
priv->flags |= ID_P_HOST_NOTIFY;
|
priv->flags |= ID_P_HOST_NOTIFY;
|
||||||
|
|
||||||
priv->irq = platform_get_irq(pdev, 0);
|
priv->irq = platform_get_irq(pdev, 0);
|
||||||
ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, 0, dev_name(dev), priv);
|
ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, irqflags, dev_name(dev), priv);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
dev_err(dev, "cannot get irq %d\n", priv->irq);
|
dev_err(dev, "cannot get irq %d\n", priv->irq);
|
||||||
goto out_pm_disable;
|
goto out_pm_disable;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user