mirror of
https://github.com/torvalds/linux.git
synced 2026-08-01 20:22:08 +02:00
mfd: qcom-i2c-pmic: add debugfs register read/write support
Add support for fine-grain PMIC register reading and writing via debugfs. Change-Id: Ia4d15615478df36bb632e450a5d9f7ace1b8ba50 Signed-off-by: David Collins <collinsd@codeaurora.org>
This commit is contained in:
parent
6fbee21063
commit
d973d28aed
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2016-2018, 2020, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
|
||||
#define pr_fmt(fmt) "I2C PMIC: %s: " fmt, __func__
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
#include <linux/module.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/qti-regmap-debugfs.h>
|
||||
#include <linux/regmap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
|
|
@ -534,6 +535,8 @@ static int i2c_pmic_probe(struct i2c_client *client,
|
|||
if (!chip->regmap)
|
||||
return -ENODEV;
|
||||
|
||||
devm_regmap_qti_debugfs_register(chip->dev, chip->regmap);
|
||||
|
||||
i2c_set_clientdata(client, chip);
|
||||
if (!of_property_read_bool(chip->dev->of_node, "interrupt-controller"))
|
||||
goto probe_children;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user