[lkml]   [2017]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v3 0/1] pwm: pca9685: fix gpio-only operation.
Mika, I investigated what's required to suspend the device on remove,
by compiling as a module and running insmod/rmmod in various

As you suspected, pm_runtime_suspend() is unneccessary. I removed it,
and the chip is suspended ok when the module unloads. But this could be
because the pm_runtime refcnt is always zero when _remove() is called ?

When unloading the module (rmmod) :
If a gpio is still exported, the kernel unexports the gpio before calling
If a pwm is still exported, the kernel refuses to rmmod the module. Even
'rmmod -f' does not work.

I am not sure if the kernel will ever call _unload() without releasing
the associated pwms/gpios. And if it ever does, I am also not sure how
we could convince pm_runtime to go to suspend.

remove unnecessary call to pm_runtime_suspend()

fix coding style for multi-line comment
( should ideally catch this, but did not?)

the pm_runtime framework controls the SLEEP bit, as suggested by
Mika Westerberg.

the SLEEP bit is always on.

Sven Van Asbroeck (1):
pwm: pca9685: fix gpio-only operation.

drivers/pwm/pwm-pca9685.c | 111 ++++++++++++++++++++++++++++++++--------------
1 file changed, 78 insertions(+), 33 deletions(-)


 \ /
  Last update: 2017-04-12 17:17    [W:0.031 / U:6.164 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site