diff options
author | Alex Frid <afrid@nvidia.com> | 2014-01-27 21:14:59 -0800 |
---|---|---|
committer | Diwakar Tundlam <dtundlam@nvidia.com> | 2014-01-31 12:46:51 -0800 |
commit | 7a0b3f24a0d72f096db318b8a10c544438853fc2 (patch) | |
tree | 5edb0379748a7ae4a3b2dfb03be7413806e47851 /arch/arm/mach-tegra/dvfs.c | |
parent | 03801a7af0d3c2354531c668f5d8248e249819be (diff) |
ARM: tegra: dvfs: Add dvfs rail notification
Added dvfs rail notification interface as a simple wrapper around the
respective regulator notification. This is done in order to simplify
registration for clients that are not (and must not be) consumers of
the dvfs-managed regulators.
Bug 1363113
Bug 1343366
Change-Id: I2e5a7aa5c1beb493c3a80fc36621582bd5089435
Signed-off-by: Alex Frid <afrid@nvidia.com>
Reviewed-on: http://git-master/r/360764
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/dvfs.c')
-rw-r--r-- | arch/arm/mach-tegra/dvfs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/dvfs.c b/arch/arm/mach-tegra/dvfs.c index 4f26330ce455..2e8ed0761e39 100644 --- a/arch/arm/mach-tegra/dvfs.c +++ b/arch/arm/mach-tegra/dvfs.c @@ -1471,6 +1471,24 @@ int tegra_dvfs_rail_set_mode(struct dvfs_rail *rail, unsigned int mode) return ret; } +int tegra_dvfs_rail_register_notifier(struct dvfs_rail *rail, + struct notifier_block *nb) +{ + if (!rail || !rail->reg) + return -ENOENT; + + return regulator_register_notifier(rail->reg, nb); +} + +int tegra_dvfs_rail_unregister_notifier(struct dvfs_rail *rail, + struct notifier_block *nb) +{ + if (!rail || !rail->reg) + return -ENOENT; + + return regulator_unregister_notifier(rail->reg, nb); +} + bool tegra_dvfs_rail_updating(struct clk *clk) { return (!clk ? false : |