Re: [PATCH] i2c: s3c2410: Don't enable PM runtime on the adapter device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/16/2015 12:33 PM, Sylwester Nawrocki wrote:
On 16/04/15 12:10, Charles Keepax wrote:
Commit 523c5b89640e ("i2c: Remove support for legacy PM") removed the PM
ops from the bus type, which causes the pm operations on the s3c2410
adapter device to fail (-ENOSUPP in rpm_callback). The adapter device
doesn't get bound to a driver and as such can't have its own pm_runtime
callbacks. Previously this was fine as the bus callbacks would have been
used, but now this can cause devices which use PM runtime and are
attached over I2C to fail to resume.

This commit fixes this issue by just doing the PM operations directly on
the I2C device, rather than the adapter device in the driver and adding
some stub callbacks for runtime suspend and resume.

Signed-off-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
---
  drivers/i2c/busses/i2c-s3c2410.c |   21 ++++++++++++++++-----
  1 files changed, 16 insertions(+), 5 deletions(-)

@@ -1253,7 +1253,6 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
  	platform_set_drvdata(pdev, i2c);


Wouldn't adding

	pm_runtime_no_callbacks(&pdev->dev);

here let us avoid the runtime resume/suspend stubs?

Or just do pm_runtime_no_callbacks on the adapter device. Preferably in the I2C core. That should solve the issue without requiring any other changes.

- Lars
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  Powered by Linux