regulator: stub-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: I0be1fc1e6278df828d5ffce22f425c95b425f041 Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
1351286ca4
commit
80c9b923b7
1 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,7 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012, 2016, 2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012, 2016, 2018, 2020, The Linux Foundation.
|
||||
* All rights reserved.
|
||||
*/
|
||||
|
||||
#include <linux/device.h>
|
||||
|
|
@ -12,6 +13,7 @@
|
|||
#include <linux/platform_device.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/types.h>
|
||||
#include <linux/regulator/debug-regulator.h>
|
||||
#include <linux/regulator/driver.h>
|
||||
#include <linux/regulator/machine.h>
|
||||
#include <linux/regulator/of_regulator.h>
|
||||
|
|
@ -207,6 +209,10 @@ static int regulator_stub_probe(struct platform_device *pdev)
|
|||
return rc;
|
||||
}
|
||||
|
||||
rc = devm_regulator_debug_register(dev, rdev);
|
||||
if (rc)
|
||||
dev_err(dev, "failed to register debug regulator, rc=%d\n", rc);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue