mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
spmi: regmap: enable userspace writes
Being able to write to spmi registers via userspace is required for quick debug and development. Enable it. The regmap framework uses dev_name to create debugfs dir names. So update the spmi devices to have proper names. Change-Id: I8a5da203b212df9a7f1410e3fcf6ee7b429856b6 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
5f54c6905c
commit
891c257dd5
2 changed files with 3 additions and 3 deletions
|
|
@ -288,7 +288,7 @@ static ssize_t regmap_map_read_file(struct file *file, char __user *user_buf,
|
|||
count, ppos);
|
||||
}
|
||||
|
||||
#undef REGMAP_ALLOW_WRITE_DEBUGFS
|
||||
#define REGMAP_ALLOW_WRITE_DEBUGFS
|
||||
#ifdef REGMAP_ALLOW_WRITE_DEBUGFS
|
||||
/*
|
||||
* This can be dangerous especially when we have clients such as
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
/*
|
||||
* Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2012-2016, The Linux Foundation. All rights reserved.
|
||||
*/
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
|
|
@ -62,7 +62,7 @@ int spmi_device_add(struct spmi_device *sdev)
|
|||
struct spmi_controller *ctrl = sdev->ctrl;
|
||||
int err;
|
||||
|
||||
dev_set_name(&sdev->dev, "%d-%02x", ctrl->nr, sdev->usid);
|
||||
dev_set_name(&sdev->dev, "spmi%d-%02x", ctrl->nr, sdev->usid);
|
||||
|
||||
err = device_add(&sdev->dev);
|
||||
if (err < 0) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue