From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: linux-kernel@vger.kernel.org,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: [PATCH 1/2] regulator: Don't increment use_count for boot_on regulators
Date: Mon, 16 Mar 2009 19:36:33 +0000 [thread overview]
Message-ID: <1237232194-24113-1-git-send-email-broonie@opensource.wolfsonmicro.com> (raw)
Don't set use_count for regulators that are enabled at boot since this
stops the supply being disabled by well-behaved consumers which do
balanced enables and disabled. Any consumers which don't do disables
which are not matched by enables are unable to share regulators - shared
regulators are the common case so the API should facilitate them.
Consumers that want to disable regulators that are enabled when they
start have two options:
- Do a regulator_enable() prior to the disable to bring the use count
in sync with the hardware state; this will ensure that if the
regulator was enabled by another driver then this consumer will play
nicely with it.
- Use regulator_force_disable(); this explicitly bypasses any checks
done by the core and documents the inability of the driver to share
the supply.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/regulator/core.c | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 9448875..8588a24 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -814,7 +814,6 @@ static int set_machine_constraints(struct regulator_dev *rdev,
rdev->constraints = NULL;
goto out;
}
- rdev->use_count = 1;
}
print_constraints(rdev);
--
1.6.2
next reply other threads:[~2009-03-16 19:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-16 19:36 Mark Brown [this message]
2009-03-16 19:36 ` [PATCH 2/2] regulator: Support disabling of unused regulators by machines Mark Brown
2009-03-19 18:09 ` Liam Girdwood
2009-03-19 18:09 ` [PATCH 1/2] regulator: Don't increment use_count for boot_on regulators Liam Girdwood
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=1237232194-24113-1-git-send-email-broonie@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@slimlogic.co.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.