All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
To: kishon-l0cyMroinI0@public.gmane.org,
	tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org,
	balbi-l0cyMroinI0@public.gmane.org
Cc: george.cherian-l0cyMroinI0@public.gmane.org,
	balajitk-l0cyMroinI0@public.gmane.org,
	hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	rogerq-l0cyMroinI0@public.gmane.org
Subject: [PATCH v2 06/13] phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
Date: Thu, 6 Mar 2014 16:38:42 +0200	[thread overview]
Message-ID: <1394116729-28811-7-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1394116729-28811-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>

SATA PHY doesn't need 'wkupclk; and 'refclk' so don't
try to get them for SATA PHY.

Signed-off-by: Roger Quadros <rogerq-l0cyMroinI0@public.gmane.org>
---
 drivers/phy/phy-ti-pipe3.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c
index f141237..baa3f78d 100644
--- a/drivers/phy/phy-ti-pipe3.c
+++ b/drivers/phy/phy-ti-pipe3.c
@@ -294,16 +294,22 @@ static int ti_pipe3_probe(struct platform_device *pdev)
 
 	phy->dev		= &pdev->dev;
 
-	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
-	if (IS_ERR(phy->wkupclk)) {
-		dev_err(&pdev->dev, "unable to get wkupclk\n");
-		return PTR_ERR(phy->wkupclk);
-	}
+	if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) {
+
+		phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
+		if (IS_ERR(phy->wkupclk)) {
+			dev_err(&pdev->dev, "unable to get wkupclk\n");
+			return PTR_ERR(phy->wkupclk);
+		}
 
-	phy->refclk = devm_clk_get(phy->dev, "refclk");
-	if (IS_ERR(phy->refclk)) {
-		dev_err(&pdev->dev, "unable to get refclk\n");
-		return PTR_ERR(phy->refclk);
+		phy->refclk = devm_clk_get(phy->dev, "refclk");
+		if (IS_ERR(phy->refclk)) {
+			dev_err(&pdev->dev, "unable to get refclk\n");
+			return PTR_ERR(phy->refclk);
+		}
+	} else {
+		phy->wkupclk = ERR_PTR(-ENODEV);
+		phy->refclk = ERR_PTR(-ENODEV);
 	}
 
 	phy->sys_clk = devm_clk_get(phy->dev, "sysclk");
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: rogerq@ti.com (Roger Quadros)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 06/13] phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
Date: Thu, 6 Mar 2014 16:38:42 +0200	[thread overview]
Message-ID: <1394116729-28811-7-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1394116729-28811-1-git-send-email-rogerq@ti.com>

SATA PHY doesn't need 'wkupclk; and 'refclk' so don't
try to get them for SATA PHY.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/phy/phy-ti-pipe3.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c
index f141237..baa3f78d 100644
--- a/drivers/phy/phy-ti-pipe3.c
+++ b/drivers/phy/phy-ti-pipe3.c
@@ -294,16 +294,22 @@ static int ti_pipe3_probe(struct platform_device *pdev)
 
 	phy->dev		= &pdev->dev;
 
-	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
-	if (IS_ERR(phy->wkupclk)) {
-		dev_err(&pdev->dev, "unable to get wkupclk\n");
-		return PTR_ERR(phy->wkupclk);
-	}
+	if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) {
+
+		phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
+		if (IS_ERR(phy->wkupclk)) {
+			dev_err(&pdev->dev, "unable to get wkupclk\n");
+			return PTR_ERR(phy->wkupclk);
+		}
 
-	phy->refclk = devm_clk_get(phy->dev, "refclk");
-	if (IS_ERR(phy->refclk)) {
-		dev_err(&pdev->dev, "unable to get refclk\n");
-		return PTR_ERR(phy->refclk);
+		phy->refclk = devm_clk_get(phy->dev, "refclk");
+		if (IS_ERR(phy->refclk)) {
+			dev_err(&pdev->dev, "unable to get refclk\n");
+			return PTR_ERR(phy->refclk);
+		}
+	} else {
+		phy->wkupclk = ERR_PTR(-ENODEV);
+		phy->refclk = ERR_PTR(-ENODEV);
 	}
 
 	phy->sys_clk = devm_clk_get(phy->dev, "sysclk");
-- 
1.8.3.2

WARNING: multiple messages have this Message-ID (diff)
From: Roger Quadros <rogerq@ti.com>
To: <kishon@ti.com>, <tony@atomide.com>, <balbi@ti.com>
Cc: <george.cherian@ti.com>, <balajitk@ti.com>, <hdegoede@redhat.com>,
	<linux-omap@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-usb@vger.kernel.org>, <linux-ide@vger.kernel.org>,
	<rogerq@ti.com>
Subject: [PATCH v2 06/13] phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY
Date: Thu, 6 Mar 2014 16:38:42 +0200	[thread overview]
Message-ID: <1394116729-28811-7-git-send-email-rogerq@ti.com> (raw)
In-Reply-To: <1394116729-28811-1-git-send-email-rogerq@ti.com>

SATA PHY doesn't need 'wkupclk; and 'refclk' so don't
try to get them for SATA PHY.

Signed-off-by: Roger Quadros <rogerq@ti.com>
---
 drivers/phy/phy-ti-pipe3.c | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c
index f141237..baa3f78d 100644
--- a/drivers/phy/phy-ti-pipe3.c
+++ b/drivers/phy/phy-ti-pipe3.c
@@ -294,16 +294,22 @@ static int ti_pipe3_probe(struct platform_device *pdev)
 
 	phy->dev		= &pdev->dev;
 
-	phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
-	if (IS_ERR(phy->wkupclk)) {
-		dev_err(&pdev->dev, "unable to get wkupclk\n");
-		return PTR_ERR(phy->wkupclk);
-	}
+	if (!of_device_is_compatible(node, "ti,phy-pipe3-sata")) {
+
+		phy->wkupclk = devm_clk_get(phy->dev, "wkupclk");
+		if (IS_ERR(phy->wkupclk)) {
+			dev_err(&pdev->dev, "unable to get wkupclk\n");
+			return PTR_ERR(phy->wkupclk);
+		}
 
-	phy->refclk = devm_clk_get(phy->dev, "refclk");
-	if (IS_ERR(phy->refclk)) {
-		dev_err(&pdev->dev, "unable to get refclk\n");
-		return PTR_ERR(phy->refclk);
+		phy->refclk = devm_clk_get(phy->dev, "refclk");
+		if (IS_ERR(phy->refclk)) {
+			dev_err(&pdev->dev, "unable to get refclk\n");
+			return PTR_ERR(phy->refclk);
+		}
+	} else {
+		phy->wkupclk = ERR_PTR(-ENODEV);
+		phy->refclk = ERR_PTR(-ENODEV);
 	}
 
 	phy->sys_clk = devm_clk_get(phy->dev, "sysclk");
-- 
1.8.3.2


  parent reply	other threads:[~2014-03-06 14:38 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 14:38 [PATCH v2 00/13][RESEND] ARM: OMAP: SATA support for OMAP5 & DRA7 Roger Quadros
2014-03-06 14:38 ` Roger Quadros
2014-03-06 14:38 ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 01/13] phy: rename struct omap_control_usb to struct omap_control_phy Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 15:37   ` Kishon Vijay Abraham I
2014-03-06 15:37     ` Kishon Vijay Abraham I
2014-03-06 15:37     ` Kishon Vijay Abraham I
2014-03-06 15:56     ` Felipe Balbi
2014-03-06 15:56       ` Felipe Balbi
2014-03-06 15:56       ` Felipe Balbi
2014-03-06 14:38 ` [PATCH v2 02/13] phy: omap-control: Update DT binding information Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 15:40   ` Kishon Vijay Abraham I
2014-03-06 15:40     ` Kishon Vijay Abraham I
2014-03-06 15:40     ` Kishon Vijay Abraham I
2014-03-06 15:58     ` Felipe Balbi
2014-03-06 15:58       ` Felipe Balbi
2014-03-06 15:58       ` Felipe Balbi
2014-03-06 14:38 ` [PATCH v2 03/13] phy: omap-control: update dra7 and am437 usb2 bindings Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 15:41   ` Kishon Vijay Abraham I
2014-03-06 15:41     ` Kishon Vijay Abraham I
2014-03-06 15:41     ` Kishon Vijay Abraham I
2014-03-07  8:25     ` [PATCH v4] phy: omap-control: update dra7 and am437 usb2 Documentation bindings Kishon Vijay Abraham I
2014-03-07  8:25     ` Kishon Vijay Abraham I
2014-03-07  8:26       ` Kishon Vijay Abraham I
2014-03-07  8:26         ` Kishon Vijay Abraham I
2014-03-07  8:26         ` Kishon Vijay Abraham I
2014-03-06 16:00   ` [PATCH v2 03/13] phy: omap-control: update dra7 and am437 usb2 bindings Felipe Balbi
2014-03-06 16:00     ` Felipe Balbi
2014-03-06 16:00     ` Felipe Balbi
2014-03-06 14:38 ` [PATCH v2 04/13] phy: ti-pipe3: cleanup clock handling Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 15:45   ` Kishon Vijay Abraham I
2014-03-06 15:45     ` Kishon Vijay Abraham I
2014-03-06 15:45     ` Kishon Vijay Abraham I
2014-03-06 14:38 ` [PATCH v2 05/13] phy: ti-pipe3: Add SATA DPLL support Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 15:45   ` Kishon Vijay Abraham I
2014-03-06 15:45     ` Kishon Vijay Abraham I
2014-03-06 15:45     ` Kishon Vijay Abraham I
     [not found] ` <1394116729-28811-1-git-send-email-rogerq-l0cyMroinI0@public.gmane.org>
2014-03-06 14:38   ` Roger Quadros [this message]
2014-03-06 14:38     ` [PATCH v2 06/13] phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY Roger Quadros
2014-03-06 14:38     ` Roger Quadros
2014-03-06 15:31     ` [PATCH v3 " Roger Quadros
2014-03-06 15:31       ` Roger Quadros
2014-03-06 15:31       ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 07/13] phy: ti-pipe3: streamline PHY operations Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 08/13] phy: ti-pipe3: Fix suspend/resume and module reload Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 09/13] phy: omap: Depend on OMAP_OCP2SCP bus driver Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 10/13] ARM: OMAP5: hwmod: Add ocp2scp3 and sata hwmods Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 11/13] ARM: dts: omap5: add sata node Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 12/13] ARM: DRA7: hwmod: Add ocp2scp3 and sata hwmods Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38 ` [PATCH v2 13/13] ARM: dts: dra7: add OCP2SCP3 and SATA nodes Roger Quadros
2014-03-06 14:38   ` Roger Quadros
2014-03-06 14:38   ` Roger Quadros
  -- strict thread matches above, loose matches on Subject: below --
2014-03-06 14:22 [PATCH v2 00/13] ARM: OMAP: SATA support for OMAP5 & DRA7 Roger Quadros
2014-03-06 14:22 ` [PATCH v2 06/13] phy: ti-pipe3: Don't get 'wkupclk' and 'refclk' for SATA PHY Roger Quadros
2014-03-06 14:22   ` Roger Quadros
2014-03-06 14:22   ` Roger Quadros

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=1394116729-28811-7-git-send-email-rogerq@ti.com \
    --to=rogerq-l0cymroini0@public.gmane.org \
    --cc=balajitk-l0cyMroinI0@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=george.cherian-l0cyMroinI0@public.gmane.org \
    --cc=hdegoede-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=kishon-l0cyMroinI0@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=linux-ide-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.