mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
regulator: rpmh-regulator: add support for debugfs control
Add support for debugfs control of a regulator's state. This is useful for testing and debugging. Change-Id: I26da17c0cf45b942680eb4813d8cc7d0b58e6d29 Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
96f3cd3912
commit
442fbd3fa6
|
|
@ -12,6 +12,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/regulator/debug-regulator.h>
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
|
|
@ -1814,6 +1815,11 @@ static int rpmh_regulator_init_vreg(struct rpmh_vreg *vreg)
|
|||
vreg_err(vreg, "failed to register proxy consumer, rc=%d\n",
|
||||
rc);
|
||||
|
||||
rc = devm_regulator_debug_register(dev, vreg->rdev);
|
||||
if (rc)
|
||||
vreg_err(vreg, "failed to register debug regulator, rc=%d\n",
|
||||
rc);
|
||||
|
||||
vreg_debug(vreg, "successfully registered; set=%s\n",
|
||||
vreg->set_active && vreg->set_sleep
|
||||
? "active + sleep"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user