lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 11 Apr 2017 12:11:26 +0300
From:   Mika Westerberg <mika.westerberg@...ux.intel.com>
To:     Sven Van Asbroeck <thesven73@...il.com>
Cc:     Thierry Reding <thierry.reding@...il.com>,
        linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org,
        clemens.gruber@...ruber.com, andriy.shevchenko@...ux.intel.com,
        Sven Van Asbroeck <TheSven73@...glemail.com>
Subject: Re: [PATCH 1/1] pwm: pca9685: fix gpio-only operation.

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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ