PD:Revert "(CR):rt1715:add debugfs interface for dump reg"

richtek default support reg dump feature at /d/rt-regmap
so revert this changes and keep richtek default configure.

This reverts commit 7bbb1dcedc862205420cbabe00d2f4134de27f6e.

Change-Id: Id1cca8463c4411aa337d36b2938bf2eb32da4f72
Reviewed-on: https://gerrit.mot.com/2137059
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
chailu1 2021-12-07 14:19:03 +08:00 • committed by Lu Chai
commit b9fcc4bd40

View file

@ -45,8 +45,6 @@
/* #define DEBUG_GPIO 66 */
#include <linux/debugfs.h>
#define RT1711H_DRV_VERSION "2.0.5_G"
#define RT1711H_IRQ_WAKE_TIME (500) /* ms */
@ -72,7 +70,6 @@ struct rt1711_chip {
int irq_gpio;
int irq;
int chip_id;
struct dentry *debug_root;
};
#ifdef CONFIG_RT_REGMAP
@ -1587,59 +1584,7 @@ static inline int rt1711h_check_revision(struct i2c_client *client)
return did;
}
#if defined(CONFIG_DEBUG_FS)
static int show_registers(struct seq_file *m, void *data)
{
struct rt1711_chip *chip = m->private;
u8 addr;
int ret;
u8 val;
for (addr = 0x0; addr <= 0xf6; addr++) {
ret = rt1711_read_device(chip->client, addr, 1, &val);
if (ret < 0) {
pr_err("read rt1715 reg%x fail(%d)\n",addr, ret);
} else
seq_printf(m, "Reg[%02X] = 0x%02X\n", addr, val);
}
return 0;
}
static int reg_debugfs_open(struct inode *inode, struct file *file)
{
struct rt1711_chip *chip = inode->i_private;
return single_open(file, show_registers, chip);
}
static const struct file_operations reg_debugfs_ops = {
.owner = THIS_MODULE,
.open = reg_debugfs_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static void create_debugfs_entry(struct rt1711_chip *chip)
{
chip->debug_root = debugfs_create_dir("rt1715-reg", NULL);
if (!chip->debug_root)
pr_err("Failed to create debug dir\n");
if (chip->debug_root) {
debugfs_create_file("registers",
S_IFREG | S_IRUGO,
chip->debug_root, chip, &reg_debugfs_ops);
}
}
#else
static void create_debugfs_entry(struct rt1711_chip *chip)
{}
#endif
static int rt1711_i2c_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@ -1707,7 +1652,6 @@ static int rt1711_i2c_probe(struct i2c_client *client,
}
tcpc_schedule_init_work(chip->tcpc);
create_debugfs_entry(chip);
pr_info("%s probe OK!\n", __func__);
return 0;