From: Mark Brown <broonie@kernel.org>
To: Nikesh Oswal <nikesh@opensource.wolfsonmicro.com>
Cc: lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.de,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
patches@opensource.wolfsonmicro.com, Nikesh.Oswal@cirrus.com
Subject: Re: [PATCH] ASoC: dapm: add kcontrol to switch regulator to regulated/bypass state
Date: Tue, 8 Sep 2015 14:22:47 +0100 [thread overview]
Message-ID: <20150908132247.GD9751@sirena.org.uk> (raw)
In-Reply-To: <1441707249-11259-1-git-send-email-nikesh@opensource.wolfsonmicro.com>
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
On Tue, Sep 08, 2015 at 11:14:09AM +0100, Nikesh Oswal wrote:
> When regulator is defined with SND_SOC_DAPM_REGULATOR_CONTROL_BYPASS
> flag, then a kcontrol will be created which can be used to switch
> regulator to regulated/bypass state. This will help to control the
> behaviour of the regulator based on a usecase. For example voice call
> may need a regulated voltage to acheive higher quality whereas voice
> trigger may need bypass voltage so as to save on power.
This is really not a good idea, moving a regulator from regulated to
bypass without coordination with the driver is a recipie for bugs at
best and physical damage at worst. It's something that should be being
done by the device driver based on the current state of the device, the
general model is that we always drive to the lowest power state possible
based on what the device is currently doing. If the device is set up to
do something that can use an unregulated supply then it should put the
supply into bypass mode without any help from userspace.
As I think we went through the last time you submitted code to the core
it is very important that we have coherent and safe abstractions that
result in code which does what it says. The code in the core has to
work coherently for everyone, just randomly punching holes through
abstractions for system specific hacks from userspace is not going to do
that.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-09-08 13:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-08 10:14 [PATCH] ASoC: dapm: add kcontrol to switch regulator to regulated/bypass state Nikesh Oswal
2015-09-08 13:22 ` Mark Brown [this message]
2015-09-10 10:13 ` Nikesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150908132247.GD9751@sirena.org.uk \
--to=broonie@kernel.org \
--cc=Nikesh.Oswal@cirrus.com \
--cc=alsa-devel@alsa-project.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nikesh@opensource.wolfsonmicro.com \
--cc=patches@opensource.wolfsonmicro.com \
--cc=perex@perex.cz \
--cc=tiwai@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox