linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tero Kristo <t-kristo@ti.com>
To: <linux-clk@vger.kernel.org>, <sboyd@kernel.org>,
	<mturquette@baylibre.com>
Cc: <linux-omap@vger.kernel.org>, <tony@atomide.com>
Subject: [PATCH 05/11] clk: ti: clkctrl: replace dashes from clkdm name with underscore
Date: Fri, 31 Aug 2018 18:07:01 +0300	[thread overview]
Message-ID: <1535728027-24573-6-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1535728027-24573-1-git-send-email-t-kristo@ti.com>

The change in the DTS data node naming prevents using underscore
within the node names and force usage of dash instead. On the other
hand, clockdomains use underscore instead of dash, so this must be
replaced within the driver code so that the mapping between the two
can be done properly.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/clk/ti/clkctrl.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/clk/ti/clkctrl.c b/drivers/clk/ti/clkctrl.c
index 51cb73a..a227f4b 100644
--- a/drivers/clk/ti/clkctrl.c
+++ b/drivers/clk/ti/clkctrl.c
@@ -445,6 +445,7 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
 	const __be32 *addrp;
 	u32 addr;
 	int ret;
+	char *c;
 
 	if (!(ti_clk_get_features()->flags & TI_CLK_CLKCTRL_COMPAT) &&
 	    !strcmp(node->name, "clk"))
@@ -532,6 +533,15 @@ static void __init _ti_omap4_clkctrl_setup(struct device_node *node)
 
 	strcat(provider->clkdm_name, "clkdm");
 
+	/* Replace any dash from the clkdm name with underscore */
+	c = provider->clkdm_name;
+
+	while (*c) {
+		if (*c == '-')
+			*c = '_';
+		c++;
+	}
+
 	INIT_LIST_HEAD(&provider->clocks);
 
 	/* Generate clocks */
-- 
1.9.1

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

  parent reply	other threads:[~2018-08-31 15:07 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 15:06 [PATCH 00/11] clk: ti: clkctrl data split based on clkdm boundaries Tero Kristo
2018-08-31 15:06 ` [PATCH 01/11] dt-bindings: clock: am33xx: add clkctrl indices for new data layout Tero Kristo
2018-08-31 15:06 ` [PATCH 02/11] dt-bindings: clock: am43xx: " Tero Kristo
2018-08-31 15:06 ` [PATCH 03/11] dt-bindings: clock: dra7xx: " Tero Kristo
2018-08-31 15:07 ` [PATCH 04/11] clk: ti: clkctrl: support multiple clkctrl nodes under a cm node Tero Kristo
2018-10-12 21:25   ` Stephen Boyd
2018-10-12 21:45     ` Rob Herring
2018-10-12 22:03       ` Stephen Boyd
2018-10-15 15:58         ` Tero Kristo
2018-10-15 23:38           ` Stephen Boyd
2018-10-16  7:37             ` Tero Kristo
2018-10-16 15:37               ` Stephen Boyd
2018-08-31 15:07 ` Tero Kristo [this message]
2018-08-31 15:07 ` [PATCH 06/11] clk: ti: am33xx: rename existing clkctrl data as compat data Tero Kristo
2018-08-31 15:07 ` [PATCH 07/11] clk: ti: am33xx: add new clkctrl data for am33xx Tero Kristo
2018-08-31 15:07 ` [PATCH 08/11] clk: ti: am43xx: rename existing clkctrl data as compat data Tero Kristo
2018-08-31 15:07 ` [PATCH 09/11] clk: ti: am43xx: add new clkctrl data for am43xx Tero Kristo
2018-08-31 15:07 ` [PATCH 10/11] clk: ti: dra7xx: rename existing clkctrl data as compat data Tero Kristo
2018-08-31 15:07 ` [PATCH 11/11] clk: ti: dra7: add new clkctrl data Tero Kristo
2018-09-04 15:36 ` [PATCH 00/11] clk: ti: clkctrl data split based on clkdm boundaries Tony Lindgren
2018-09-26 19:13   ` Tony Lindgren
2018-09-26 19:13     ` Tony Lindgren
2018-09-27  6:31     ` Tero Kristo
2018-09-27  6:31       ` Tero Kristo
2018-09-27 14:49       ` Tony Lindgren
2018-09-27 14:49         ` Tony Lindgren
2018-10-03 13:17         ` Tero Kristo

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=1535728027-24573-6-git-send-email-t-kristo@ti.com \
    --to=t-kristo@ti.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@kernel.org \
    --cc=tony@atomide.com \
    /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).