Skip to content

Commit 24c6d4b

Browse files
Wolfram Sangwsakernel
authored andcommitted
i2c: rcar: make sure irq is not threaded on Gen2 and earlier
Ensure this irq runs as fast as possible. Signed-off-by: Wolfram Sang <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent 25c2e0f commit 24c6d4b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/i2c/busses/i2c-rcar.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
928928
struct rcar_i2c_priv *priv;
929929
struct i2c_adapter *adap;
930930
struct device *dev = &pdev->dev;
931+
unsigned long irqflags = 0;
931932
int ret;
932933

933934
/* Otherwise logic will break because some bytes must always use PIO */
@@ -976,6 +977,9 @@ static int rcar_i2c_probe(struct platform_device *pdev)
976977

977978
rcar_i2c_write(priv, ICSAR, 0); /* Gen2: must be 0 if not using slave */
978979

980+
if (priv->devtype < I2C_RCAR_GEN3)
981+
irqflags |= IRQF_NO_THREAD;
982+
979983
if (priv->devtype == I2C_RCAR_GEN3) {
980984
priv->rstc = devm_reset_control_get_exclusive(&pdev->dev, NULL);
981985
if (!IS_ERR(priv->rstc)) {
@@ -995,7 +999,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
995999
priv->flags |= ID_P_HOST_NOTIFY;
9961000

9971001
priv->irq = platform_get_irq(pdev, 0);
998-
ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, 0, dev_name(dev), priv);
1002+
ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, irqflags, dev_name(dev), priv);
9991003
if (ret < 0) {
10001004
dev_err(dev, "cannot get irq %d\n", priv->irq);
10011005
goto out_pm_disable;

0 commit comments

Comments
 (0)