Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1570525
| From | Jarkko Nikula <jarkko.nikula@linux.intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Issue with i2c-designware-platdrv's suspend/runtime-suspend handling |
| Date | 2017-01-31 10:40 +0100 |
| Message-ID | <t5D4R-7sP-13@gated-at.bofh.it> (permalink) |
| References | <t3hrQ-1E3-1@gated-at.bofh.it> <t5sj7-12l-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 01/31/2017 12:05 AM, John Stultz wrote: > On Tue, Jan 24, 2017 at 2:03 PM, John Stultz <john.stultz@linaro.org> wrote: >> Doing some further debugging, it seems the problem is that the device >> is being runtime suspended, and then at suspend time, we're calling >> the same logic, calling i2c_dw_plat_prepare_clk, which causes the clk >> count warning. >> >> Removing the runtime pm ops: >> - SET_RUNTIME_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume, NULL) >> +// SET_RUNTIME_PM_OPS(dw_i2c_plat_suspend, dw_i2c_plat_resume, NULL) >> >> seems to avoid the warning, but clearly isn't ideal. :) >> >> Should there be some logic keep track of the suspend state for the >> dw_i2c_dev device so we don't try to suspend (or resume) it twice? Or >> is there something else I'm missing to keep this from happening? > > Ping? Any thoughts on how best to fix this? I'm leaning towards > adding a suspended state to the struct dw_i2c_dev. Any objections? > I wonder why device PM doesn't take care of this? If i2c-designware is enumerated from ACPI then drivers/acpi/device_pm.c: acpi_subsys_suspend() resumes devices suspended at run time before system suspend so dw_i2c_plat_suspend() won't be called twice. But still I think device PM should not attempt to suspend already suspended device? -- Jarkko
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: Issue with i2c-designware-platdrv's suspend/runtime-suspend handling John Stultz <john.stultz@linaro.org> - 2017-01-30 23:10 +0100 Re: Issue with i2c-designware-platdrv's suspend/runtime-suspend handling Jarkko Nikula <jarkko.nikula@linux.intel.com> - 2017-01-31 10:40 +0100
csiph-web