linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Collins <collinsd@codeaurora.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: David Collins <collinsd@codeaurora.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [RESEND PATCH] spmi: prefix spmi bus device names with "spmi"
Date: Tue, 22 Sep 2020 15:04:18 -0700	[thread overview]
Message-ID: <1600812258-17722-1-git-send-email-collinsd@codeaurora.org> (raw)

Change the format of spmi bus device names from:
  <spmi_bus_number>-<spmi_device_sid>
  Example: 0-01
to this:
  spmi<spmi_bus_number>-<spmi_device_sid>
  Example: spmi0-01

This helps to disambiguate SPMI device regmaps from I2C ones
at /sys/kernel/debug/regmap since I2C devices use a very
similar naming scheme: 0-0000.

Signed-off-by: David Collins <collinsd@codeaurora.org>
---
 drivers/spmi/spmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c
index c16b60f..ec94439 100644
--- a/drivers/spmi/spmi.c
+++ b/drivers/spmi/spmi.c
@@ -1,6 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0-only
 /*
- * Copyright (c) 2012-2015, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2015, 2020, 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) {
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


             reply	other threads:[~2020-09-22 22:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-22 22:04 David Collins [this message]
2020-10-01  0:07 ` [RESEND PATCH] spmi: prefix spmi bus device names with "spmi" Stephen Boyd
2020-10-01 17:43   ` Mark Brown
2020-10-01 18:51     ` Stephen Boyd
2020-10-02  0:45       ` David Collins
2020-10-02 16:03         ` Mark Brown
2020-10-02 17:48           ` Stephen Boyd
2020-10-02 18:04             ` Mark Brown
2020-10-02 21:39               ` Stephen Boyd
2020-10-14  0:59                 ` David Collins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1600812258-17722-1-git-send-email-collinsd@codeaurora.org \
    --to=collinsd@codeaurora.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).