[lkml]   [2018]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 3/3] regulator: mcp16502: add regulator driver for MCP16502
On Wed, Nov 21, 2018 at 03:44:31PM +0000, wrote:

> Thank you for your review. While working on the next version I realized that
> the implementation should change a bit. The mcp16502 PMIC has separate
> registers
> for each of its operating modes (Performance, Active, Low-power, Hibernate).
> So, it is possible to setup the values for Low-power (Linux standby) and
> Hibernate (Linux suspend-to-ram) and these values would not be affected by
> changes made during runtime (which are made to the ACTIVE registers).

This is totally normal for regulators, it's the only way that suspend
modes can function sensibly since suspend mode configuration is
typically not capable off supplying the processor. If your driver is
currently trying to use the normal operating registers then it's buggy.

> This means that the calls to suspend_set_* are not necessary to be made each
> time the board suspends. My idea is to add three functions to the
> regulator_ops
> (setup_suspend_standby/mem/max) which would be called after the regulator is
> registered and which would set the values found inside the devicetree
> in the regulator-state-standby/mem/disk subnodes.

There is no need to add new operations, we already have a number of
suspend specific operations covering enable state, modes and voltage.
You should just use those, there's already code to call them.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2018-11-23 14:44    [W:0.039 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site