Skip to content

Commit

Permalink
i2c: ocores: Move system PM hooks to the NOIRQ phase
Browse files Browse the repository at this point in the history
[ Upstream commit 382561d ]

When an I2C device contains a wake IRQ subordinate to a regmap-irq chip,
the regmap-irq code must be able to perform I2C transactions during
suspend_device_irqs() and resume_device_irqs(). Therefore, the bus must
be suspended/resumed during the NOIRQ phase.

Signed-off-by: Samuel Holland <[email protected]>
Acked-by: Peter Korsgaard <[email protected]>
Reviewed-by: Andi Shyti <[email protected]>
Signed-off-by: Wolfram Sang <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
  • Loading branch information
SiFiveHolland authored and gregkh committed Dec 13, 2023
1 parent f5d1065 commit 22a59e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/i2c/busses/i2c-ocores.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,8 +771,8 @@ static int ocores_i2c_resume(struct device *dev)
return ocores_init(dev, i2c);
}

static DEFINE_SIMPLE_DEV_PM_OPS(ocores_i2c_pm,
ocores_i2c_suspend, ocores_i2c_resume);
static DEFINE_NOIRQ_DEV_PM_OPS(ocores_i2c_pm,
ocores_i2c_suspend, ocores_i2c_resume);

static struct platform_driver ocores_i2c_driver = {
.probe = ocores_i2c_probe,
Expand Down

0 comments on commit 22a59e5

Please sign in to comment.