devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Julius Werner <jwerner@chromium.org>
To: Felipe Balbi <balbi@ti.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-samsung-soc@vger.kernel.org,
	Tomasz Figa <t.figa@samsung.com>,
	Vivek Gautam <gautam.vivek@samsung.com>,
	devicetree@vger.kernel.org,
	Sylwester Nawrocki <sylvester.nawrocki@gmail.com>,
	Julius Werner <jwerner@chromium.org>
Subject: [PATCH 2/3] usb: phy-samsung-usb: trivial: rename pmuregs variable
Date: Thu,  1 Aug 2013 17:52:05 -0700	[thread overview]
Message-ID: <1375404726-26264-3-git-send-email-jwerner@chromium.org> (raw)
In-Reply-To: <1375404726-26264-1-git-send-email-jwerner@chromium.org>

Now that the sphy->pmuregs variable always points to only a single
register, let's rename it to make that more clear.

Signed-off-by: Julius Werner <jwerner@chromium.org>
---
 drivers/usb/phy/phy-samsung-usb.c  | 14 +++++++-------
 drivers/usb/phy/phy-samsung-usb.h  |  4 ++--
 drivers/usb/phy/phy-samsung-usb2.c |  4 ++--
 drivers/usb/phy/phy-samsung-usb3.c |  4 ++--
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/usb/phy/phy-samsung-usb.c b/drivers/usb/phy/phy-samsung-usb.c
index 51cad19..fa382c9 100644
--- a/drivers/usb/phy/phy-samsung-usb.c
+++ b/drivers/usb/phy/phy-samsung-usb.c
@@ -42,9 +42,9 @@ int samsung_usbphy_parse_dt(struct samsung_usbphy *sphy)
 		return -ENODEV;
 	}
 
-	sphy->pmuregs = of_iomap(usbphy_sys, 0);
+	sphy->pmureg = of_iomap(usbphy_sys, 0);
 
-	if (sphy->pmuregs == NULL) {
+	if (sphy->pmureg == NULL) {
 		dev_err(sphy->dev, "Can't get usb-phy pmu control register\n");
 		goto err0;
 	}
@@ -77,23 +77,23 @@ void samsung_usbphy_set_isolation_4210(struct samsung_usbphy *sphy, bool on)
 {
 	u32 reg_val;
 
-	if (!sphy->pmuregs) {
+	if (!sphy->pmureg) {
 		dev_warn(sphy->dev, "Can't set pmu isolation\n");
 		return;
 	}
 
-	reg_val = readl(sphy->pmuregs);
+	reg_val = readl(sphy->pmureg);
 
 	if (on)
 		reg_val &= ~sphy->drv_data->phy_en_mask;
 	else
 		reg_val |= sphy->drv_data->phy_en_mask;
 
-	writel(reg_val, sphy->pmuregs);
+	writel(reg_val, sphy->pmureg);
 
 	if (sphy->drv_data->cpu_type == TYPE_EXYNOS4X12) {
-		writel(reg_val, sphy->pmuregs + EXYNOS4X12_PHY_HSIC_CTRL0);
-		writel(reg_val, sphy->pmuregs + EXYNOS4X12_PHY_HSIC_CTRL1);
+		writel(reg_val, sphy->pmureg + EXYNOS4X12_PHY_HSIC_CTRL0);
+		writel(reg_val, sphy->pmureg + EXYNOS4X12_PHY_HSIC_CTRL1);
 	}
 }
 EXPORT_SYMBOL_GPL(samsung_usbphy_set_isolation_4210);
diff --git a/drivers/usb/phy/phy-samsung-usb.h b/drivers/usb/phy/phy-samsung-usb.h
index a817af5..f2e9c4a 100644
--- a/drivers/usb/phy/phy-samsung-usb.h
+++ b/drivers/usb/phy/phy-samsung-usb.h
@@ -281,7 +281,7 @@ struct samsung_usbphy_drvdata {
  * @dev: The parent device supplied to the probe function
  * @clk: usb phy clock
  * @regs: usb phy controller registers memory base
- * @pmuregs: USB device PHY_CONTROL register memory base
+ * @pmureg: USB device PHY_CONTROL register address
  * @sysreg: USB2.0 PHY_CFG register memory base
  * @ref_clk_freq: reference clock frequency selection
  * @drv_data: driver data available for different SoCs
@@ -296,7 +296,7 @@ struct samsung_usbphy {
 	struct device	*dev;
 	struct clk	*clk;
 	void __iomem	*regs;
-	void __iomem	*pmuregs;
+	void __iomem	*pmureg;
 	void __iomem	*sysreg;
 	int		ref_clk_freq;
 	const struct samsung_usbphy_drvdata *drv_data;
diff --git a/drivers/usb/phy/phy-samsung-usb2.c b/drivers/usb/phy/phy-samsung-usb2.c
index adbaa8c..c2c83d4 100644
--- a/drivers/usb/phy/phy-samsung-usb2.c
+++ b/drivers/usb/phy/phy-samsung-usb2.c
@@ -435,8 +435,8 @@ static int samsung_usb2phy_remove(struct platform_device *pdev)
 
 	usb_remove_phy(&sphy->phy);
 
-	if (sphy->pmuregs)
-		iounmap(sphy->pmuregs);
+	if (sphy->pmureg)
+		iounmap(sphy->pmureg);
 	if (sphy->sysreg)
 		iounmap(sphy->sysreg);
 
diff --git a/drivers/usb/phy/phy-samsung-usb3.c b/drivers/usb/phy/phy-samsung-usb3.c
index 3ad9579..6259a35 100644
--- a/drivers/usb/phy/phy-samsung-usb3.c
+++ b/drivers/usb/phy/phy-samsung-usb3.c
@@ -292,8 +292,8 @@ static int samsung_usb3phy_remove(struct platform_device *pdev)
 
 	usb_remove_phy(&sphy->phy);
 
-	if (sphy->pmuregs)
-		iounmap(sphy->pmuregs);
+	if (sphy->pmureg)
+		iounmap(sphy->pmureg);
 	if (sphy->sysreg)
 		iounmap(sphy->sysreg);
 
-- 
1.7.12.4


  parent reply	other threads:[~2013-08-02  0:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02  0:52 [PATCH 0/3] usb: phy-samsung-usb: Simplify and cleanup Julius Werner
2013-08-02  0:52 ` [PATCH 1/3] usb: phy-samsung-usb: Simplify PMU register handling Julius Werner
2013-08-02  7:51   ` Felipe Balbi
2013-08-06 18:00     ` Julius Werner
2013-08-02  0:52 ` Julius Werner [this message]
2013-08-02  0:52 ` [PATCH 3/3] usb: phy-samsung-usb: Remove USB_PHY_TYPE from Samsung PHY driver Julius Werner

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=1375404726-26264-3-git-send-email-jwerner@chromium.org \
    --to=jwerner@chromium.org \
    --cc=balbi@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=gautam.vivek@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=sylvester.nawrocki@gmail.com \
    --cc=t.figa@samsung.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).