Skip to content

PENDING: i2c: qcom-geni: Fix -EACCES error during system resume#483

Open
vdadhani wants to merge 1 commit intoqualcomm-linux:qcom-6.18.yfrom
vdadhani:i2c-noirq-issue
Open

PENDING: i2c: qcom-geni: Fix -EACCES error during system resume#483
vdadhani wants to merge 1 commit intoqualcomm-linux:qcom-6.18.yfrom
vdadhani:i2c-noirq-issue

Conversation

@vdadhani
Copy link
Copy Markdown

When other drivers attempt I2C transfers during early resume phase, the I2C controller is still runtime suspended, causing pm_runtime_get_sync() to fail with -EACCES (-13):

[ 101.914202] geni_i2c 980000.i2c: error turning SE resources:-13

The PM runtime core returns -EACCES when runtime PM is disabled (dev->power.disable_depth > 0). This occurs because:

  1. During suspend_noirq, I2C driver calls geni_i2c_runtime_suspend() and then pm_runtime_disable()
  2. I2C driver's noirq_resume only marks adapter as resumed but doesn't re-enable runtime PM or power up the hardware
  3. Other drivers resuming later attempt I2C transfers
  4. pm_runtime_get_sync() returns -EACCES because runtime PM is still disabled

Fix this by calling pm_runtime_force_resume() in geni_i2c_resume_noirq() to properly resume the hardware and re-enable runtime PM during the noirq phase. This ensures the I2C controller is powered and ready for use when other drivers need it during resume.

Upstream-Status: Pending
CRs-Fixed: 4485578

When other drivers attempt I2C transfers during early resume phase, the
I2C controller is still runtime suspended, causing pm_runtime_get_sync()
to fail with -EACCES (-13):

  [  101.914202] geni_i2c 980000.i2c: error turning SE resources:-13

The PM runtime core returns -EACCES when runtime PM is disabled
(dev->power.disable_depth > 0). This occurs because:

1. During suspend_noirq, I2C driver calls geni_i2c_runtime_suspend()
   and then pm_runtime_disable()
2. I2C driver's noirq_resume only marks adapter as resumed but doesn't
   re-enable runtime PM or power up the hardware
3. Other drivers resuming later attempt I2C transfers
4. pm_runtime_get_sync() returns -EACCES because runtime PM is still
   disabled

Fix this by calling pm_runtime_force_resume() in geni_i2c_resume_noirq()
to properly resume the hardware and re-enable runtime PM during the noirq
phase. This ensures the I2C controller is powered and ready for use when
other drivers need it during resume.

Upstream-Status: Pending
Signed-off-by: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant