Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1620871 > unrolled thread
| Started by | Sven Van Asbroeck <thesven73@gmail.com> |
|---|---|
| First post | 2017-04-11 05:40 +0200 |
| Last post | 2017-04-11 11:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Sven Van Asbroeck <thesven73@gmail.com> - 2017-04-11 05:40 +0200
Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. Mika Westerberg <mika.westerberg@linux.intel.com> - 2017-04-11 11:20 +0200
| From | Sven Van Asbroeck <thesven73@gmail.com> |
|---|---|
| Date | 2017-04-11 05:40 +0200 |
| Subject | Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation. |
| Message-ID | <tuUOR-1zj-1@gated-at.bofh.it> |
> How about implementing a real runtime PM in the driver? Then when the > device is idle regardless of whether it is GPIO or PWM, the SLEEP bit is > set and cleared accordingly. You mean: increase the runtime_pm refcnt when a pwm/gpio is enabled, and vice versa ? And don't touch the refcnt on pwm/gpio export/unexport? Neat. I will test such a solution and try to post it within the next few days.
[toc] | [next] | [standalone]
| From | Mika Westerberg <mika.westerberg@linux.intel.com> |
|---|---|
| Date | 2017-04-11 11:20 +0200 |
| Message-ID | <tv07U-50R-17@gated-at.bofh.it> |
| In reply to | #1620871 |
On Mon, Apr 10, 2017 at 11:35:39PM -0400, Sven Van Asbroeck wrote: > > How about implementing a real runtime PM in the driver? Then when the > > device is idle regardless of whether it is GPIO or PWM, the SLEEP bit is > > set and cleared accordingly. > > You mean: increase the runtime_pm refcnt when a pwm/gpio is enabled, > and vice versa ? And don't touch the refcnt on pwm/gpio export/unexport? I mean whenever the thing is in use, it is in runtime PM active state. Then when the last user closes the device, it goest to runtime PM suspend state where you effectively set that SLEEP bit. The functions for refcounting are called pm_runtime_get* and pm_runtime_put*. You need to implement runtime PM callbacks for the driver as well. See Documentation/power/runtime_pm.txt for more information.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web