linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Regulator suspend state dt question
@ 2012-12-06  6:25 Abhilash Kesavan
  2012-12-06  6:28 ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Abhilash Kesavan @ 2012-12-06  6:25 UTC (permalink / raw)
  To: devicetree-discuss, linux-kernel, grant.likely, lrg, broonie
  Cc: Doug Anderson, Olof Johansson, Thomas Abraham

Hi,

Max77686 PMIC has dt support and I wanted to specify the suspend state of the
regulator via dt. set_suspend_disable and set_suspend_mode call-backs are
already implemented in drivers/regulator/max77686.c.

As of now there is no support in the regulator core to specify the suspend state
(mode, enabled/disabled) using dt. I can add new properties specifying
the intial_state,
mode, enable/disable but I am not too sure if it is appropriate to add
such bindings to
the device tree as they are not actually describing the hardware.

Is calling regulator_suspend_prepare from a machine specific file an option ?

Kindly provide me with suggestions as to how I may proceed with this.

Regards,
Abhilash

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Regulator suspend state dt question
  2012-12-06  6:25 Regulator suspend state dt question Abhilash Kesavan
@ 2012-12-06  6:28 ` Mark Brown
  2012-12-06  7:02   ` Abhilash Kesavan
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2012-12-06  6:28 UTC (permalink / raw)
  To: Abhilash Kesavan
  Cc: devicetree-discuss, linux-kernel, grant.likely, lrg,
	Doug Anderson, Olof Johansson, Thomas Abraham

On Thu, Dec 06, 2012 at 11:55:11AM +0530, Abhilash Kesavan wrote:

> As of now there is no support in the regulator core to specify the suspend state
> (mode, enabled/disabled) using dt. I can add new properties specifying
> the intial_state,
> mode, enable/disable but I am not too sure if it is appropriate to add
> such bindings to
> the device tree as they are not actually describing the hardware.

Well, it does depend on the hardware a bit - some hardware is hard wired
to only have one possible suspend state due to power up requirements.
But for a lot of hardware it's flexible...  

> Is calling regulator_suspend_prepare from a machine specific file an option ?

This is not really relevant, it's an orthogonal thing about when we
trigger the state transition in the regulator.

It's not clear what a good solution is here, sorry.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Regulator suspend state dt question
  2012-12-06  6:28 ` Mark Brown
@ 2012-12-06  7:02   ` Abhilash Kesavan
  0 siblings, 0 replies; 3+ messages in thread
From: Abhilash Kesavan @ 2012-12-06  7:02 UTC (permalink / raw)
  To: Mark Brown
  Cc: devicetree-discuss, linux-kernel, grant.likely, lrg,
	Doug Anderson, Olof Johansson, Thomas Abraham

Hi Mark,

On Thu, Dec 6, 2012 at 11:58 AM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Thu, Dec 06, 2012 at 11:55:11AM +0530, Abhilash Kesavan wrote:
>
>> As of now there is no support in the regulator core to specify the suspend state
>> (mode, enabled/disabled) using dt. I can add new properties specifying
>> the intial_state,
>> mode, enable/disable but I am not too sure if it is appropriate to add
>> such bindings to
>> the device tree as they are not actually describing the hardware.
>
> Well, it does depend on the hardware a bit - some hardware is hard wired
> to only have one possible suspend state due to power up requirements.
> But for a lot of hardware it's flexible...
So, adding such new properties to the drivers/regulator/of_regulator.c
file would
not be acceptable right ?
>
>> Is calling regulator_suspend_prepare from a machine specific file an option ?
>
> This is not really relevant, it's an orthogonal thing about when we
> trigger the state transition in the regulator.
OK
>
> It's not clear what a good solution is here, sorry.
Would it be acceptable that I add a new optional "op_mode" property
for max77686 ?
If the property is found in dt then assign the value to
max77686->opmode[i] else use
enable_mask. I'll be doing this in probe for all the regulators.

Thanks for your help.

Abhilash

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-06  7:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-06  6:25 Regulator suspend state dt question Abhilash Kesavan
2012-12-06  6:28 ` Mark Brown
2012-12-06  7:02   ` Abhilash Kesavan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).