All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4
@ 2014-02-17  8:59 Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings Kishon Vijay Abraham I
                   ` (8 more replies)
  0 siblings, 9 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

Hi Greg,

Here's the PULL requeust for PHY subsystem for this -rc cycle. There isn't
anything major but a bunch of obvious fixes and cleanup.

Let me know If I have to change anything.

Thanks
Kishon

The following changes since commit 6d0abeca3242a88cab8232e4acd7e2bf088f3bc2:

  Linux 3.14-rc3 (2014-02-16 13:30:25 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-3.14-rc4

for you to fetch changes up to 0a06bd7ad6d603e79a2890e40190170d0c525a86:

  phy: let phy_provider_register be the last step in registering PHY (2014-02-17 13:42:10 +0530)

----------------------------------------------------------------
Bunch of obvious fixes and cleanup in PHY subsystem.

----------------------------------------------------------------
Hans de Goede (3):
      phy-core: phy_get: Leave error logging to the caller
      phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
      phy-core: Don't allow building phy-core as a module

Kishon Vijay Abraham I (1):
      phy: let phy_provider_register be the last step in registering PHY

Richard Weinberger (1):
      phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM

Sachin Kamat (3):
      usb: phy: twl4030-usb: Silence checkpatch warnings
      usb: phy: twl4030-usb: Remove redundant semicolon
      usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO

 drivers/phy/Kconfig                 |    3 ++-
 drivers/phy/phy-bcm-kona-usb2.c     |    4 +---
 drivers/phy/phy-core.c              |   14 ++++++--------
 drivers/phy/phy-exynos-dp-video.c   |    8 ++++----
 drivers/phy/phy-exynos-mipi-video.c |   10 +++++-----
 drivers/phy/phy-mvebu-sata.c        |   10 +++++-----
 drivers/phy/phy-omap-usb2.c         |   10 +++++-----
 drivers/phy/phy-twl4030-usb.c       |   16 ++++++++--------
 8 files changed, 36 insertions(+), 39 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 15+ messages in thread

* [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-18 20:11   ` Greg KH
  2014-02-17  8:59 ` [PATCH 2/8] usb: phy: twl4030-usb: Remove redundant semicolon Kishon Vijay Abraham I
                   ` (7 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Sachin Kamat <sachin.kamat@linaro.org>

Silences the following warnings:
WARNING: sizeof *twl should be sizeof(*twl)
WARNING: sizeof *otg should be sizeof(*otg)

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-twl4030-usb.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index daf65e6..254c72c 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -661,7 +661,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	struct phy_provider	*phy_provider;
 	struct phy_init_data	*init_data = NULL;
 
-	twl = devm_kzalloc(&pdev->dev, sizeof *twl, GFP_KERNEL);
+	twl = devm_kzalloc(&pdev->dev, sizeof(*twl), GFP_KERNEL);
 	if (!twl)
 		return -ENOMEM;
 
@@ -676,7 +676,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
-	otg = devm_kzalloc(&pdev->dev, sizeof *otg, GFP_KERNEL);
+	otg = devm_kzalloc(&pdev->dev, sizeof(*otg), GFP_KERNEL);
 	if (!otg)
 		return -ENOMEM;
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 2/8] usb: phy: twl4030-usb: Remove redundant semicolon
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-18 20:11   ` Greg KH
  2014-02-17  8:59 ` [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO Kishon Vijay Abraham I
                   ` (6 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Sachin Kamat <sachin.kamat@linaro.org>

Semicolon after switch statement is not needed.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-twl4030-usb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index 254c72c..ab64182 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -338,7 +338,7 @@ static void twl4030_usb_set_mode(struct twl4030_usb *twl, int mode)
 		dev_err(twl->dev, "unsupported T2 transceiver mode %d\n",
 				mode);
 		break;
-	};
+	}
 }
 
 static void twl4030_i2c_access(struct twl4030_usb *twl, int on)
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 2/8] usb: phy: twl4030-usb: Remove redundant semicolon Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-18 20:11   ` Greg KH
  2014-02-17  8:59 ` [PATCH 4/8] phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM Kishon Vijay Abraham I
                   ` (5 subsequent siblings)
  8 siblings, 1 reply; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Sachin Kamat <sachin.kamat@linaro.org>

PTR_ERR_OR_ZERO simplifies the code.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Matt Porter <mporter@linaro.org>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-bcm-kona-usb2.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/phy/phy-bcm-kona-usb2.c b/drivers/phy/phy-bcm-kona-usb2.c
index efc5c1a..e94f5a6 100644
--- a/drivers/phy/phy-bcm-kona-usb2.c
+++ b/drivers/phy/phy-bcm-kona-usb2.c
@@ -128,10 +128,8 @@ static int bcm_kona_usb2_probe(struct platform_device *pdev)
 
 	phy_provider = devm_of_phy_provider_register(dev,
 			of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
 
-	return 0;
+	return PTR_ERR_OR_ZERO(phy_provider);
 }
 
 static const struct of_device_id bcm_kona_usb2_dt_ids[] = {
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 4/8] phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
                   ` (2 preceding siblings ...)
  2014-02-17  8:59 ` [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 5/8] phy-core: phy_get: Leave error logging to the caller Kishon Vijay Abraham I
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Richard Weinberger <richard@nod.at>

On archs like S390 or um this driver cannot build nor work.
Make it depend on HAS_IOMEM to bypass build failures.

drivers/phy/phy-bcm-kona-usb2.c:114: undefined reference to `devm_ioremap_resource'

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index afa2354..79e3c70 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -61,6 +61,7 @@ config PHY_EXYNOS_DP_VIDEO
 config BCM_KONA_USB2_PHY
 	tristate "Broadcom Kona USB2 PHY Driver"
 	depends on GENERIC_PHY
+	depends on HAS_IOMEM
 	help
 	  Enable this to support the Broadcom Kona USB 2.0 PHY.
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 5/8] phy-core: phy_get: Leave error logging to the caller
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
                   ` (3 preceding siblings ...)
  2014-02-17  8:59 ` [PATCH 4/8] phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 6/8] phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller Kishon Vijay Abraham I
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Hans de Goede <hdegoede@redhat.com>

In various cases errors may be expected, ie probe-deferral or a call to
phy_get from a driver where the use of a phy is optional.

Rather then adding all sort of complicated checks for this, and/or adding
special functions like devm_phy_get_optional, simply don't log an error,
and let deciding if get_phy returning an error really should result in a
dev_err up to the caller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-core.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index 5f5b0f4..b355553 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -404,17 +404,11 @@ struct phy *phy_get(struct device *dev, const char *string)
 		index = of_property_match_string(dev->of_node, "phy-names",
 			string);
 		phy = of_phy_get(dev, index);
-		if (IS_ERR(phy)) {
-			dev_err(dev, "unable to find phy\n");
-			return phy;
-		}
 	} else {
 		phy = phy_lookup(dev, string);
-		if (IS_ERR(phy)) {
-			dev_err(dev, "unable to find phy\n");
-			return phy;
-		}
 	}
+	if (IS_ERR(phy))
+		return phy;
 
 	if (!try_module_get(phy->ops->owner))
 		return ERR_PTR(-EPROBE_DEFER);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 6/8] phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
                   ` (4 preceding siblings ...)
  2014-02-17  8:59 ` [PATCH 5/8] phy-core: phy_get: Leave error logging to the caller Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 7/8] phy-core: Don't allow building phy-core as a module Kishon Vijay Abraham I
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Hans de Goede <hdegoede@redhat.com>

The phy-core allows phy_init and phy_power_on to be called multiple times,
but before this patch -ENOSUPP from phy_pm_runtime_get_sync would be
propagated to the caller for the 2nd and later calls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/phy-core.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index b355553..6c73837 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -176,6 +176,8 @@ int phy_init(struct phy *phy)
 			dev_err(&phy->dev, "phy init failed --> %d\n", ret);
 			goto out;
 		}
+	} else {
+		ret = 0; /* Override possible ret == -ENOTSUPP */
 	}
 	++phy->init_count;
 
@@ -232,6 +234,8 @@ int phy_power_on(struct phy *phy)
 			dev_err(&phy->dev, "phy poweron failed --> %d\n", ret);
 			goto out;
 		}
+	} else {
+		ret = 0; /* Override possible ret == -ENOTSUPP */
 	}
 	++phy->power_count;
 	mutex_unlock(&phy->mutex);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 7/8] phy-core: Don't allow building phy-core as a module
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
                   ` (5 preceding siblings ...)
  2014-02-17  8:59 ` [PATCH 6/8] phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-17  8:59 ` [PATCH 8/8] phy: let phy_provider_register be the last step in registering PHY Kishon Vijay Abraham I
  2014-02-18 20:10 ` [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Greg KH
  8 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

From: Hans de Goede <hdegoede@redhat.com>

include/phy/phy.h has stub code in there for when building without the
phy-core enabled. This is useful for generic drivers such as ahci-platform,
ehci-platoform and ohci-platform which have support for driving an optional
phy passed to them through the devicetree.

Since on some boards this phy functionality is not needed, being able to
disable the phy subsystem without needing a lot of #ifdef magic in the
driver using it is quite useful.

However this breaks when the module using the phy subsystem is build-in and
the phy-core is not, which leads to the build failing with missing symbol
errors in the linking stage of the zImage.

Which leads to gems such as this being added to the Kconfig for achi_platform:

	depends on GENERIC_PHY || !GENERIC_PHY

Rather then duplicating this code in a lot of places using the phy-core,
I believe it is better to simply not allow the phy-core to be built as a
module. The phy core is quite small and has no external dependencies, so
always building it in when enabling it should not be an issue.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
 drivers/phy/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/Kconfig b/drivers/phy/Kconfig
index 79e3c70..c7a551c 100644
--- a/drivers/phy/Kconfig
+++ b/drivers/phy/Kconfig
@@ -5,7 +5,7 @@
 menu "PHY Subsystem"
 
 config GENERIC_PHY
-	tristate "PHY Core"
+	bool "PHY Core"
 	help
 	  Generic PHY support.
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [PATCH 8/8] phy: let phy_provider_register be the last step in registering PHY
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
                   ` (6 preceding siblings ...)
  2014-02-17  8:59 ` [PATCH 7/8] phy-core: Don't allow building phy-core as a module Kishon Vijay Abraham I
@ 2014-02-17  8:59 ` Kishon Vijay Abraham I
  2014-02-18 20:10 ` [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Greg KH
  8 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-17  8:59 UTC (permalink / raw)
  To: gregkh, linux-kernel; +Cc: kishon

Registering phy_provider before creating the PHY can result in PHY
callbacks being invoked which will lead to aborts. In order to avoid this
invoke phy_provider_register after phy_create and phy_set_drvdata.

Reported-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 drivers/phy/phy-exynos-dp-video.c   |    8 ++++----
 drivers/phy/phy-exynos-mipi-video.c |   10 +++++-----
 drivers/phy/phy-mvebu-sata.c        |   10 +++++-----
 drivers/phy/phy-omap-usb2.c         |   10 +++++-----
 drivers/phy/phy-twl4030-usb.c       |   10 +++++-----
 5 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/drivers/phy/phy-exynos-dp-video.c b/drivers/phy/phy-exynos-dp-video.c
index 1dbe6ce..0786fef 100644
--- a/drivers/phy/phy-exynos-dp-video.c
+++ b/drivers/phy/phy-exynos-dp-video.c
@@ -76,10 +76,6 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev)
 	if (IS_ERR(state->regs))
 		return PTR_ERR(state->regs);
 
-	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
 	phy = devm_phy_create(dev, &exynos_dp_video_phy_ops, NULL);
 	if (IS_ERR(phy)) {
 		dev_err(dev, "failed to create Display Port PHY\n");
@@ -87,6 +83,10 @@ static int exynos_dp_video_phy_probe(struct platform_device *pdev)
 	}
 	phy_set_drvdata(phy, state);
 
+	phy_provider = devm_of_phy_provider_register(dev, of_phy_simple_xlate);
+	if (IS_ERR(phy_provider))
+		return PTR_ERR(phy_provider);
+
 	return 0;
 }
 
diff --git a/drivers/phy/phy-exynos-mipi-video.c b/drivers/phy/phy-exynos-mipi-video.c
index 0c5efab..7f13932 100644
--- a/drivers/phy/phy-exynos-mipi-video.c
+++ b/drivers/phy/phy-exynos-mipi-video.c
@@ -134,11 +134,6 @@ static int exynos_mipi_video_phy_probe(struct platform_device *pdev)
 	dev_set_drvdata(dev, state);
 	spin_lock_init(&state->slock);
 
-	phy_provider = devm_of_phy_provider_register(dev,
-					exynos_mipi_video_phy_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
 	for (i = 0; i < EXYNOS_MIPI_PHYS_NUM; i++) {
 		struct phy *phy = devm_phy_create(dev,
 					&exynos_mipi_video_phy_ops, NULL);
@@ -152,6 +147,11 @@ static int exynos_mipi_video_phy_probe(struct platform_device *pdev)
 		phy_set_drvdata(phy, &state->phys[i]);
 	}
 
+	phy_provider = devm_of_phy_provider_register(dev,
+					exynos_mipi_video_phy_xlate);
+	if (IS_ERR(phy_provider))
+		return PTR_ERR(phy_provider);
+
 	return 0;
 }
 
diff --git a/drivers/phy/phy-mvebu-sata.c b/drivers/phy/phy-mvebu-sata.c
index d43786f..d70ecd6 100644
--- a/drivers/phy/phy-mvebu-sata.c
+++ b/drivers/phy/phy-mvebu-sata.c
@@ -99,17 +99,17 @@ static int phy_mvebu_sata_probe(struct platform_device *pdev)
 	if (IS_ERR(priv->clk))
 		return PTR_ERR(priv->clk);
 
-	phy_provider = devm_of_phy_provider_register(&pdev->dev,
-						     of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
 	phy = devm_phy_create(&pdev->dev, &phy_mvebu_sata_ops, NULL);
 	if (IS_ERR(phy))
 		return PTR_ERR(phy);
 
 	phy_set_drvdata(phy, priv);
 
+	phy_provider = devm_of_phy_provider_register(&pdev->dev,
+						     of_phy_simple_xlate);
+	if (IS_ERR(phy_provider))
+		return PTR_ERR(phy_provider);
+
 	/* The boot loader may of left it on. Turn it off. */
 	phy_mvebu_sata_power_off(phy);
 
diff --git a/drivers/phy/phy-omap-usb2.c b/drivers/phy/phy-omap-usb2.c
index bfc5c33..7699752 100644
--- a/drivers/phy/phy-omap-usb2.c
+++ b/drivers/phy/phy-omap-usb2.c
@@ -177,11 +177,6 @@ static int omap_usb2_probe(struct platform_device *pdev)
 	phy->phy.otg		= otg;
 	phy->phy.type		= USB_PHY_TYPE_USB2;
 
-	phy_provider = devm_of_phy_provider_register(phy->dev,
-			of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
 	control_node = of_parse_phandle(node, "ctrl-module", 0);
 	if (!control_node) {
 		dev_err(&pdev->dev, "Failed to get control device phandle\n");
@@ -214,6 +209,11 @@ static int omap_usb2_probe(struct platform_device *pdev)
 
 	phy_set_drvdata(generic_phy, phy);
 
+	phy_provider = devm_of_phy_provider_register(phy->dev,
+			of_phy_simple_xlate);
+	if (IS_ERR(phy_provider))
+		return PTR_ERR(phy_provider);
+
 	phy->wkupclk = devm_clk_get(phy->dev, "usb_phy_cm_clk32k");
 	if (IS_ERR(phy->wkupclk)) {
 		dev_err(&pdev->dev, "unable to get usb_phy_cm_clk32k\n");
diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
index ab64182..2e0e9b3 100644
--- a/drivers/phy/phy-twl4030-usb.c
+++ b/drivers/phy/phy-twl4030-usb.c
@@ -695,11 +695,6 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 	otg->set_host		= twl4030_set_host;
 	otg->set_peripheral	= twl4030_set_peripheral;
 
-	phy_provider = devm_of_phy_provider_register(twl->dev,
-		of_phy_simple_xlate);
-	if (IS_ERR(phy_provider))
-		return PTR_ERR(phy_provider);
-
 	phy = devm_phy_create(twl->dev, &ops, init_data);
 	if (IS_ERR(phy)) {
 		dev_dbg(&pdev->dev, "Failed to create PHY\n");
@@ -708,6 +703,11 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 
 	phy_set_drvdata(phy, twl);
 
+	phy_provider = devm_of_phy_provider_register(twl->dev,
+		of_phy_simple_xlate);
+	if (IS_ERR(phy_provider))
+		return PTR_ERR(phy_provider);
+
 	/* init spinlock for workqueue */
 	spin_lock_init(&twl->lock);
 
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4
  2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
                   ` (7 preceding siblings ...)
  2014-02-17  8:59 ` [PATCH 8/8] phy: let phy_provider_register be the last step in registering PHY Kishon Vijay Abraham I
@ 2014-02-18 20:10 ` Greg KH
  2014-02-19  5:42   ` Kishon Vijay Abraham I
  8 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2014-02-18 20:10 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel

On Mon, Feb 17, 2014 at 02:29:17PM +0530, Kishon Vijay Abraham I wrote:
> Hi Greg,
> 
> Here's the PULL requeust for PHY subsystem for this -rc cycle. There isn't
> anything major but a bunch of obvious fixes and cleanup.
> 
> Let me know If I have to change anything.
> 
> Thanks
> Kishon
> 
> The following changes since commit 6d0abeca3242a88cab8232e4acd7e2bf088f3bc2:
> 
>   Linux 3.14-rc3 (2014-02-16 13:30:25 -0800)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-3.14-rc4

Is this a signed tag?  It doesn't look like it from this side, so it
would be great if you could redo it as a signed tag so I "know" I'm
pulling the right thing in the future.

For now, I'll just take the "raw" patches.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings
  2014-02-17  8:59 ` [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings Kishon Vijay Abraham I
@ 2014-02-18 20:11   ` Greg KH
  0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2014-02-18 20:11 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel

On Mon, Feb 17, 2014 at 02:29:18PM +0530, Kishon Vijay Abraham I wrote:
> From: Sachin Kamat <sachin.kamat@linaro.org>
> 
> Silences the following warnings:
> WARNING: sizeof *twl should be sizeof(*twl)
> WARNING: sizeof *otg should be sizeof(*otg)
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/phy/phy-twl4030-usb.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

This isn't a 3.14-final worthy patch, sorry.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 2/8] usb: phy: twl4030-usb: Remove redundant semicolon
  2014-02-17  8:59 ` [PATCH 2/8] usb: phy: twl4030-usb: Remove redundant semicolon Kishon Vijay Abraham I
@ 2014-02-18 20:11   ` Greg KH
  0 siblings, 0 replies; 15+ messages in thread
From: Greg KH @ 2014-02-18 20:11 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel

On Mon, Feb 17, 2014 at 02:29:19PM +0530, Kishon Vijay Abraham I wrote:
> From: Sachin Kamat <sachin.kamat@linaro.org>
> 
> Semicolon after switch statement is not needed.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/phy/phy-twl4030-usb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/phy-twl4030-usb.c b/drivers/phy/phy-twl4030-usb.c
> index 254c72c..ab64182 100644
> --- a/drivers/phy/phy-twl4030-usb.c
> +++ b/drivers/phy/phy-twl4030-usb.c
> @@ -338,7 +338,7 @@ static void twl4030_usb_set_mode(struct twl4030_usb *twl, int mode)
>  		dev_err(twl->dev, "unsupported T2 transceiver mode %d\n",
>  				mode);
>  		break;
> -	};
> +	}

Not a 3.14-final issue.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO
  2014-02-17  8:59 ` [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO Kishon Vijay Abraham I
@ 2014-02-18 20:11   ` Greg KH
  2014-02-19  5:37     ` Kishon Vijay Abraham I
  0 siblings, 1 reply; 15+ messages in thread
From: Greg KH @ 2014-02-18 20:11 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel

On Mon, Feb 17, 2014 at 02:29:20PM +0530, Kishon Vijay Abraham I wrote:
> From: Sachin Kamat <sachin.kamat@linaro.org>
> 
> PTR_ERR_OR_ZERO simplifies the code.
> 
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
> Cc: Matt Porter <mporter@linaro.org>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/phy/phy-bcm-kona-usb2.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/phy-bcm-kona-usb2.c b/drivers/phy/phy-bcm-kona-usb2.c
> index efc5c1a..e94f5a6 100644
> --- a/drivers/phy/phy-bcm-kona-usb2.c
> +++ b/drivers/phy/phy-bcm-kona-usb2.c
> @@ -128,10 +128,8 @@ static int bcm_kona_usb2_probe(struct platform_device *pdev)
>  
>  	phy_provider = devm_of_phy_provider_register(dev,
>  			of_phy_simple_xlate);
> -	if (IS_ERR(phy_provider))
> -		return PTR_ERR(phy_provider);
>  
> -	return 0;
> +	return PTR_ERR_OR_ZERO(phy_provider);
>  }

Another patch here that isn't a bugfix, sorry, it's not for 3.14-final.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO
  2014-02-18 20:11   ` Greg KH
@ 2014-02-19  5:37     ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-19  5:37 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

On Wednesday 19 February 2014 01:41 AM, Greg KH wrote:
> On Mon, Feb 17, 2014 at 02:29:20PM +0530, Kishon Vijay Abraham I wrote:
>> From: Sachin Kamat <sachin.kamat@linaro.org>
>>
>> PTR_ERR_OR_ZERO simplifies the code.
>>
>> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
>> Cc: Matt Porter <mporter@linaro.org>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>>  drivers/phy/phy-bcm-kona-usb2.c |    4 +---
>>  1 file changed, 1 insertion(+), 3 deletions(-)
>>
>> diff --git a/drivers/phy/phy-bcm-kona-usb2.c b/drivers/phy/phy-bcm-kona-usb2.c
>> index efc5c1a..e94f5a6 100644
>> --- a/drivers/phy/phy-bcm-kona-usb2.c
>> +++ b/drivers/phy/phy-bcm-kona-usb2.c
>> @@ -128,10 +128,8 @@ static int bcm_kona_usb2_probe(struct platform_device *pdev)
>>  
>>  	phy_provider = devm_of_phy_provider_register(dev,
>>  			of_phy_simple_xlate);
>> -	if (IS_ERR(phy_provider))
>> -		return PTR_ERR(phy_provider);
>>  
>> -	return 0;
>> +	return PTR_ERR_OR_ZERO(phy_provider);
>>  }
> 
> Another patch here that isn't a bugfix, sorry, it's not for 3.14-final.

Ok. I'll have these patches for the next merge window.

Thanks
Kishon
> 


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4
  2014-02-18 20:10 ` [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Greg KH
@ 2014-02-19  5:42   ` Kishon Vijay Abraham I
  0 siblings, 0 replies; 15+ messages in thread
From: Kishon Vijay Abraham I @ 2014-02-19  5:42 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel

On Wednesday 19 February 2014 01:40 AM, Greg KH wrote:
> On Mon, Feb 17, 2014 at 02:29:17PM +0530, Kishon Vijay Abraham I wrote:
>> Hi Greg,
>>
>> Here's the PULL requeust for PHY subsystem for this -rc cycle. There isn't
>> anything major but a bunch of obvious fixes and cleanup.
>>
>> Let me know If I have to change anything.
>>
>> Thanks
>> Kishon
>>
>> The following changes since commit 6d0abeca3242a88cab8232e4acd7e2bf088f3bc2:
>>
>>   Linux 3.14-rc3 (2014-02-16 13:30:25 -0800)
>>
>> are available in the git repository at:
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/kishon/linux-phy.git tags/for-3.14-rc4
> 
> Is this a signed tag?  It doesn't look like it from this side, so it
> would be great if you could redo it as a signed tag so I "know" I'm
> pulling the right thing in the future.

ah.. sorry. Now changed that into a signed tag.

Thanks
Kishon

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-02-19  5:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-17  8:59 [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Kishon Vijay Abraham I
2014-02-17  8:59 ` [PATCH 1/8] usb: phy: twl4030-usb: Silence checkpatch warnings Kishon Vijay Abraham I
2014-02-18 20:11   ` Greg KH
2014-02-17  8:59 ` [PATCH 2/8] usb: phy: twl4030-usb: Remove redundant semicolon Kishon Vijay Abraham I
2014-02-18 20:11   ` Greg KH
2014-02-17  8:59 ` [PATCH 3/8] usb: phy: bcm-kona-usb2: Use PTR_ERR_OR_ZERO Kishon Vijay Abraham I
2014-02-18 20:11   ` Greg KH
2014-02-19  5:37     ` Kishon Vijay Abraham I
2014-02-17  8:59 ` [PATCH 4/8] phy,phy-bcm-kona-usb2.c: Add dependency on HAS_IOMEM Kishon Vijay Abraham I
2014-02-17  8:59 ` [PATCH 5/8] phy-core: phy_get: Leave error logging to the caller Kishon Vijay Abraham I
2014-02-17  8:59 ` [PATCH 6/8] phy-core: Don't propagate -ENOSUPP from phy_pm_runtime_get_sync to caller Kishon Vijay Abraham I
2014-02-17  8:59 ` [PATCH 7/8] phy-core: Don't allow building phy-core as a module Kishon Vijay Abraham I
2014-02-17  8:59 ` [PATCH 8/8] phy: let phy_provider_register be the last step in registering PHY Kishon Vijay Abraham I
2014-02-18 20:10 ` [GIT PULL 0/8] PHY subsystem fixes for 3.14-rc4 Greg KH
2014-02-19  5:42   ` Kishon Vijay Abraham I

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.