* [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
-1 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: kishon-l0cyMroinI0
In order to add support for multipe PHY's of the same type, new API's
for adding PHY and getting PHY has been added. Now the binding
information for the PHY and controller should be done in platform file
using usb_bind_phy API. And for getting a PHY, the device pointer of the
USB controller and an index should be passed. Based on the binding
information that is added in the platform file, usb_get_phy_dev will return the
appropriate PHY.
Already existing API's to add and get phy by type is not removed. These
API's are deprecated and will be removed once all the platforms start to
use the new API.
Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
---
drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
include/linux/usb/phy.h | 13 ++++++
2 files changed, 126 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
index 492ba2f..1f30b22 100644
--- a/drivers/usb/otg/otg.c
+++ b/drivers/usb/otg/otg.c
@@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
return ERR_PTR(-ENODEV);
}
+static struct usb_phy *__usb_find_phy_dev(struct device *dev,
+ struct list_head *list, u8 index)
+{
+ struct usb_phy_bind *phy_bind = NULL;
+
+ list_for_each_entry(phy_bind, list, list) {
+ if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
+ phy_bind->index == index)
+ return phy_bind->phy;
+ }
+
+ return ERR_PTR(-ENODEV);
+}
+
static void devm_usb_phy_release(struct device *dev, void *res)
{
struct usb_phy *phy = *(struct usb_phy **)res;
@@ -112,6 +126,69 @@ err0:
EXPORT_SYMBOL(usb_get_phy);
/**
+ * usb_get_phy_dev - find the USB PHY
+ * @dev - device that requests this phy
+ * @index - the index of the phy
+ *
+ * Returns the phy driver, after getting a refcount to it; or
+ * -ENODEV if there is no such phy. The caller is responsible for
+ * calling usb_put_phy() to release that count.
+ *
+ * For use by USB host and peripheral drivers.
+ */
+struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
+{
+ struct usb_phy *phy = NULL;
+ unsigned long flags;
+
+ spin_lock_irqsave(&phy_lock, flags);
+
+ phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
+ if (IS_ERR(phy)) {
+ pr_err("unable to find transceiver\n");
+ goto err0;
+ }
+
+ get_device(phy->dev);
+
+err0:
+ spin_unlock_irqrestore(&phy_lock, flags);
+
+ return phy;
+}
+EXPORT_SYMBOL(usb_get_phy_dev);
+
+/**
+ * devm_usb_get_phy_dev - find the USB PHY using device ptr and index
+ * @dev - device that requests this phy
+ * @index - the index of the phy
+ *
+ * Gets the phy using usb_get_phy_dev(), and associates a device with it using
+ * devres. On driver detach, release function is invoked on the devres data,
+ * then, devres data is freed.
+ *
+ * For use by USB host and peripheral drivers.
+ */
+struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
+{
+ struct usb_phy **ptr, *phy;
+
+ ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return NULL;
+
+ phy = usb_get_phy_dev(dev, index);
+ if (!IS_ERR(phy)) {
+ *ptr = phy;
+ devres_add(dev, ptr);
+ } else
+ devres_free(ptr);
+
+ return phy;
+}
+EXPORT_SYMBOL(devm_usb_get_phy_dev);
+
+/**
* devm_usb_put_phy - release the USB PHY
* @dev - device that wants to release this phy
* @phy - the phy returned by devm_usb_get_phy()
@@ -186,6 +263,36 @@ out:
EXPORT_SYMBOL(usb_add_phy);
/**
+ * usb_add_phy_dev - declare the USB PHY
+ * @x: the USB phy to be used; or NULL
+ *
+ * This call is exclusively for use by phy drivers, which
+ * coordinate the activities of drivers for host and peripheral
+ * controllers, and in some cases for VBUS current regulation.
+ */
+int usb_add_phy_dev(struct usb_phy *x)
+{
+ struct usb_phy_bind *phy_bind;
+ unsigned long flags;
+
+ if (!x->dev) {
+ dev_err(x->dev, "no device provided for PHY\n");
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&phy_lock, flags);
+ list_for_each_entry(phy_bind, &phy_bind_list, list)
+ if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev))))
+ phy_bind->phy = x;
+
+ list_add_tail(&x->head, &phy_list);
+
+ spin_unlock_irqrestore(&phy_lock, flags);
+ return 0;
+}
+EXPORT_SYMBOL(usb_add_phy_dev);
+
+/**
* usb_remove_phy - remove the OTG PHY
* @x: the USB OTG PHY to be removed;
*
@@ -194,10 +301,15 @@ EXPORT_SYMBOL(usb_add_phy);
void usb_remove_phy(struct usb_phy *x)
{
unsigned long flags;
+ struct usb_phy_bind *phy_bind;
spin_lock_irqsave(&phy_lock, flags);
- if (x)
+ if (x) {
+ list_for_each_entry(phy_bind, &phy_bind_list, list)
+ if (phy_bind->phy == x)
+ phy_bind->phy = NULL;
list_del(&x->head);
+ }
spin_unlock_irqrestore(&phy_lock, flags);
}
EXPORT_SYMBOL(usb_remove_phy);
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index fbeab1a..3a9ae3e 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -124,6 +124,7 @@ struct usb_phy_bind {
/* for board-specific init logic */
extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
+extern int usb_add_phy_dev(struct usb_phy *);
extern void usb_remove_phy(struct usb_phy *);
/* helpers for direct access thru low-level io interface */
@@ -164,6 +165,8 @@ usb_phy_shutdown(struct usb_phy *x)
extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
extern struct usb_phy *devm_usb_get_phy(struct device *dev,
enum usb_phy_type type);
+extern struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index);
+extern struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index);
extern void usb_put_phy(struct usb_phy *);
extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
extern struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
@@ -180,6 +183,16 @@ static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
return NULL;
}
+static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
+{
+ return NULL;
+}
+
+static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
+{
+ return NULL;
+}
+
static inline void usb_put_phy(struct usb_phy *x)
{
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
Cc: kishon
In order to add support for multipe PHY's of the same type, new API's
for adding PHY and getting PHY has been added. Now the binding
information for the PHY and controller should be done in platform file
using usb_bind_phy API. And for getting a PHY, the device pointer of the
USB controller and an index should be passed. Based on the binding
information that is added in the platform file, usb_get_phy_dev will return the
appropriate PHY.
Already existing API's to add and get phy by type is not removed. These
API's are deprecated and will be removed once all the platforms start to
use the new API.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
include/linux/usb/phy.h | 13 ++++++
2 files changed, 126 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
index 492ba2f..1f30b22 100644
--- a/drivers/usb/otg/otg.c
+++ b/drivers/usb/otg/otg.c
@@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
return ERR_PTR(-ENODEV);
}
+static struct usb_phy *__usb_find_phy_dev(struct device *dev,
+ struct list_head *list, u8 index)
+{
+ struct usb_phy_bind *phy_bind = NULL;
+
+ list_for_each_entry(phy_bind, list, list) {
+ if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
+ phy_bind->index == index)
+ return phy_bind->phy;
+ }
+
+ return ERR_PTR(-ENODEV);
+}
+
static void devm_usb_phy_release(struct device *dev, void *res)
{
struct usb_phy *phy = *(struct usb_phy **)res;
@@ -112,6 +126,69 @@ err0:
EXPORT_SYMBOL(usb_get_phy);
/**
+ * usb_get_phy_dev - find the USB PHY
+ * @dev - device that requests this phy
+ * @index - the index of the phy
+ *
+ * Returns the phy driver, after getting a refcount to it; or
+ * -ENODEV if there is no such phy. The caller is responsible for
+ * calling usb_put_phy() to release that count.
+ *
+ * For use by USB host and peripheral drivers.
+ */
+struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
+{
+ struct usb_phy *phy = NULL;
+ unsigned long flags;
+
+ spin_lock_irqsave(&phy_lock, flags);
+
+ phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
+ if (IS_ERR(phy)) {
+ pr_err("unable to find transceiver\n");
+ goto err0;
+ }
+
+ get_device(phy->dev);
+
+err0:
+ spin_unlock_irqrestore(&phy_lock, flags);
+
+ return phy;
+}
+EXPORT_SYMBOL(usb_get_phy_dev);
+
+/**
+ * devm_usb_get_phy_dev - find the USB PHY using device ptr and index
+ * @dev - device that requests this phy
+ * @index - the index of the phy
+ *
+ * Gets the phy using usb_get_phy_dev(), and associates a device with it using
+ * devres. On driver detach, release function is invoked on the devres data,
+ * then, devres data is freed.
+ *
+ * For use by USB host and peripheral drivers.
+ */
+struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
+{
+ struct usb_phy **ptr, *phy;
+
+ ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return NULL;
+
+ phy = usb_get_phy_dev(dev, index);
+ if (!IS_ERR(phy)) {
+ *ptr = phy;
+ devres_add(dev, ptr);
+ } else
+ devres_free(ptr);
+
+ return phy;
+}
+EXPORT_SYMBOL(devm_usb_get_phy_dev);
+
+/**
* devm_usb_put_phy - release the USB PHY
* @dev - device that wants to release this phy
* @phy - the phy returned by devm_usb_get_phy()
@@ -186,6 +263,36 @@ out:
EXPORT_SYMBOL(usb_add_phy);
/**
+ * usb_add_phy_dev - declare the USB PHY
+ * @x: the USB phy to be used; or NULL
+ *
+ * This call is exclusively for use by phy drivers, which
+ * coordinate the activities of drivers for host and peripheral
+ * controllers, and in some cases for VBUS current regulation.
+ */
+int usb_add_phy_dev(struct usb_phy *x)
+{
+ struct usb_phy_bind *phy_bind;
+ unsigned long flags;
+
+ if (!x->dev) {
+ dev_err(x->dev, "no device provided for PHY\n");
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&phy_lock, flags);
+ list_for_each_entry(phy_bind, &phy_bind_list, list)
+ if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev))))
+ phy_bind->phy = x;
+
+ list_add_tail(&x->head, &phy_list);
+
+ spin_unlock_irqrestore(&phy_lock, flags);
+ return 0;
+}
+EXPORT_SYMBOL(usb_add_phy_dev);
+
+/**
* usb_remove_phy - remove the OTG PHY
* @x: the USB OTG PHY to be removed;
*
@@ -194,10 +301,15 @@ EXPORT_SYMBOL(usb_add_phy);
void usb_remove_phy(struct usb_phy *x)
{
unsigned long flags;
+ struct usb_phy_bind *phy_bind;
spin_lock_irqsave(&phy_lock, flags);
- if (x)
+ if (x) {
+ list_for_each_entry(phy_bind, &phy_bind_list, list)
+ if (phy_bind->phy == x)
+ phy_bind->phy = NULL;
list_del(&x->head);
+ }
spin_unlock_irqrestore(&phy_lock, flags);
}
EXPORT_SYMBOL(usb_remove_phy);
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index fbeab1a..3a9ae3e 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -124,6 +124,7 @@ struct usb_phy_bind {
/* for board-specific init logic */
extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
+extern int usb_add_phy_dev(struct usb_phy *);
extern void usb_remove_phy(struct usb_phy *);
/* helpers for direct access thru low-level io interface */
@@ -164,6 +165,8 @@ usb_phy_shutdown(struct usb_phy *x)
extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
extern struct usb_phy *devm_usb_get_phy(struct device *dev,
enum usb_phy_type type);
+extern struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index);
+extern struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index);
extern void usb_put_phy(struct usb_phy *);
extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
extern struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
@@ -180,6 +183,16 @@ static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
return NULL;
}
+static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
+{
+ return NULL;
+}
+
+static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
+{
+ return NULL;
+}
+
static inline void usb_put_phy(struct usb_phy *x)
{
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: linux-arm-kernel
In order to add support for multipe PHY's of the same type, new API's
for adding PHY and getting PHY has been added. Now the binding
information for the PHY and controller should be done in platform file
using usb_bind_phy API. And for getting a PHY, the device pointer of the
USB controller and an index should be passed. Based on the binding
information that is added in the platform file, usb_get_phy_dev will return the
appropriate PHY.
Already existing API's to add and get phy by type is not removed. These
API's are deprecated and will be removed once all the platforms start to
use the new API.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
include/linux/usb/phy.h | 13 ++++++
2 files changed, 126 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
index 492ba2f..1f30b22 100644
--- a/drivers/usb/otg/otg.c
+++ b/drivers/usb/otg/otg.c
@@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
return ERR_PTR(-ENODEV);
}
+static struct usb_phy *__usb_find_phy_dev(struct device *dev,
+ struct list_head *list, u8 index)
+{
+ struct usb_phy_bind *phy_bind = NULL;
+
+ list_for_each_entry(phy_bind, list, list) {
+ if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
+ phy_bind->index == index)
+ return phy_bind->phy;
+ }
+
+ return ERR_PTR(-ENODEV);
+}
+
static void devm_usb_phy_release(struct device *dev, void *res)
{
struct usb_phy *phy = *(struct usb_phy **)res;
@@ -112,6 +126,69 @@ err0:
EXPORT_SYMBOL(usb_get_phy);
/**
+ * usb_get_phy_dev - find the USB PHY
+ * @dev - device that requests this phy
+ * @index - the index of the phy
+ *
+ * Returns the phy driver, after getting a refcount to it; or
+ * -ENODEV if there is no such phy. The caller is responsible for
+ * calling usb_put_phy() to release that count.
+ *
+ * For use by USB host and peripheral drivers.
+ */
+struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
+{
+ struct usb_phy *phy = NULL;
+ unsigned long flags;
+
+ spin_lock_irqsave(&phy_lock, flags);
+
+ phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
+ if (IS_ERR(phy)) {
+ pr_err("unable to find transceiver\n");
+ goto err0;
+ }
+
+ get_device(phy->dev);
+
+err0:
+ spin_unlock_irqrestore(&phy_lock, flags);
+
+ return phy;
+}
+EXPORT_SYMBOL(usb_get_phy_dev);
+
+/**
+ * devm_usb_get_phy_dev - find the USB PHY using device ptr and index
+ * @dev - device that requests this phy
+ * @index - the index of the phy
+ *
+ * Gets the phy using usb_get_phy_dev(), and associates a device with it using
+ * devres. On driver detach, release function is invoked on the devres data,
+ * then, devres data is freed.
+ *
+ * For use by USB host and peripheral drivers.
+ */
+struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
+{
+ struct usb_phy **ptr, *phy;
+
+ ptr = devres_alloc(devm_usb_phy_release, sizeof(*ptr), GFP_KERNEL);
+ if (!ptr)
+ return NULL;
+
+ phy = usb_get_phy_dev(dev, index);
+ if (!IS_ERR(phy)) {
+ *ptr = phy;
+ devres_add(dev, ptr);
+ } else
+ devres_free(ptr);
+
+ return phy;
+}
+EXPORT_SYMBOL(devm_usb_get_phy_dev);
+
+/**
* devm_usb_put_phy - release the USB PHY
* @dev - device that wants to release this phy
* @phy - the phy returned by devm_usb_get_phy()
@@ -186,6 +263,36 @@ out:
EXPORT_SYMBOL(usb_add_phy);
/**
+ * usb_add_phy_dev - declare the USB PHY
+ * @x: the USB phy to be used; or NULL
+ *
+ * This call is exclusively for use by phy drivers, which
+ * coordinate the activities of drivers for host and peripheral
+ * controllers, and in some cases for VBUS current regulation.
+ */
+int usb_add_phy_dev(struct usb_phy *x)
+{
+ struct usb_phy_bind *phy_bind;
+ unsigned long flags;
+
+ if (!x->dev) {
+ dev_err(x->dev, "no device provided for PHY\n");
+ return -EINVAL;
+ }
+
+ spin_lock_irqsave(&phy_lock, flags);
+ list_for_each_entry(phy_bind, &phy_bind_list, list)
+ if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev))))
+ phy_bind->phy = x;
+
+ list_add_tail(&x->head, &phy_list);
+
+ spin_unlock_irqrestore(&phy_lock, flags);
+ return 0;
+}
+EXPORT_SYMBOL(usb_add_phy_dev);
+
+/**
* usb_remove_phy - remove the OTG PHY
* @x: the USB OTG PHY to be removed;
*
@@ -194,10 +301,15 @@ EXPORT_SYMBOL(usb_add_phy);
void usb_remove_phy(struct usb_phy *x)
{
unsigned long flags;
+ struct usb_phy_bind *phy_bind;
spin_lock_irqsave(&phy_lock, flags);
- if (x)
+ if (x) {
+ list_for_each_entry(phy_bind, &phy_bind_list, list)
+ if (phy_bind->phy == x)
+ phy_bind->phy = NULL;
list_del(&x->head);
+ }
spin_unlock_irqrestore(&phy_lock, flags);
}
EXPORT_SYMBOL(usb_remove_phy);
diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h
index fbeab1a..3a9ae3e 100644
--- a/include/linux/usb/phy.h
+++ b/include/linux/usb/phy.h
@@ -124,6 +124,7 @@ struct usb_phy_bind {
/* for board-specific init logic */
extern int usb_add_phy(struct usb_phy *, enum usb_phy_type type);
+extern int usb_add_phy_dev(struct usb_phy *);
extern void usb_remove_phy(struct usb_phy *);
/* helpers for direct access thru low-level io interface */
@@ -164,6 +165,8 @@ usb_phy_shutdown(struct usb_phy *x)
extern struct usb_phy *usb_get_phy(enum usb_phy_type type);
extern struct usb_phy *devm_usb_get_phy(struct device *dev,
enum usb_phy_type type);
+extern struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index);
+extern struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index);
extern void usb_put_phy(struct usb_phy *);
extern void devm_usb_put_phy(struct device *dev, struct usb_phy *x);
extern struct usb_phy_bind *usb_bind_phy(const char *dev_name, u8 index,
@@ -180,6 +183,16 @@ static inline struct usb_phy *devm_usb_get_phy(struct device *dev,
return NULL;
}
+static inline struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
+{
+ return NULL;
+}
+
+static inline struct usb_phy *devm_usb_get_phy_dev(struct device *dev, u8 index)
+{
+ return NULL;
+}
+
static inline void usb_put_phy(struct usb_phy *x)
{
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* Re: [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 14:07 ` Roger Quadros
-1 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:07 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> In order to add support for multipe PHY's of the same type, new API's
> for adding PHY and getting PHY has been added. Now the binding
> information for the PHY and controller should be done in platform file
> using usb_bind_phy API. And for getting a PHY, the device pointer of the
> USB controller and an index should be passed. Based on the binding
> information that is added in the platform file, usb_get_phy_dev will return the
> appropriate PHY.
> Already existing API's to add and get phy by type is not removed. These
> API's are deprecated and will be removed once all the platforms start to
> use the new API.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
> include/linux/usb/phy.h | 13 ++++++
> 2 files changed, 126 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
> index 492ba2f..1f30b22 100644
> --- a/drivers/usb/otg/otg.c
> +++ b/drivers/usb/otg/otg.c
> @@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
> return ERR_PTR(-ENODEV);
> }
>
> +static struct usb_phy *__usb_find_phy_dev(struct device *dev,
> + struct list_head *list, u8 index)
> +{
> + struct usb_phy_bind *phy_bind = NULL;
> +
> + list_for_each_entry(phy_bind, list, list) {
> + if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
> + phy_bind->index == index)
> + return phy_bind->phy;
If the PHY driver has not yet called usb_add_phy_dev() (e.g. driver not yet loaeded)
then this will return NULL.
> + }
> +
> + return ERR_PTR(-ENODEV);
> +}
> +
> static void devm_usb_phy_release(struct device *dev, void *res)
> {
> struct usb_phy *phy = *(struct usb_phy **)res;
> @@ -112,6 +126,69 @@ err0:
> EXPORT_SYMBOL(usb_get_phy);
>
> /**
> + * usb_get_phy_dev - find the USB PHY
> + * @dev - device that requests this phy
> + * @index - the index of the phy
> + *
> + * Returns the phy driver, after getting a refcount to it; or
> + * -ENODEV if there is no such phy. The caller is responsible for
> + * calling usb_put_phy() to release that count.
> + *
> + * For use by USB host and peripheral drivers.
> + */
> +struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
> +{
> + struct usb_phy *phy = NULL;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&phy_lock, flags);
> +
> + phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
> + if (IS_ERR(phy)) {
> + pr_err("unable to find transceiver\n");
> + goto err0;
> + }
Since NULL is not IS_ERR(), you will do a NULL pointer reference below.
In such cases we would want to use the deferred probe mechanism. So should we return
-EPROBE_DEFER?
> +
> + get_device(phy->dev);
> +
> +err0:
> + spin_unlock_irqrestore(&phy_lock, flags);
> +
> + return phy;
> +}
> +EXPORT_SYMBOL(usb_get_phy_dev);
> +
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
@ 2013-01-22 14:07 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:07 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> In order to add support for multipe PHY's of the same type, new API's
> for adding PHY and getting PHY has been added. Now the binding
> information for the PHY and controller should be done in platform file
> using usb_bind_phy API. And for getting a PHY, the device pointer of the
> USB controller and an index should be passed. Based on the binding
> information that is added in the platform file, usb_get_phy_dev will return the
> appropriate PHY.
> Already existing API's to add and get phy by type is not removed. These
> API's are deprecated and will be removed once all the platforms start to
> use the new API.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
> include/linux/usb/phy.h | 13 ++++++
> 2 files changed, 126 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
> index 492ba2f..1f30b22 100644
> --- a/drivers/usb/otg/otg.c
> +++ b/drivers/usb/otg/otg.c
> @@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
> return ERR_PTR(-ENODEV);
> }
>
> +static struct usb_phy *__usb_find_phy_dev(struct device *dev,
> + struct list_head *list, u8 index)
> +{
> + struct usb_phy_bind *phy_bind = NULL;
> +
> + list_for_each_entry(phy_bind, list, list) {
> + if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
> + phy_bind->index == index)
> + return phy_bind->phy;
If the PHY driver has not yet called usb_add_phy_dev() (e.g. driver not yet loaeded)
then this will return NULL.
> + }
> +
> + return ERR_PTR(-ENODEV);
> +}
> +
> static void devm_usb_phy_release(struct device *dev, void *res)
> {
> struct usb_phy *phy = *(struct usb_phy **)res;
> @@ -112,6 +126,69 @@ err0:
> EXPORT_SYMBOL(usb_get_phy);
>
> /**
> + * usb_get_phy_dev - find the USB PHY
> + * @dev - device that requests this phy
> + * @index - the index of the phy
> + *
> + * Returns the phy driver, after getting a refcount to it; or
> + * -ENODEV if there is no such phy. The caller is responsible for
> + * calling usb_put_phy() to release that count.
> + *
> + * For use by USB host and peripheral drivers.
> + */
> +struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
> +{
> + struct usb_phy *phy = NULL;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&phy_lock, flags);
> +
> + phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
> + if (IS_ERR(phy)) {
> + pr_err("unable to find transceiver\n");
> + goto err0;
> + }
Since NULL is not IS_ERR(), you will do a NULL pointer reference below.
In such cases we would want to use the deferred probe mechanism. So should we return
-EPROBE_DEFER?
> +
> + get_device(phy->dev);
> +
> +err0:
> + spin_unlock_irqrestore(&phy_lock, flags);
> +
> + return phy;
> +}
> +EXPORT_SYMBOL(usb_get_phy_dev);
> +
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
@ 2013-01-22 14:07 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:07 UTC (permalink / raw)
To: linux-arm-kernel
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> In order to add support for multipe PHY's of the same type, new API's
> for adding PHY and getting PHY has been added. Now the binding
> information for the PHY and controller should be done in platform file
> using usb_bind_phy API. And for getting a PHY, the device pointer of the
> USB controller and an index should be passed. Based on the binding
> information that is added in the platform file, usb_get_phy_dev will return the
> appropriate PHY.
> Already existing API's to add and get phy by type is not removed. These
> API's are deprecated and will be removed once all the platforms start to
> use the new API.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
> include/linux/usb/phy.h | 13 ++++++
> 2 files changed, 126 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
> index 492ba2f..1f30b22 100644
> --- a/drivers/usb/otg/otg.c
> +++ b/drivers/usb/otg/otg.c
> @@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
> return ERR_PTR(-ENODEV);
> }
>
> +static struct usb_phy *__usb_find_phy_dev(struct device *dev,
> + struct list_head *list, u8 index)
> +{
> + struct usb_phy_bind *phy_bind = NULL;
> +
> + list_for_each_entry(phy_bind, list, list) {
> + if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
> + phy_bind->index == index)
> + return phy_bind->phy;
If the PHY driver has not yet called usb_add_phy_dev() (e.g. driver not yet loaeded)
then this will return NULL.
> + }
> +
> + return ERR_PTR(-ENODEV);
> +}
> +
> static void devm_usb_phy_release(struct device *dev, void *res)
> {
> struct usb_phy *phy = *(struct usb_phy **)res;
> @@ -112,6 +126,69 @@ err0:
> EXPORT_SYMBOL(usb_get_phy);
>
> /**
> + * usb_get_phy_dev - find the USB PHY
> + * @dev - device that requests this phy
> + * @index - the index of the phy
> + *
> + * Returns the phy driver, after getting a refcount to it; or
> + * -ENODEV if there is no such phy. The caller is responsible for
> + * calling usb_put_phy() to release that count.
> + *
> + * For use by USB host and peripheral drivers.
> + */
> +struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
> +{
> + struct usb_phy *phy = NULL;
> + unsigned long flags;
> +
> + spin_lock_irqsave(&phy_lock, flags);
> +
> + phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
> + if (IS_ERR(phy)) {
> + pr_err("unable to find transceiver\n");
> + goto err0;
> + }
Since NULL is not IS_ERR(), you will do a NULL pointer reference below.
In such cases we would want to use the deferred probe mechanism. So should we return
-EPROBE_DEFER?
> +
> + get_device(phy->dev);
> +
> +err0:
> + spin_unlock_irqrestore(&phy_lock, flags);
> +
> + return phy;
> +}
> +EXPORT_SYMBOL(usb_get_phy_dev);
> +
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <50FE9D1E.3010800-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
2013-01-22 14:07 ` Roger Quadros
(?)
@ 2013-01-22 14:13 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 14:13 UTC (permalink / raw)
To: Roger Quadros
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
eballetbo-Re5JQEeQqe8AvxtiuMwx3w, javier-0uQlZySMnqxg9hUCZPvPmw,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Hi,
On Tuesday 22 January 2013 07:37 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> In order to add support for multipe PHY's of the same type, new API's
>> for adding PHY and getting PHY has been added. Now the binding
>> information for the PHY and controller should be done in platform file
>> using usb_bind_phy API. And for getting a PHY, the device pointer of the
>> USB controller and an index should be passed. Based on the binding
>> information that is added in the platform file, usb_get_phy_dev will return the
>> appropriate PHY.
>> Already existing API's to add and get phy by type is not removed. These
>> API's are deprecated and will be removed once all the platforms start to
>> use the new API.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>> ---
>> drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
>> include/linux/usb/phy.h | 13 ++++++
>> 2 files changed, 126 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
>> index 492ba2f..1f30b22 100644
>> --- a/drivers/usb/otg/otg.c
>> +++ b/drivers/usb/otg/otg.c
>> @@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
>> return ERR_PTR(-ENODEV);
>> }
>>
>> +static struct usb_phy *__usb_find_phy_dev(struct device *dev,
>> + struct list_head *list, u8 index)
>> +{
>> + struct usb_phy_bind *phy_bind = NULL;
>> +
>> + list_for_each_entry(phy_bind, list, list) {
>> + if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
>> + phy_bind->index == index)
>> + return phy_bind->phy;
>
> If the PHY driver has not yet called usb_add_phy_dev() (e.g. driver not yet loaeded)
> then this will return NULL.
>
>> + }
>> +
>> + return ERR_PTR(-ENODEV);
>> +}
>> +
>> static void devm_usb_phy_release(struct device *dev, void *res)
>> {
>> struct usb_phy *phy = *(struct usb_phy **)res;
>> @@ -112,6 +126,69 @@ err0:
>> EXPORT_SYMBOL(usb_get_phy);
>>
>> /**
>> + * usb_get_phy_dev - find the USB PHY
>> + * @dev - device that requests this phy
>> + * @index - the index of the phy
>> + *
>> + * Returns the phy driver, after getting a refcount to it; or
>> + * -ENODEV if there is no such phy. The caller is responsible for
>> + * calling usb_put_phy() to release that count.
>> + *
>> + * For use by USB host and peripheral drivers.
>> + */
>> +struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
>> +{
>> + struct usb_phy *phy = NULL;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&phy_lock, flags);
>> +
>> + phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
>> + if (IS_ERR(phy)) {
>> + pr_err("unable to find transceiver\n");
>> + goto err0;
>> + }
>
> Since NULL is not IS_ERR(), you will do a NULL pointer reference below.
>
> In such cases we would want to use the deferred probe mechanism. So should we return
> -EPROBE_DEFER?
Good catch. I'll update the patch.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
@ 2013-01-22 14:13 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 14:13 UTC (permalink / raw)
To: Roger Quadros
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
Hi,
On Tuesday 22 January 2013 07:37 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> In order to add support for multipe PHY's of the same type, new API's
>> for adding PHY and getting PHY has been added. Now the binding
>> information for the PHY and controller should be done in platform file
>> using usb_bind_phy API. And for getting a PHY, the device pointer of the
>> USB controller and an index should be passed. Based on the binding
>> information that is added in the platform file, usb_get_phy_dev will return the
>> appropriate PHY.
>> Already existing API's to add and get phy by type is not removed. These
>> API's are deprecated and will be removed once all the platforms start to
>> use the new API.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
>> include/linux/usb/phy.h | 13 ++++++
>> 2 files changed, 126 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
>> index 492ba2f..1f30b22 100644
>> --- a/drivers/usb/otg/otg.c
>> +++ b/drivers/usb/otg/otg.c
>> @@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
>> return ERR_PTR(-ENODEV);
>> }
>>
>> +static struct usb_phy *__usb_find_phy_dev(struct device *dev,
>> + struct list_head *list, u8 index)
>> +{
>> + struct usb_phy_bind *phy_bind = NULL;
>> +
>> + list_for_each_entry(phy_bind, list, list) {
>> + if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
>> + phy_bind->index == index)
>> + return phy_bind->phy;
>
> If the PHY driver has not yet called usb_add_phy_dev() (e.g. driver not yet loaeded)
> then this will return NULL.
>
>> + }
>> +
>> + return ERR_PTR(-ENODEV);
>> +}
>> +
>> static void devm_usb_phy_release(struct device *dev, void *res)
>> {
>> struct usb_phy *phy = *(struct usb_phy **)res;
>> @@ -112,6 +126,69 @@ err0:
>> EXPORT_SYMBOL(usb_get_phy);
>>
>> /**
>> + * usb_get_phy_dev - find the USB PHY
>> + * @dev - device that requests this phy
>> + * @index - the index of the phy
>> + *
>> + * Returns the phy driver, after getting a refcount to it; or
>> + * -ENODEV if there is no such phy. The caller is responsible for
>> + * calling usb_put_phy() to release that count.
>> + *
>> + * For use by USB host and peripheral drivers.
>> + */
>> +struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
>> +{
>> + struct usb_phy *phy = NULL;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&phy_lock, flags);
>> +
>> + phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
>> + if (IS_ERR(phy)) {
>> + pr_err("unable to find transceiver\n");
>> + goto err0;
>> + }
>
> Since NULL is not IS_ERR(), you will do a NULL pointer reference below.
>
> In such cases we would want to use the deferred probe mechanism. So should we return
> -EPROBE_DEFER?
Good catch. I'll update the patch.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 2/6] usb: otg: utils: add facilities in phy lib to support multiple PHYs of same type
@ 2013-01-22 14:13 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 14:13 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 22 January 2013 07:37 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> In order to add support for multipe PHY's of the same type, new API's
>> for adding PHY and getting PHY has been added. Now the binding
>> information for the PHY and controller should be done in platform file
>> using usb_bind_phy API. And for getting a PHY, the device pointer of the
>> USB controller and an index should be passed. Based on the binding
>> information that is added in the platform file, usb_get_phy_dev will return the
>> appropriate PHY.
>> Already existing API's to add and get phy by type is not removed. These
>> API's are deprecated and will be removed once all the platforms start to
>> use the new API.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/usb/otg/otg.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++-
>> include/linux/usb/phy.h | 13 ++++++
>> 2 files changed, 126 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/otg/otg.c b/drivers/usb/otg/otg.c
>> index 492ba2f..1f30b22 100644
>> --- a/drivers/usb/otg/otg.c
>> +++ b/drivers/usb/otg/otg.c
>> @@ -36,6 +36,20 @@ static struct usb_phy *__usb_find_phy(struct list_head *list,
>> return ERR_PTR(-ENODEV);
>> }
>>
>> +static struct usb_phy *__usb_find_phy_dev(struct device *dev,
>> + struct list_head *list, u8 index)
>> +{
>> + struct usb_phy_bind *phy_bind = NULL;
>> +
>> + list_for_each_entry(phy_bind, list, list) {
>> + if (!(strcmp(phy_bind->dev_name, dev_name(dev))) &&
>> + phy_bind->index == index)
>> + return phy_bind->phy;
>
> If the PHY driver has not yet called usb_add_phy_dev() (e.g. driver not yet loaeded)
> then this will return NULL.
>
>> + }
>> +
>> + return ERR_PTR(-ENODEV);
>> +}
>> +
>> static void devm_usb_phy_release(struct device *dev, void *res)
>> {
>> struct usb_phy *phy = *(struct usb_phy **)res;
>> @@ -112,6 +126,69 @@ err0:
>> EXPORT_SYMBOL(usb_get_phy);
>>
>> /**
>> + * usb_get_phy_dev - find the USB PHY
>> + * @dev - device that requests this phy
>> + * @index - the index of the phy
>> + *
>> + * Returns the phy driver, after getting a refcount to it; or
>> + * -ENODEV if there is no such phy. The caller is responsible for
>> + * calling usb_put_phy() to release that count.
>> + *
>> + * For use by USB host and peripheral drivers.
>> + */
>> +struct usb_phy *usb_get_phy_dev(struct device *dev, u8 index)
>> +{
>> + struct usb_phy *phy = NULL;
>> + unsigned long flags;
>> +
>> + spin_lock_irqsave(&phy_lock, flags);
>> +
>> + phy = __usb_find_phy_dev(dev, &phy_bind_list, index);
>> + if (IS_ERR(phy)) {
>> + pr_err("unable to find transceiver\n");
>> + goto err0;
>> + }
>
> Since NULL is not IS_ERR(), you will do a NULL pointer reference below.
>
> In such cases we would want to use the deferred probe mechanism. So should we return
> -EPROBE_DEFER?
Good catch. I'll update the patch.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* [PATCH v1 3/6] ARM: OMAP: USB: Add phy binding information
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
-1 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: kishon-l0cyMroinI0
This is w.r.t the changes in PHY library to support adding and getting
multiple PHYs of the same type. In the new design, the
binding information between the PHY and the USB controller should be
specified in the platform specific initialization code. So it's been
done here for OMAP platforms.
Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
---
arch/arm/mach-omap2/board-2430sdp.c | 2 ++
arch/arm/mach-omap2/board-3430sdp.c | 2 ++
arch/arm/mach-omap2/board-4430sdp.c | 2 ++
arch/arm/mach-omap2/board-cm-t35.c | 2 ++
arch/arm/mach-omap2/board-devkit8000.c | 2 ++
arch/arm/mach-omap2/board-igep0020.c | 2 ++
arch/arm/mach-omap2/board-ldp.c | 2 ++
arch/arm/mach-omap2/board-omap3beagle.c | 2 ++
arch/arm/mach-omap2/board-omap3evm.c | 2 ++
arch/arm/mach-omap2/board-omap3logic.c | 2 ++
arch/arm/mach-omap2/board-omap3pandora.c | 2 ++
arch/arm/mach-omap2/board-omap3stalker.c | 2 ++
arch/arm/mach-omap2/board-omap3touchbook.c | 2 ++
arch/arm/mach-omap2/board-omap4panda.c | 2 ++
arch/arm/mach-omap2/board-overo.c | 2 ++
arch/arm/mach-omap2/board-rm680.c | 2 ++
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 ++
17 files changed, 34 insertions(+)
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 4815ea6..1337f2c 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -27,6 +27,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/gpio.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -263,6 +264,7 @@ static void __init omap_2430sdp_init(void)
omap_hsmmc_init(mmc);
omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index bb73afc..8a2e242 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -25,6 +25,7 @@
#include <linux/gpio.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -579,6 +580,7 @@ static void __init omap_3430sdp_init(void)
omap_ads7846_init(1, gpio_pendown, 310, NULL);
omap_serial_init();
omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cc6696..8e8efcc 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -28,6 +28,7 @@
#include <linux/leds_pwm.h>
#include <linux/platform_data/omap4-keypad.h>
#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
@@ -696,6 +697,7 @@ static void __init omap_4430sdp_init(void)
omap4_sdp4430_wifi_init();
omap4_twl6030_hsmmc_init(mmc);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
usb_musb_init(&musb_board_data);
status = omap_ethernet_init();
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index b3102c2..f1172f2 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -30,6 +30,7 @@
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/spi/spi.h>
#include <linux/spi/tdo24m.h>
@@ -724,6 +725,7 @@ static void __init cm_t3x_common_init(void)
cm_t35_init_display();
omap_twl4030_audio_init("cm-t3x");
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
cm_t35_init_usbh();
cm_t35_init_camera();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 12865af..77cade52 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -29,6 +29,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -622,6 +623,7 @@ static void __init devkit8000_init(void)
omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(devkit8000_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0f24cb8..15e5881 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -18,6 +18,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/input.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
@@ -625,6 +626,7 @@ static void __init igep_init(void)
omap_serial_init();
omap_sdrc_init(m65kxxxxam_sdrc_params,
m65kxxxxam_sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
igep_flash_init();
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 0869f4f..3b5510a 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -28,6 +28,7 @@
#include <linux/io.h>
#include <linux/smsc911x.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <asm/mach-types.h>
@@ -418,6 +419,7 @@ static void __init omap_ldp_init(void)
omap_ads7846_init(1, 54, 310, NULL);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions),
ZOOM_NAND_CS, 0, nand_default_timings);
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d..4616f92 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -30,6 +30,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -519,6 +520,7 @@ static void __init omap3_beagle_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3beagle_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3985f35..a198b61 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -41,6 +41,7 @@
#include <linux/regulator/machine.h>
#include <linux/mmc/host.h>
#include <linux/export.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -734,6 +735,7 @@ static void __init omap3_evm_init(void)
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
usbhs_bdata.reset_gpio_port[1] = 135;
}
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(&musb_board_data);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3evm_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 2a065ba..9409eb8 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -29,6 +29,7 @@
#include <linux/i2c/twl.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -215,6 +216,7 @@ static void __init omap3logic_init(void)
board_mmc_init();
board_smsc911x_init();
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index a53a668..1ac3e81 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -35,6 +35,7 @@
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
#include <linux/regulator/fixed.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <asm/mach-types.h>
@@ -601,6 +602,7 @@ static void __init omap3pandora_init(void)
ARRAY_SIZE(omap3pandora_spi_board_info));
omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
usbhs_init(&usbhs_bdata);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
gpmc_nand_init(&pandora_nand_data, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 53a6cbc..63cb204 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -33,6 +33,7 @@
#include <linux/interrupt.h>
#include <linux/smsc911x.h>
#include <linux/i2c/at24.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -404,6 +405,7 @@ static void __init omap3_stalker_init(void)
omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 263cb9c..6b22ce3 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -28,6 +28,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/spi/spi.h>
@@ -365,6 +366,7 @@ static void __init omap3_touchbook_init(void)
/* Touchscreen and accelerometer */
omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3touchbook_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 5c8e9ce..64fb190 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -30,6 +30,7 @@
#include <linux/regulator/fixed.h>
#include <linux/ti_wilink_st.h>
#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
#include <linux/wl12xx.h>
#include <linux/platform_data/omap-abe-twl6040.h>
@@ -441,6 +442,7 @@ static void __init omap4_panda_init(void)
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
omap4_ehci_init();
+ usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
usb_musb_init(&musb_board_data);
omap4_panda_display_init();
}
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index c8fde3e..7e43ff3 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -36,6 +36,7 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/mtd-nand-omap2.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
@@ -499,6 +500,7 @@ static void __init overo_init(void)
mt46h32m32lf6_sdrc_params);
board_nand_init(overo_nand_partitions,
ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
overo_spi_init();
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0c777b7..f8a272c 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -18,6 +18,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/consumer.h>
#include <linux/platform_data/mtd-onenand-omap2.h>
+#include <linux/usb/phy.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -134,6 +135,7 @@ static void __init rm680_init(void)
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
rm680_peripherals_init();
}
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 26e07ad..dc5498b 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -20,6 +20,7 @@
#include <linux/wl12xx.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/gpio-omap.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -298,6 +299,7 @@ void __init zoom_peripherals_init(void)
omap_hsmmc_init(mmc);
omap_i2c_init();
platform_device_register(&omap_vwlan_device);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 3/6] ARM: OMAP: USB: Add phy binding information
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
Cc: kishon
This is w.r.t the changes in PHY library to support adding and getting
multiple PHYs of the same type. In the new design, the
binding information between the PHY and the USB controller should be
specified in the platform specific initialization code. So it's been
done here for OMAP platforms.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/mach-omap2/board-2430sdp.c | 2 ++
arch/arm/mach-omap2/board-3430sdp.c | 2 ++
arch/arm/mach-omap2/board-4430sdp.c | 2 ++
arch/arm/mach-omap2/board-cm-t35.c | 2 ++
arch/arm/mach-omap2/board-devkit8000.c | 2 ++
arch/arm/mach-omap2/board-igep0020.c | 2 ++
arch/arm/mach-omap2/board-ldp.c | 2 ++
arch/arm/mach-omap2/board-omap3beagle.c | 2 ++
arch/arm/mach-omap2/board-omap3evm.c | 2 ++
arch/arm/mach-omap2/board-omap3logic.c | 2 ++
arch/arm/mach-omap2/board-omap3pandora.c | 2 ++
arch/arm/mach-omap2/board-omap3stalker.c | 2 ++
arch/arm/mach-omap2/board-omap3touchbook.c | 2 ++
arch/arm/mach-omap2/board-omap4panda.c | 2 ++
arch/arm/mach-omap2/board-overo.c | 2 ++
arch/arm/mach-omap2/board-rm680.c | 2 ++
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 ++
17 files changed, 34 insertions(+)
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 4815ea6..1337f2c 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -27,6 +27,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/gpio.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -263,6 +264,7 @@ static void __init omap_2430sdp_init(void)
omap_hsmmc_init(mmc);
omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index bb73afc..8a2e242 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -25,6 +25,7 @@
#include <linux/gpio.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -579,6 +580,7 @@ static void __init omap_3430sdp_init(void)
omap_ads7846_init(1, gpio_pendown, 310, NULL);
omap_serial_init();
omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cc6696..8e8efcc 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -28,6 +28,7 @@
#include <linux/leds_pwm.h>
#include <linux/platform_data/omap4-keypad.h>
#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
@@ -696,6 +697,7 @@ static void __init omap_4430sdp_init(void)
omap4_sdp4430_wifi_init();
omap4_twl6030_hsmmc_init(mmc);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
usb_musb_init(&musb_board_data);
status = omap_ethernet_init();
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index b3102c2..f1172f2 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -30,6 +30,7 @@
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/spi/spi.h>
#include <linux/spi/tdo24m.h>
@@ -724,6 +725,7 @@ static void __init cm_t3x_common_init(void)
cm_t35_init_display();
omap_twl4030_audio_init("cm-t3x");
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
cm_t35_init_usbh();
cm_t35_init_camera();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 12865af..77cade52 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -29,6 +29,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -622,6 +623,7 @@ static void __init devkit8000_init(void)
omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(devkit8000_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0f24cb8..15e5881 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -18,6 +18,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/input.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
@@ -625,6 +626,7 @@ static void __init igep_init(void)
omap_serial_init();
omap_sdrc_init(m65kxxxxam_sdrc_params,
m65kxxxxam_sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
igep_flash_init();
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 0869f4f..3b5510a 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -28,6 +28,7 @@
#include <linux/io.h>
#include <linux/smsc911x.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <asm/mach-types.h>
@@ -418,6 +419,7 @@ static void __init omap_ldp_init(void)
omap_ads7846_init(1, 54, 310, NULL);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions),
ZOOM_NAND_CS, 0, nand_default_timings);
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d..4616f92 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -30,6 +30,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -519,6 +520,7 @@ static void __init omap3_beagle_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3beagle_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3985f35..a198b61 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -41,6 +41,7 @@
#include <linux/regulator/machine.h>
#include <linux/mmc/host.h>
#include <linux/export.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -734,6 +735,7 @@ static void __init omap3_evm_init(void)
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
usbhs_bdata.reset_gpio_port[1] = 135;
}
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(&musb_board_data);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3evm_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 2a065ba..9409eb8 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -29,6 +29,7 @@
#include <linux/i2c/twl.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -215,6 +216,7 @@ static void __init omap3logic_init(void)
board_mmc_init();
board_smsc911x_init();
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index a53a668..1ac3e81 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -35,6 +35,7 @@
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
#include <linux/regulator/fixed.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <asm/mach-types.h>
@@ -601,6 +602,7 @@ static void __init omap3pandora_init(void)
ARRAY_SIZE(omap3pandora_spi_board_info));
omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
usbhs_init(&usbhs_bdata);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
gpmc_nand_init(&pandora_nand_data, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 53a6cbc..63cb204 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -33,6 +33,7 @@
#include <linux/interrupt.h>
#include <linux/smsc911x.h>
#include <linux/i2c/at24.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -404,6 +405,7 @@ static void __init omap3_stalker_init(void)
omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 263cb9c..6b22ce3 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -28,6 +28,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/spi/spi.h>
@@ -365,6 +366,7 @@ static void __init omap3_touchbook_init(void)
/* Touchscreen and accelerometer */
omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3touchbook_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 5c8e9ce..64fb190 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -30,6 +30,7 @@
#include <linux/regulator/fixed.h>
#include <linux/ti_wilink_st.h>
#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
#include <linux/wl12xx.h>
#include <linux/platform_data/omap-abe-twl6040.h>
@@ -441,6 +442,7 @@ static void __init omap4_panda_init(void)
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
omap4_ehci_init();
+ usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
usb_musb_init(&musb_board_data);
omap4_panda_display_init();
}
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index c8fde3e..7e43ff3 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -36,6 +36,7 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/mtd-nand-omap2.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
@@ -499,6 +500,7 @@ static void __init overo_init(void)
mt46h32m32lf6_sdrc_params);
board_nand_init(overo_nand_partitions,
ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
overo_spi_init();
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0c777b7..f8a272c 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -18,6 +18,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/consumer.h>
#include <linux/platform_data/mtd-onenand-omap2.h>
+#include <linux/usb/phy.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -134,6 +135,7 @@ static void __init rm680_init(void)
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
rm680_peripherals_init();
}
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 26e07ad..dc5498b 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -20,6 +20,7 @@
#include <linux/wl12xx.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/gpio-omap.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -298,6 +299,7 @@ void __init zoom_peripherals_init(void)
omap_hsmmc_init(mmc);
omap_i2c_init();
platform_device_register(&omap_vwlan_device);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 3/6] ARM: OMAP: USB: Add phy binding information
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: linux-arm-kernel
This is w.r.t the changes in PHY library to support adding and getting
multiple PHYs of the same type. In the new design, the
binding information between the PHY and the USB controller should be
specified in the platform specific initialization code. So it's been
done here for OMAP platforms.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
arch/arm/mach-omap2/board-2430sdp.c | 2 ++
arch/arm/mach-omap2/board-3430sdp.c | 2 ++
arch/arm/mach-omap2/board-4430sdp.c | 2 ++
arch/arm/mach-omap2/board-cm-t35.c | 2 ++
arch/arm/mach-omap2/board-devkit8000.c | 2 ++
arch/arm/mach-omap2/board-igep0020.c | 2 ++
arch/arm/mach-omap2/board-ldp.c | 2 ++
arch/arm/mach-omap2/board-omap3beagle.c | 2 ++
arch/arm/mach-omap2/board-omap3evm.c | 2 ++
arch/arm/mach-omap2/board-omap3logic.c | 2 ++
arch/arm/mach-omap2/board-omap3pandora.c | 2 ++
arch/arm/mach-omap2/board-omap3stalker.c | 2 ++
arch/arm/mach-omap2/board-omap3touchbook.c | 2 ++
arch/arm/mach-omap2/board-omap4panda.c | 2 ++
arch/arm/mach-omap2/board-overo.c | 2 ++
arch/arm/mach-omap2/board-rm680.c | 2 ++
arch/arm/mach-omap2/board-zoom-peripherals.c | 2 ++
17 files changed, 34 insertions(+)
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 4815ea6..1337f2c 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -27,6 +27,7 @@
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/gpio.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -263,6 +264,7 @@ static void __init omap_2430sdp_init(void)
omap_hsmmc_init(mmc);
omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index bb73afc..8a2e242 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -25,6 +25,7 @@
#include <linux/gpio.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -579,6 +580,7 @@ static void __init omap_3430sdp_init(void)
omap_ads7846_init(1, gpio_pendown, 310, NULL);
omap_serial_init();
omap_sdrc_init(hyb18m512160af6_sdrc_params, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_smc91x_init();
board_flash_init(sdp_flash_partitions, chip_sel_3430, 0);
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 1cc6696..8e8efcc 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -28,6 +28,7 @@
#include <linux/leds_pwm.h>
#include <linux/platform_data/omap4-keypad.h>
#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
#include <asm/hardware/gic.h>
#include <asm/mach-types.h>
@@ -696,6 +697,7 @@ static void __init omap_4430sdp_init(void)
omap4_sdp4430_wifi_init();
omap4_twl6030_hsmmc_init(mmc);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
usb_musb_init(&musb_board_data);
status = omap_ethernet_init();
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index b3102c2..f1172f2 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -30,6 +30,7 @@
#include <linux/regulator/fixed.h>
#include <linux/regulator/machine.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/spi/spi.h>
#include <linux/spi/tdo24m.h>
@@ -724,6 +725,7 @@ static void __init cm_t3x_common_init(void)
cm_t35_init_display();
omap_twl4030_audio_init("cm-t3x");
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
cm_t35_init_usbh();
cm_t35_init_camera();
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index 12865af..77cade52 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -29,6 +29,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -622,6 +623,7 @@ static void __init devkit8000_init(void)
omap_ads7846_init(2, OMAP3_DEVKIT_TS_GPIO, 0, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(devkit8000_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 0f24cb8..15e5881 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -18,6 +18,7 @@
#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/input.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/regulator/fixed.h>
@@ -625,6 +626,7 @@ static void __init igep_init(void)
omap_serial_init();
omap_sdrc_init(m65kxxxxam_sdrc_params,
m65kxxxxam_sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
igep_flash_init();
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 0869f4f..3b5510a 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -28,6 +28,7 @@
#include <linux/io.h>
#include <linux/smsc911x.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <asm/mach-types.h>
@@ -418,6 +419,7 @@ static void __init omap_ldp_init(void)
omap_ads7846_init(1, 54, 310, NULL);
omap_serial_init();
omap_sdrc_init(NULL, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
board_nand_init(ldp_nand_partitions, ARRAY_SIZE(ldp_nand_partitions),
ZOOM_NAND_CS, 0, nand_default_timings);
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 22c483d..4616f92 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -30,6 +30,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/regulator/machine.h>
#include <linux/i2c/twl.h>
@@ -519,6 +520,7 @@ static void __init omap3_beagle_init(void)
omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3beagle_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 3985f35..a198b61 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -41,6 +41,7 @@
#include <linux/regulator/machine.h>
#include <linux/mmc/host.h>
#include <linux/export.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -734,6 +735,7 @@ static void __init omap3_evm_init(void)
omap_mux_init_gpio(135, OMAP_PIN_OUTPUT);
usbhs_bdata.reset_gpio_port[1] = 135;
}
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(&musb_board_data);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3evm_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap3logic.c b/arch/arm/mach-omap2/board-omap3logic.c
index 2a065ba..9409eb8 100644
--- a/arch/arm/mach-omap2/board-omap3logic.c
+++ b/arch/arm/mach-omap2/board-omap3logic.c
@@ -29,6 +29,7 @@
#include <linux/i2c/twl.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -215,6 +216,7 @@ static void __init omap3logic_init(void)
board_mmc_init();
board_smsc911x_init();
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
/* Ensure SDRC pins are mux'd for self-refresh */
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c
index a53a668..1ac3e81 100644
--- a/arch/arm/mach-omap2/board-omap3pandora.c
+++ b/arch/arm/mach-omap2/board-omap3pandora.c
@@ -35,6 +35,7 @@
#include <linux/mmc/host.h>
#include <linux/mmc/card.h>
#include <linux/regulator/fixed.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <asm/mach-types.h>
@@ -601,6 +602,7 @@ static void __init omap3pandora_init(void)
ARRAY_SIZE(omap3pandora_spi_board_info));
omap_ads7846_init(1, OMAP3_PANDORA_TS_GPIO, 0, NULL);
usbhs_init(&usbhs_bdata);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
gpmc_nand_init(&pandora_nand_data, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c
index 53a6cbc..63cb204 100644
--- a/arch/arm/mach-omap2/board-omap3stalker.c
+++ b/arch/arm/mach-omap2/board-omap3stalker.c
@@ -33,6 +33,7 @@
#include <linux/interrupt.h>
#include <linux/smsc911x.h>
#include <linux/i2c/at24.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -404,6 +405,7 @@ static void __init omap3_stalker_init(void)
omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
omap_ads7846_init(1, OMAP3_STALKER_TS_GPIO, 310, NULL);
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c
index 263cb9c..6b22ce3 100644
--- a/arch/arm/mach-omap2/board-omap3touchbook.c
+++ b/arch/arm/mach-omap2/board-omap3touchbook.c
@@ -28,6 +28,7 @@
#include <linux/mtd/partitions.h>
#include <linux/mtd/nand.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
#include <linux/spi/spi.h>
@@ -365,6 +366,7 @@ static void __init omap3_touchbook_init(void)
/* Touchscreen and accelerometer */
omap_ads7846_init(4, OMAP3_TS_GPIO, 310, &ads7846_pdata);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
board_nand_init(omap3touchbook_nand_partitions,
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 5c8e9ce..64fb190 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -30,6 +30,7 @@
#include <linux/regulator/fixed.h>
#include <linux/ti_wilink_st.h>
#include <linux/usb/musb.h>
+#include <linux/usb/phy.h>
#include <linux/wl12xx.h>
#include <linux/platform_data/omap-abe-twl6040.h>
@@ -441,6 +442,7 @@ static void __init omap4_panda_init(void)
omap_sdrc_init(NULL, NULL);
omap4_twl6030_hsmmc_init(mmc);
omap4_ehci_init();
+ usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto");
usb_musb_init(&musb_board_data);
omap4_panda_display_init();
}
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index c8fde3e..7e43ff3 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -36,6 +36,7 @@
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
#include <linux/mmc/host.h>
+#include <linux/usb/phy.h>
#include <linux/platform_data/mtd-nand-omap2.h>
#include <linux/platform_data/spi-omap2-mcspi.h>
@@ -499,6 +500,7 @@ static void __init overo_init(void)
mt46h32m32lf6_sdrc_params);
board_nand_init(overo_nand_partitions,
ARRAY_SIZE(overo_nand_partitions), NAND_CS, 0, NULL);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
usbhs_init(&usbhs_bdata);
overo_spi_init();
diff --git a/arch/arm/mach-omap2/board-rm680.c b/arch/arm/mach-omap2/board-rm680.c
index 0c777b7..f8a272c 100644
--- a/arch/arm/mach-omap2/board-rm680.c
+++ b/arch/arm/mach-omap2/board-rm680.c
@@ -18,6 +18,7 @@
#include <linux/regulator/machine.h>
#include <linux/regulator/consumer.h>
#include <linux/platform_data/mtd-onenand-omap2.h>
+#include <linux/usb/phy.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
@@ -134,6 +135,7 @@ static void __init rm680_init(void)
sdrc_params = nokia_get_sdram_timings();
omap_sdrc_init(sdrc_params, sdrc_params);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
rm680_peripherals_init();
}
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c
index 26e07ad..dc5498b 100644
--- a/arch/arm/mach-omap2/board-zoom-peripherals.c
+++ b/arch/arm/mach-omap2/board-zoom-peripherals.c
@@ -20,6 +20,7 @@
#include <linux/wl12xx.h>
#include <linux/mmc/host.h>
#include <linux/platform_data/gpio-omap.h>
+#include <linux/usb/phy.h>
#include <asm/mach-types.h>
#include <asm/mach/arch.h>
@@ -298,6 +299,7 @@ void __init zoom_peripherals_init(void)
omap_hsmmc_init(mmc);
omap_i2c_init();
platform_device_register(&omap_vwlan_device);
+ usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb");
usb_musb_init(NULL);
enable_board_wakeup_source();
omap_serial_init();
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread
* [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
-1 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: kishon-l0cyMroinI0
New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
used in MUSB (OMAP), in order to make use of the binding information
provided in the board file (of OMAP platforms).
All the platforms should be modified similar to this to add and get the
PHY.
Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
---
drivers/usb/musb/omap2430.c | 2 +-
drivers/usb/otg/twl4030-usb.c | 3 ++-
drivers/usb/phy/omap-usb2.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index bf6cfe0..1a8cf6d 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
* up through ULPI. TWL4030-family PMICs include one,
* which needs a driver, drivers aren't always needed.
*/
- musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
+ musb->xceiv = devm_usb_get_phy_dev(dev, 0);
if (IS_ERR_OR_NULL(musb->xceiv)) {
pr_err("HS USB OTG: no transceiver configured\n");
return -ENODEV;
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 0a70193..a994715 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
twl->phy.dev = twl->dev;
twl->phy.label = "twl4030";
twl->phy.otg = otg;
+ twl->phy.type = USB_PHY_TYPE_USB2;
twl->phy.set_suspend = twl4030_set_suspend;
otg->phy = &twl->phy;
@@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "ldo init failed\n");
return err;
}
- usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
+ usb_add_phy_dev(&twl->phy);
platform_set_drvdata(pdev, twl);
if (device_create_file(&pdev->dev, &dev_attr_vbus))
diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
index 4b59b39..b5c759c 100644
--- a/drivers/usb/phy/omap-usb2.c
+++ b/drivers/usb/phy/omap-usb2.c
@@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
phy->phy.label = "omap-usb2";
phy->phy.set_suspend = omap_usb2_suspend;
phy->phy.otg = otg;
+ phy->phy.type = USB_PHY_TYPE_USB2;
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
}
clk_prepare(phy->wkupclk);
- usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
+ usb_add_phy_dev(&phy->phy);
platform_set_drvdata(pdev, phy);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
Cc: kishon
New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
used in MUSB (OMAP), in order to make use of the binding information
provided in the board file (of OMAP platforms).
All the platforms should be modified similar to this to add and get the
PHY.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/musb/omap2430.c | 2 +-
drivers/usb/otg/twl4030-usb.c | 3 ++-
drivers/usb/phy/omap-usb2.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index bf6cfe0..1a8cf6d 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
* up through ULPI. TWL4030-family PMICs include one,
* which needs a driver, drivers aren't always needed.
*/
- musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
+ musb->xceiv = devm_usb_get_phy_dev(dev, 0);
if (IS_ERR_OR_NULL(musb->xceiv)) {
pr_err("HS USB OTG: no transceiver configured\n");
return -ENODEV;
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 0a70193..a994715 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
twl->phy.dev = twl->dev;
twl->phy.label = "twl4030";
twl->phy.otg = otg;
+ twl->phy.type = USB_PHY_TYPE_USB2;
twl->phy.set_suspend = twl4030_set_suspend;
otg->phy = &twl->phy;
@@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "ldo init failed\n");
return err;
}
- usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
+ usb_add_phy_dev(&twl->phy);
platform_set_drvdata(pdev, twl);
if (device_create_file(&pdev->dev, &dev_attr_vbus))
diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
index 4b59b39..b5c759c 100644
--- a/drivers/usb/phy/omap-usb2.c
+++ b/drivers/usb/phy/omap-usb2.c
@@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
phy->phy.label = "omap-usb2";
phy->phy.set_suspend = omap_usb2_suspend;
phy->phy.otg = otg;
+ phy->phy.type = USB_PHY_TYPE_USB2;
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
}
clk_prepare(phy->wkupclk);
- usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
+ usb_add_phy_dev(&phy->phy);
platform_set_drvdata(pdev, phy);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: linux-arm-kernel
New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
used in MUSB (OMAP), in order to make use of the binding information
provided in the board file (of OMAP platforms).
All the platforms should be modified similar to this to add and get the
PHY.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/musb/omap2430.c | 2 +-
drivers/usb/otg/twl4030-usb.c | 3 ++-
drivers/usb/phy/omap-usb2.c | 3 ++-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index bf6cfe0..1a8cf6d 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
* up through ULPI. TWL4030-family PMICs include one,
* which needs a driver, drivers aren't always needed.
*/
- musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
+ musb->xceiv = devm_usb_get_phy_dev(dev, 0);
if (IS_ERR_OR_NULL(musb->xceiv)) {
pr_err("HS USB OTG: no transceiver configured\n");
return -ENODEV;
diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
index 0a70193..a994715 100644
--- a/drivers/usb/otg/twl4030-usb.c
+++ b/drivers/usb/otg/twl4030-usb.c
@@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
twl->phy.dev = twl->dev;
twl->phy.label = "twl4030";
twl->phy.otg = otg;
+ twl->phy.type = USB_PHY_TYPE_USB2;
twl->phy.set_suspend = twl4030_set_suspend;
otg->phy = &twl->phy;
@@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
dev_err(&pdev->dev, "ldo init failed\n");
return err;
}
- usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
+ usb_add_phy_dev(&twl->phy);
platform_set_drvdata(pdev, twl);
if (device_create_file(&pdev->dev, &dev_attr_vbus))
diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
index 4b59b39..b5c759c 100644
--- a/drivers/usb/phy/omap-usb2.c
+++ b/drivers/usb/phy/omap-usb2.c
@@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
phy->phy.label = "omap-usb2";
phy->phy.set_suspend = omap_usb2_suspend;
phy->phy.otg = otg;
+ phy->phy.type = USB_PHY_TYPE_USB2;
res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
@@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
}
clk_prepare(phy->wkupclk);
- usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
+ usb_add_phy_dev(&phy->phy);
platform_set_drvdata(pdev, phy);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* Re: [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 14:09 ` Roger Quadros
-1 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:09 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
> used in MUSB (OMAP), in order to make use of the binding information
> provided in the board file (of OMAP platforms).
> All the platforms should be modified similar to this to add and get the
> PHY.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/musb/omap2430.c | 2 +-
> drivers/usb/otg/twl4030-usb.c | 3 ++-
> drivers/usb/phy/omap-usb2.c | 3 ++-
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index bf6cfe0..1a8cf6d 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
> * up through ULPI. TWL4030-family PMICs include one,
> * which needs a driver, drivers aren't always needed.
> */
> - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> if (IS_ERR_OR_NULL(musb->xceiv)) {
> pr_err("HS USB OTG: no transceiver configured\n");
> return -ENODEV;
> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
> index 0a70193..a994715 100644
> --- a/drivers/usb/otg/twl4030-usb.c
> +++ b/drivers/usb/otg/twl4030-usb.c
> @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
> twl->phy.dev = twl->dev;
> twl->phy.label = "twl4030";
> twl->phy.otg = otg;
> + twl->phy.type = USB_PHY_TYPE_USB2;
What is the need to set phy.type? I think this should be deprecated along with the old API.
> twl->phy.set_suspend = twl4030_set_suspend;
>
> otg->phy = &twl->phy;
> @@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
> dev_err(&pdev->dev, "ldo init failed\n");
> return err;
> }
> - usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
> + usb_add_phy_dev(&twl->phy);
>
> platform_set_drvdata(pdev, twl);
> if (device_create_file(&pdev->dev, &dev_attr_vbus))
> diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
> index 4b59b39..b5c759c 100644
> --- a/drivers/usb/phy/omap-usb2.c
> +++ b/drivers/usb/phy/omap-usb2.c
> @@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
> phy->phy.label = "omap-usb2";
> phy->phy.set_suspend = omap_usb2_suspend;
> phy->phy.otg = otg;
> + phy->phy.type = USB_PHY_TYPE_USB2;
same here.
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>
> @@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
> }
> clk_prepare(phy->wkupclk);
>
> - usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
> + usb_add_phy_dev(&phy->phy);
>
> platform_set_drvdata(pdev, phy);
>
>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
@ 2013-01-22 14:09 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:09 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
> used in MUSB (OMAP), in order to make use of the binding information
> provided in the board file (of OMAP platforms).
> All the platforms should be modified similar to this to add and get the
> PHY.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/musb/omap2430.c | 2 +-
> drivers/usb/otg/twl4030-usb.c | 3 ++-
> drivers/usb/phy/omap-usb2.c | 3 ++-
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index bf6cfe0..1a8cf6d 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
> * up through ULPI. TWL4030-family PMICs include one,
> * which needs a driver, drivers aren't always needed.
> */
> - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> if (IS_ERR_OR_NULL(musb->xceiv)) {
> pr_err("HS USB OTG: no transceiver configured\n");
> return -ENODEV;
> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
> index 0a70193..a994715 100644
> --- a/drivers/usb/otg/twl4030-usb.c
> +++ b/drivers/usb/otg/twl4030-usb.c
> @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
> twl->phy.dev = twl->dev;
> twl->phy.label = "twl4030";
> twl->phy.otg = otg;
> + twl->phy.type = USB_PHY_TYPE_USB2;
What is the need to set phy.type? I think this should be deprecated along with the old API.
> twl->phy.set_suspend = twl4030_set_suspend;
>
> otg->phy = &twl->phy;
> @@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
> dev_err(&pdev->dev, "ldo init failed\n");
> return err;
> }
> - usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
> + usb_add_phy_dev(&twl->phy);
>
> platform_set_drvdata(pdev, twl);
> if (device_create_file(&pdev->dev, &dev_attr_vbus))
> diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
> index 4b59b39..b5c759c 100644
> --- a/drivers/usb/phy/omap-usb2.c
> +++ b/drivers/usb/phy/omap-usb2.c
> @@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
> phy->phy.label = "omap-usb2";
> phy->phy.set_suspend = omap_usb2_suspend;
> phy->phy.otg = otg;
> + phy->phy.type = USB_PHY_TYPE_USB2;
same here.
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>
> @@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
> }
> clk_prepare(phy->wkupclk);
>
> - usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
> + usb_add_phy_dev(&phy->phy);
>
> platform_set_drvdata(pdev, phy);
>
>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
@ 2013-01-22 14:09 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:09 UTC (permalink / raw)
To: linux-arm-kernel
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
> used in MUSB (OMAP), in order to make use of the binding information
> provided in the board file (of OMAP platforms).
> All the platforms should be modified similar to this to add and get the
> PHY.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/musb/omap2430.c | 2 +-
> drivers/usb/otg/twl4030-usb.c | 3 ++-
> drivers/usb/phy/omap-usb2.c | 3 ++-
> 3 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index bf6cfe0..1a8cf6d 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
> * up through ULPI. TWL4030-family PMICs include one,
> * which needs a driver, drivers aren't always needed.
> */
> - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> if (IS_ERR_OR_NULL(musb->xceiv)) {
> pr_err("HS USB OTG: no transceiver configured\n");
> return -ENODEV;
> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
> index 0a70193..a994715 100644
> --- a/drivers/usb/otg/twl4030-usb.c
> +++ b/drivers/usb/otg/twl4030-usb.c
> @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
> twl->phy.dev = twl->dev;
> twl->phy.label = "twl4030";
> twl->phy.otg = otg;
> + twl->phy.type = USB_PHY_TYPE_USB2;
What is the need to set phy.type? I think this should be deprecated along with the old API.
> twl->phy.set_suspend = twl4030_set_suspend;
>
> otg->phy = &twl->phy;
> @@ -624,7 +625,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
> dev_err(&pdev->dev, "ldo init failed\n");
> return err;
> }
> - usb_add_phy(&twl->phy, USB_PHY_TYPE_USB2);
> + usb_add_phy_dev(&twl->phy);
>
> platform_set_drvdata(pdev, twl);
> if (device_create_file(&pdev->dev, &dev_attr_vbus))
> diff --git a/drivers/usb/phy/omap-usb2.c b/drivers/usb/phy/omap-usb2.c
> index 4b59b39..b5c759c 100644
> --- a/drivers/usb/phy/omap-usb2.c
> +++ b/drivers/usb/phy/omap-usb2.c
> @@ -143,6 +143,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
> phy->phy.label = "omap-usb2";
> phy->phy.set_suspend = omap_usb2_suspend;
> phy->phy.otg = otg;
> + phy->phy.type = USB_PHY_TYPE_USB2;
same here.
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>
> @@ -168,7 +169,7 @@ static int omap_usb2_probe(struct platform_device *pdev)
> }
> clk_prepare(phy->wkupclk);
>
> - usb_add_phy(&phy->phy, USB_PHY_TYPE_USB2);
> + usb_add_phy_dev(&phy->phy);
>
> platform_set_drvdata(pdev, phy);
>
>
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <50FE9DA6.4030507-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
2013-01-22 14:09 ` Roger Quadros
(?)
@ 2013-01-24 18:58 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-24 18:58 UTC (permalink / raw)
To: Roger Quadros
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Hi,
On Tuesday 22 January 2013 07:39 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
>> used in MUSB (OMAP), in order to make use of the binding information
>> provided in the board file (of OMAP platforms).
>> All the platforms should be modified similar to this to add and get the
>> PHY.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>> ---
>> drivers/usb/musb/omap2430.c | 2 +-
>> drivers/usb/otg/twl4030-usb.c | 3 ++-
>> drivers/usb/phy/omap-usb2.c | 3 ++-
>> 3 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>> index bf6cfe0..1a8cf6d 100644
>> --- a/drivers/usb/musb/omap2430.c
>> +++ b/drivers/usb/musb/omap2430.c
>> @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
>> * up through ULPI. TWL4030-family PMICs include one,
>> * which needs a driver, drivers aren't always needed.
>> */
>> - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>> pr_err("HS USB OTG: no transceiver configured\n");
>> return -ENODEV;
>> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
>> index 0a70193..a994715 100644
>> --- a/drivers/usb/otg/twl4030-usb.c
>> +++ b/drivers/usb/otg/twl4030-usb.c
>> @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
>> twl->phy.dev = twl->dev;
>> twl->phy.label = "twl4030";
>> twl->phy.otg = otg;
>> + twl->phy.type = USB_PHY_TYPE_USB2;
>
> What is the need to set phy.type? I think this should be deprecated along with the old API.
The *type* field as such is not deprecated. Adding and getting a PHY
using *type* is deprecated.
Thanks
Kishon
--
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
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
@ 2013-01-24 18:58 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-24 18:58 UTC (permalink / raw)
To: Roger Quadros
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
Hi,
On Tuesday 22 January 2013 07:39 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
>> used in MUSB (OMAP), in order to make use of the binding information
>> provided in the board file (of OMAP platforms).
>> All the platforms should be modified similar to this to add and get the
>> PHY.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/usb/musb/omap2430.c | 2 +-
>> drivers/usb/otg/twl4030-usb.c | 3 ++-
>> drivers/usb/phy/omap-usb2.c | 3 ++-
>> 3 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>> index bf6cfe0..1a8cf6d 100644
>> --- a/drivers/usb/musb/omap2430.c
>> +++ b/drivers/usb/musb/omap2430.c
>> @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
>> * up through ULPI. TWL4030-family PMICs include one,
>> * which needs a driver, drivers aren't always needed.
>> */
>> - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>> pr_err("HS USB OTG: no transceiver configured\n");
>> return -ENODEV;
>> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
>> index 0a70193..a994715 100644
>> --- a/drivers/usb/otg/twl4030-usb.c
>> +++ b/drivers/usb/otg/twl4030-usb.c
>> @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
>> twl->phy.dev = twl->dev;
>> twl->phy.label = "twl4030";
>> twl->phy.otg = otg;
>> + twl->phy.type = USB_PHY_TYPE_USB2;
>
> What is the need to set phy.type? I think this should be deprecated along with the old API.
The *type* field as such is not deprecated. Adding and getting a PHY
using *type* is deprecated.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 4/6] drivers: usb: musb: omap: make use of the new PHY lib APIs
@ 2013-01-24 18:58 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-24 18:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 22 January 2013 07:39 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> New PHY lib APIs like usb_add_phy_dev() and devm_usb_get_phy_dev() are
>> used in MUSB (OMAP), in order to make use of the binding information
>> provided in the board file (of OMAP platforms).
>> All the platforms should be modified similar to this to add and get the
>> PHY.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/usb/musb/omap2430.c | 2 +-
>> drivers/usb/otg/twl4030-usb.c | 3 ++-
>> drivers/usb/phy/omap-usb2.c | 3 ++-
>> 3 files changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>> index bf6cfe0..1a8cf6d 100644
>> --- a/drivers/usb/musb/omap2430.c
>> +++ b/drivers/usb/musb/omap2430.c
>> @@ -345,7 +345,7 @@ static int omap2430_musb_init(struct musb *musb)
>> * up through ULPI. TWL4030-family PMICs include one,
>> * which needs a driver, drivers aren't always needed.
>> */
>> - musb->xceiv = devm_usb_get_phy(dev, USB_PHY_TYPE_USB2);
>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>> pr_err("HS USB OTG: no transceiver configured\n");
>> return -ENODEV;
>> diff --git a/drivers/usb/otg/twl4030-usb.c b/drivers/usb/otg/twl4030-usb.c
>> index 0a70193..a994715 100644
>> --- a/drivers/usb/otg/twl4030-usb.c
>> +++ b/drivers/usb/otg/twl4030-usb.c
>> @@ -610,6 +610,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
>> twl->phy.dev = twl->dev;
>> twl->phy.label = "twl4030";
>> twl->phy.otg = otg;
>> + twl->phy.type = USB_PHY_TYPE_USB2;
>
> What is the need to set phy.type? I think this should be deprecated along with the old API.
The *type* field as such is not deprecated. Adding and getting a PHY
using *type* is deprecated.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
-1 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
Cc: kishon-l0cyMroinI0
The OMAP glue has been modified to get PHY by phandle for dt boot.
Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
---
drivers/usb/musb/omap2430.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 1a8cf6d..e43faeb 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
* up through ULPI. TWL4030-family PMICs include one,
* which needs a driver, drivers aren't always needed.
*/
- musb->xceiv = devm_usb_get_phy_dev(dev, 0);
+ if (dev->parent->of_node)
+ musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
+ "usb_phy", 0);
+ else
+ musb->xceiv = devm_usb_get_phy_dev(dev, 0);
+
if (IS_ERR_OR_NULL(musb->xceiv)) {
pr_err("HS USB OTG: no transceiver configured\n");
return -ENODEV;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
Cc: kishon
The OMAP glue has been modified to get PHY by phandle for dt boot.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/musb/omap2430.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 1a8cf6d..e43faeb 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
* up through ULPI. TWL4030-family PMICs include one,
* which needs a driver, drivers aren't always needed.
*/
- musb->xceiv = devm_usb_get_phy_dev(dev, 0);
+ if (dev->parent->of_node)
+ musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
+ "usb_phy", 0);
+ else
+ musb->xceiv = devm_usb_get_phy_dev(dev, 0);
+
if (IS_ERR_OR_NULL(musb->xceiv)) {
pr_err("HS USB OTG: no transceiver configured\n");
return -ENODEV;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 9:58 ` Kishon Vijay Abraham I
0 siblings, 0 replies; 82+ messages in thread
From: Kishon Vijay Abraham I @ 2013-01-22 9:58 UTC (permalink / raw)
To: linux-arm-kernel
The OMAP glue has been modified to get PHY by phandle for dt boot.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
---
drivers/usb/musb/omap2430.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index 1a8cf6d..e43faeb 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
* up through ULPI. TWL4030-family PMICs include one,
* which needs a driver, drivers aren't always needed.
*/
- musb->xceiv = devm_usb_get_phy_dev(dev, 0);
+ if (dev->parent->of_node)
+ musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
+ "usb_phy", 0);
+ else
+ musb->xceiv = devm_usb_get_phy_dev(dev, 0);
+
if (IS_ERR_OR_NULL(musb->xceiv)) {
pr_err("HS USB OTG: no transceiver configured\n");
return -ENODEV;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 14:17 ` Roger Quadros
-1 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:17 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> The OMAP glue has been modified to get PHY by phandle for dt boot.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/musb/omap2430.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 1a8cf6d..e43faeb 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
> * up through ULPI. TWL4030-family PMICs include one,
> * which needs a driver, drivers aren't always needed.
> */
> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> + if (dev->parent->of_node)
> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
> + "usb_phy", 0);
> + else
> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> +
> if (IS_ERR_OR_NULL(musb->xceiv)) {
> pr_err("HS USB OTG: no transceiver configured\n");
> return -ENODEV;
This will not work with PHY driver as a module. You need to use deferred probing mechanism here
after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
e.g.
if (IS_ERR(musb->xceiv)) {
int ret = PTR_ERR(musb->xveiv);
if (ret == -ENODEV)
pr_err("HS USB OTG: no transceiver configured\n");
return ret;
}
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 14:17 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:17 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> The OMAP glue has been modified to get PHY by phandle for dt boot.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/musb/omap2430.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 1a8cf6d..e43faeb 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
> * up through ULPI. TWL4030-family PMICs include one,
> * which needs a driver, drivers aren't always needed.
> */
> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> + if (dev->parent->of_node)
> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
> + "usb_phy", 0);
> + else
> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> +
> if (IS_ERR_OR_NULL(musb->xceiv)) {
> pr_err("HS USB OTG: no transceiver configured\n");
> return -ENODEV;
This will not work with PHY driver as a module. You need to use deferred probing mechanism here
after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
e.g.
if (IS_ERR(musb->xceiv)) {
int ret = PTR_ERR(musb->xveiv);
if (ret == -ENODEV)
pr_err("HS USB OTG: no transceiver configured\n");
return ret;
}
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 14:17 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:17 UTC (permalink / raw)
To: linux-arm-kernel
On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
> The OMAP glue has been modified to get PHY by phandle for dt boot.
>
> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
> drivers/usb/musb/omap2430.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
> index 1a8cf6d..e43faeb 100644
> --- a/drivers/usb/musb/omap2430.c
> +++ b/drivers/usb/musb/omap2430.c
> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
> * up through ULPI. TWL4030-family PMICs include one,
> * which needs a driver, drivers aren't always needed.
> */
> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> + if (dev->parent->of_node)
> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
> + "usb_phy", 0);
> + else
> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
> +
> if (IS_ERR_OR_NULL(musb->xceiv)) {
> pr_err("HS USB OTG: no transceiver configured\n");
> return -ENODEV;
This will not work with PHY driver as a module. You need to use deferred probing mechanism here
after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
e.g.
if (IS_ERR(musb->xceiv)) {
int ret = PTR_ERR(musb->xveiv);
if (ret == -ENODEV)
pr_err("HS USB OTG: no transceiver configured\n");
return ret;
}
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <50FE9F5C.2010501-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 14:17 ` Roger Quadros
(?)
@ 2013-01-22 14:37 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 14:37 UTC (permalink / raw)
To: Roger Quadros
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ
On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>> ---
>> drivers/usb/musb/omap2430.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>> index 1a8cf6d..e43faeb 100644
>> --- a/drivers/usb/musb/omap2430.c
>> +++ b/drivers/usb/musb/omap2430.c
>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>> * up through ULPI. TWL4030-family PMICs include one,
>> * which needs a driver, drivers aren't always needed.
>> */
>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> + if (dev->parent->of_node)
>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>> + "usb_phy", 0);
>> + else
>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> +
>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>> pr_err("HS USB OTG: no transceiver configured\n");
>> return -ENODEV;
>
> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
IIUC, even using -EPROBE_DEFER might not help if we are making the PHY
driver as module, since the kernel will try to probe only till the
prompt comes.
And having -EPROBE_DEFER instead of -ENODEV might also not help since,
the gadget driver wont be able to bind to UDC (usb_gadget_probe_driver
will fail).
A lot of things need to be changed before we change to -EPROBE_DEFER IMO.
Thanks
Kishon
--
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
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 14:37 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 14:37 UTC (permalink / raw)
To: Roger Quadros
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/usb/musb/omap2430.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>> index 1a8cf6d..e43faeb 100644
>> --- a/drivers/usb/musb/omap2430.c
>> +++ b/drivers/usb/musb/omap2430.c
>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>> * up through ULPI. TWL4030-family PMICs include one,
>> * which needs a driver, drivers aren't always needed.
>> */
>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> + if (dev->parent->of_node)
>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>> + "usb_phy", 0);
>> + else
>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> +
>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>> pr_err("HS USB OTG: no transceiver configured\n");
>> return -ENODEV;
>
> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
IIUC, even using -EPROBE_DEFER might not help if we are making the PHY
driver as module, since the kernel will try to probe only till the
prompt comes.
And having -EPROBE_DEFER instead of -ENODEV might also not help since,
the gadget driver wont be able to bind to UDC (usb_gadget_probe_driver
will fail).
A lot of things need to be changed before we change to -EPROBE_DEFER IMO.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 14:37 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 14:37 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>
>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>> ---
>> drivers/usb/musb/omap2430.c | 7 ++++++-
>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>> index 1a8cf6d..e43faeb 100644
>> --- a/drivers/usb/musb/omap2430.c
>> +++ b/drivers/usb/musb/omap2430.c
>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>> * up through ULPI. TWL4030-family PMICs include one,
>> * which needs a driver, drivers aren't always needed.
>> */
>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> + if (dev->parent->of_node)
>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>> + "usb_phy", 0);
>> + else
>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>> +
>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>> pr_err("HS USB OTG: no transceiver configured\n");
>> return -ENODEV;
>
> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
IIUC, even using -EPROBE_DEFER might not help if we are making the PHY
driver as module, since the kernel will try to probe only till the
prompt comes.
And having -EPROBE_DEFER instead of -ENODEV might also not help since,
the gadget driver wont be able to bind to UDC (usb_gadget_probe_driver
will fail).
A lot of things need to be changed before we change to -EPROBE_DEFER IMO.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 14:37 ` kishon
(?)
@ 2013-01-22 14:47 ` Roger Quadros
-1 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:47 UTC (permalink / raw)
To: kishon
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 04:37 PM, kishon wrote:
> On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
>> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>>
>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>> drivers/usb/musb/omap2430.c | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>> index 1a8cf6d..e43faeb 100644
>>> --- a/drivers/usb/musb/omap2430.c
>>> +++ b/drivers/usb/musb/omap2430.c
>>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>>> * up through ULPI. TWL4030-family PMICs include one,
>>> * which needs a driver, drivers aren't always needed.
>>> */
>>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>> + if (dev->parent->of_node)
>>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>>> + "usb_phy", 0);
>>> + else
>>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>> +
>>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>>> pr_err("HS USB OTG: no transceiver configured\n");
>>> return -ENODEV;
>>
>> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
>> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
>
> IIUC, even using -EPROBE_DEFER might not help if we are making the PHY driver as module, since the kernel will try to probe only till the prompt comes.
>
Oh really? I thought deferred probing takes place whenever a new driver is bound to a device. What does "prompt comes" have to do with it?
> And having -EPROBE_DEFER instead of -ENODEV might also not help since, the gadget driver wont be able to bind to UDC (usb_gadget_probe_driver will fail).
>
> A lot of things need to be changed before we change to -EPROBE_DEFER IMO.
OK.
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 14:47 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:47 UTC (permalink / raw)
To: kishon
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On 01/22/2013 04:37 PM, kishon wrote:
> On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
>> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>>
>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>> drivers/usb/musb/omap2430.c | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>> index 1a8cf6d..e43faeb 100644
>>> --- a/drivers/usb/musb/omap2430.c
>>> +++ b/drivers/usb/musb/omap2430.c
>>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>>> * up through ULPI. TWL4030-family PMICs include one,
>>> * which needs a driver, drivers aren't always needed.
>>> */
>>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>> + if (dev->parent->of_node)
>>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>>> + "usb_phy", 0);
>>> + else
>>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>> +
>>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>>> pr_err("HS USB OTG: no transceiver configured\n");
>>> return -ENODEV;
>>
>> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
>> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
>
> IIUC, even using -EPROBE_DEFER might not help if we are making the PHY driver as module, since the kernel will try to probe only till the prompt comes.
>
Oh really? I thought deferred probing takes place whenever a new driver is bound to a device. What does "prompt comes" have to do with it?
> And having -EPROBE_DEFER instead of -ENODEV might also not help since, the gadget driver wont be able to bind to UDC (usb_gadget_probe_driver will fail).
>
> A lot of things need to be changed before we change to -EPROBE_DEFER IMO.
OK.
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 14:47 ` Roger Quadros
0 siblings, 0 replies; 82+ messages in thread
From: Roger Quadros @ 2013-01-22 14:47 UTC (permalink / raw)
To: linux-arm-kernel
On 01/22/2013 04:37 PM, kishon wrote:
> On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
>> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>>
>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>> ---
>>> drivers/usb/musb/omap2430.c | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>> index 1a8cf6d..e43faeb 100644
>>> --- a/drivers/usb/musb/omap2430.c
>>> +++ b/drivers/usb/musb/omap2430.c
>>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>>> * up through ULPI. TWL4030-family PMICs include one,
>>> * which needs a driver, drivers aren't always needed.
>>> */
>>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>> + if (dev->parent->of_node)
>>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>>> + "usb_phy", 0);
>>> + else
>>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>> +
>>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>>> pr_err("HS USB OTG: no transceiver configured\n");
>>> return -ENODEV;
>>
>> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
>> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
>
> IIUC, even using -EPROBE_DEFER might not help if we are making the PHY driver as module, since the kernel will try to probe only till the prompt comes.
>
Oh really? I thought deferred probing takes place whenever a new driver is bound to a device. What does "prompt comes" have to do with it?
> And having -EPROBE_DEFER instead of -ENODEV might also not help since, the gadget driver wont be able to bind to UDC (usb_gadget_probe_driver will fail).
>
> A lot of things need to be changed before we change to -EPROBE_DEFER IMO.
OK.
--
cheers,
-roger
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 14:47 ` Roger Quadros
(?)
@ 2013-01-22 15:21 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:21 UTC (permalink / raw)
To: Roger Quadros
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On Tuesday 22 January 2013 08:17 PM, Roger Quadros wrote:
> On 01/22/2013 04:37 PM, kishon wrote:
>> On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
>>> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>>>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>>>
>>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>>> ---
>>>> drivers/usb/musb/omap2430.c | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>>> index 1a8cf6d..e43faeb 100644
>>>> --- a/drivers/usb/musb/omap2430.c
>>>> +++ b/drivers/usb/musb/omap2430.c
>>>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>>>> * up through ULPI. TWL4030-family PMICs include one,
>>>> * which needs a driver, drivers aren't always needed.
>>>> */
>>>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>>> + if (dev->parent->of_node)
>>>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>>>> + "usb_phy", 0);
>>>> + else
>>>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>>> +
>>>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>>>> pr_err("HS USB OTG: no transceiver configured\n");
>>>> return -ENODEV;
>>>
>>> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
>>> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
>>
>> IIUC, even using -EPROBE_DEFER might not help if we are making the PHY driver as module, since the kernel will try to probe only till the prompt comes.
>>
> Oh really? I thought deferred probing takes place whenever a new driver is bound to a device.
You might also be right. I'm not so sure.
What does "prompt comes" have to do with it?
I just meant end of boot process. But it's better to check if deferred
probing takes place whenever a new driver is bound to a device as you
just mentioned.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 15:21 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:21 UTC (permalink / raw)
To: Roger Quadros
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap, linux-kernel, devicetree-discuss
On Tuesday 22 January 2013 08:17 PM, Roger Quadros wrote:
> On 01/22/2013 04:37 PM, kishon wrote:
>> On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
>>> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>>>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>>>
>>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>>> ---
>>>> drivers/usb/musb/omap2430.c | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>>> index 1a8cf6d..e43faeb 100644
>>>> --- a/drivers/usb/musb/omap2430.c
>>>> +++ b/drivers/usb/musb/omap2430.c
>>>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>>>> * up through ULPI. TWL4030-family PMICs include one,
>>>> * which needs a driver, drivers aren't always needed.
>>>> */
>>>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>>> + if (dev->parent->of_node)
>>>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>>>> + "usb_phy", 0);
>>>> + else
>>>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>>> +
>>>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>>>> pr_err("HS USB OTG: no transceiver configured\n");
>>>> return -ENODEV;
>>>
>>> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
>>> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
>>
>> IIUC, even using -EPROBE_DEFER might not help if we are making the PHY driver as module, since the kernel will try to probe only till the prompt comes.
>>
> Oh really? I thought deferred probing takes place whenever a new driver is bound to a device.
You might also be right. I'm not so sure.
What does "prompt comes" have to do with it?
I just meant end of boot process. But it's better to check if deferred
probing takes place whenever a new driver is bound to a device as you
just mentioned.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 15:21 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:21 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 22 January 2013 08:17 PM, Roger Quadros wrote:
> On 01/22/2013 04:37 PM, kishon wrote:
>> On Tuesday 22 January 2013 07:47 PM, Roger Quadros wrote:
>>> On 01/22/2013 11:58 AM, Kishon Vijay Abraham I wrote:
>>>> The OMAP glue has been modified to get PHY by phandle for dt boot.
>>>>
>>>> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
>>>> ---
>>>> drivers/usb/musb/omap2430.c | 7 ++++++-
>>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>>
>>>> diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
>>>> index 1a8cf6d..e43faeb 100644
>>>> --- a/drivers/usb/musb/omap2430.c
>>>> +++ b/drivers/usb/musb/omap2430.c
>>>> @@ -345,7 +345,12 @@ static int omap2430_musb_init(struct musb *musb)
>>>> * up through ULPI. TWL4030-family PMICs include one,
>>>> * which needs a driver, drivers aren't always needed.
>>>> */
>>>> - musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>>> + if (dev->parent->of_node)
>>>> + musb->xceiv = devm_usb_get_phy_by_phandle(dev->parent,
>>>> + "usb_phy", 0);
>>>> + else
>>>> + musb->xceiv = devm_usb_get_phy_dev(dev, 0);
>>>> +
>>>> if (IS_ERR_OR_NULL(musb->xceiv)) {
>>>> pr_err("HS USB OTG: no transceiver configured\n");
>>>> return -ENODEV;
>>>
>>> This will not work with PHY driver as a module. You need to use deferred probing mechanism here
>>> after you have addressed my comment in patch 2 and also devm_usb_get_phy_by_phandle()
>>
>> IIUC, even using -EPROBE_DEFER might not help if we are making the PHY driver as module, since the kernel will try to probe only till the prompt comes.
>>
> Oh really? I thought deferred probing takes place whenever a new driver is bound to a device.
You might also be right. I'm not so sure.
What does "prompt comes" have to do with it?
I just meant end of boot process. But it's better to check if deferred
probing takes place whenever a new driver is bound to a device as you
just mentioned.
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <50FEAE96.30706-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 15:21 ` kishon
(?)
@ 2013-01-22 15:38 ` Peter Ujfalusi
-1 siblings, 0 replies; 82+ messages in thread
From: Peter Ujfalusi @ 2013-01-22 15:38 UTC (permalink / raw)
To: kishon
Cc: Roger Quadros, linux-lFZ/pmaqli7XmaaqVzeoHQ,
tony-4v6yS6AI5VpBDgjK7y7TUQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
eballetbo-Re5JQEeQqe8AvxtiuMwx3w, javier-0uQlZySMnqxg9hUCZPvPmw,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On 01/22/2013 04:21 PM, kishon wrote:
> But it's better to check if deferred probing
> takes place whenever a new driver is bound to a device as you just mentioned.
Whenever you load (might be also when you unload) a driver the deferred
modules will try to probe again. This is to check back if the dependency of
the deferred modules has been fulfilled by the new driver or not.
--
Péter
--
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
^ permalink raw reply [flat|nested] 82+ messages in thread
* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 15:38 ` Peter Ujfalusi
0 siblings, 0 replies; 82+ messages in thread
From: Peter Ujfalusi @ 2013-01-22 15:38 UTC (permalink / raw)
To: kishon
Cc: Roger Quadros, linux, tony, gregkh, devicetree-discuss, linux-usb,
linux-kernel, balbi, eballetbo, javier, linux-omap,
linux-arm-kernel
On 01/22/2013 04:21 PM, kishon wrote:
> But it's better to check if deferred probing
> takes place whenever a new driver is bound to a device as you just mentioned.
Whenever you load (might be also when you unload) a driver the deferred
modules will try to probe again. This is to check back if the dependency of
the deferred modules has been fulfilled by the new driver or not.
--
Péter
^ permalink raw reply [flat|nested] 82+ messages in thread
* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 15:38 ` Peter Ujfalusi
0 siblings, 0 replies; 82+ messages in thread
From: Peter Ujfalusi @ 2013-01-22 15:38 UTC (permalink / raw)
To: linux-arm-kernel
On 01/22/2013 04:21 PM, kishon wrote:
> But it's better to check if deferred probing
> takes place whenever a new driver is bound to a device as you just mentioned.
Whenever you load (might be also when you unload) a driver the deferred
modules will try to probe again. This is to check back if the dependency of
the deferred modules has been fulfilled by the new driver or not.
--
P?ter
^ permalink raw reply [flat|nested] 82+ messages in thread
[parent not found: <50FEB275.80504-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
2013-01-22 15:38 ` Peter Ujfalusi
(?)
@ 2013-01-22 15:40 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:40 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
eballetbo-Re5JQEeQqe8AvxtiuMwx3w, javier-0uQlZySMnqxg9hUCZPvPmw,
linux-omap-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Roger Quadros
Hi,
On Tuesday 22 January 2013 09:08 PM, Peter Ujfalusi wrote:
> On 01/22/2013 04:21 PM, kishon wrote:
>> But it's better to check if deferred probing
>> takes place whenever a new driver is bound to a device as you just mentioned.
>
> Whenever you load (might be also when you unload) a driver the deferred
> modules will try to probe again. This is to check back if the dependency of
> the deferred modules has been fulfilled by the new driver or not.
Thanks Peter.
-Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* Re: [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 15:40 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:40 UTC (permalink / raw)
To: Peter Ujfalusi
Cc: Roger Quadros, linux, tony, gregkh, devicetree-discuss, linux-usb,
linux-kernel, balbi, eballetbo, javier, linux-omap,
linux-arm-kernel
Hi,
On Tuesday 22 January 2013 09:08 PM, Peter Ujfalusi wrote:
> On 01/22/2013 04:21 PM, kishon wrote:
>> But it's better to check if deferred probing
>> takes place whenever a new driver is bound to a device as you just mentioned.
>
> Whenever you load (might be also when you unload) a driver the deferred
> modules will try to probe again. This is to check back if the dependency of
> the deferred modules has been fulfilled by the new driver or not.
Thanks Peter.
-Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* [PATCH v1 6/6] USB: MUSB: OMAP: get PHY by phandle for dt boot
@ 2013-01-22 15:40 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:40 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 22 January 2013 09:08 PM, Peter Ujfalusi wrote:
> On 01/22/2013 04:21 PM, kishon wrote:
>> But it's better to check if deferred probing
>> takes place whenever a new driver is bound to a device as you just mentioned.
>
> Whenever you load (might be also when you unload) a driver the deferred
> modules will try to probe again. This is to check back if the dependency of
> the deferred modules has been fulfilled by the new driver or not.
Thanks Peter.
-Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-22 9:58 ` Kishon Vijay Abraham I
(?)
@ 2013-01-22 15:41 ` Koen Kooi
-1 siblings, 0 replies; 82+ messages in thread
From: Koen Kooi @ 2013-01-22 15:41 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
eballetbo-Re5JQEeQqe8AvxtiuMwx3w, javier-0uQlZySMnqxg9hUCZPvPmw,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org> het volgende geschreven:
> This patch series adds support for adding multiple PHY's (of same type).
> The binding information has to be present in the PHY library (otg.c) in
> order for it to return the appropriate PHY whenever the USB controller
> request for the PHY. So added a new API usb_bind_phy() to pass the binding
> information. This API should be called by platform specific initialization
> code.
>
> So the binding should be done something like
> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying the USB
> controller device name, index, and the PHY device name.
> I have done this binding for OMAP platforms, but it should be done for
> all the platforms.
>
> After this design, the phy can be got by passing the USB controller device
> pointer and the index.
>
> Developed this patch series on
> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
> after applying "usb: musb: add driver for control module" patch series
> and "ARM: dts: omap: add dt data for MUSB"
>
> Did basic enumeration testing in omap4 panda and omap3 beagle.
With this patchset USB completely breaks on am33xx beaglebone, is that intended?
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 15:41 ` Koen Kooi
0 siblings, 0 replies; 82+ messages in thread
From: Koen Kooi @ 2013-01-22 15:41 UTC (permalink / raw)
To: Kishon Vijay Abraham I
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap@vger.kernel.org List, linux-kernel,
devicetree-discuss, Jason Kridner
Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com> het volgende geschreven:
> This patch series adds support for adding multiple PHY's (of same type).
> The binding information has to be present in the PHY library (otg.c) in
> order for it to return the appropriate PHY whenever the USB controller
> request for the PHY. So added a new API usb_bind_phy() to pass the binding
> information. This API should be called by platform specific initialization
> code.
>
> So the binding should be done something like
> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying the USB
> controller device name, index, and the PHY device name.
> I have done this binding for OMAP platforms, but it should be done for
> all the platforms.
>
> After this design, the phy can be got by passing the USB controller device
> pointer and the index.
>
> Developed this patch series on
> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
> after applying "usb: musb: add driver for control module" patch series
> and "ARM: dts: omap: add dt data for MUSB"
>
> Did basic enumeration testing in omap4 panda and omap3 beagle.
With this patchset USB completely breaks on am33xx beaglebone, is that intended?
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 15:41 ` Koen Kooi
0 siblings, 0 replies; 82+ messages in thread
From: Koen Kooi @ 2013-01-22 15:41 UTC (permalink / raw)
To: linux-arm-kernel
Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com> het volgende geschreven:
> This patch series adds support for adding multiple PHY's (of same type).
> The binding information has to be present in the PHY library (otg.c) in
> order for it to return the appropriate PHY whenever the USB controller
> request for the PHY. So added a new API usb_bind_phy() to pass the binding
> information. This API should be called by platform specific initialization
> code.
>
> So the binding should be done something like
> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying the USB
> controller device name, index, and the PHY device name.
> I have done this binding for OMAP platforms, but it should be done for
> all the platforms.
>
> After this design, the phy can be got by passing the USB controller device
> pointer and the index.
>
> Developed this patch series on
> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
> after applying "usb: musb: add driver for control module" patch series
> and "ARM: dts: omap: add dt data for MUSB"
>
> Did basic enumeration testing in omap4 panda and omap3 beagle.
With this patchset USB completely breaks on am33xx beaglebone, is that intended?
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-22 15:41 ` Koen Kooi
(?)
@ 2013-01-22 15:45 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:45 UTC (permalink / raw)
To: Koen Kooi
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap@vger.kernel.org List, linux-kernel,
devicetree-discuss, Jason Kridner
On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>
> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com> het volgende geschreven:
>
>> This patch series adds support for adding multiple PHY's (of same type).
>> The binding information has to be present in the PHY library (otg.c) in
>> order for it to return the appropriate PHY whenever the USB controller
>> request for the PHY. So added a new API usb_bind_phy() to pass the binding
>> information. This API should be called by platform specific initialization
>> code.
>>
>> So the binding should be done something like
>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying the USB
>> controller device name, index, and the PHY device name.
>> I have done this binding for OMAP platforms, but it should be done for
>> all the platforms.
>>
>> After this design, the phy can be got by passing the USB controller device
>> pointer and the index.
>>
>> Developed this patch series on
>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>> after applying "usb: musb: add driver for control module" patch series
>> and "ARM: dts: omap: add dt data for MUSB"
>>
>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>
> With this patchset USB completely breaks on am33xx beaglebone, is that intended?
Not really.
Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 15:45 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:45 UTC (permalink / raw)
To: Koen Kooi
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap@vger.kernel.org List, linux-kernel,
devicetree-discuss, Jason Kridner
On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>
> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com> het volgende geschreven:
>
>> This patch series adds support for adding multiple PHY's (of same type).
>> The binding information has to be present in the PHY library (otg.c) in
>> order for it to return the appropriate PHY whenever the USB controller
>> request for the PHY. So added a new API usb_bind_phy() to pass the binding
>> information. This API should be called by platform specific initialization
>> code.
>>
>> So the binding should be done something like
>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying the USB
>> controller device name, index, and the PHY device name.
>> I have done this binding for OMAP platforms, but it should be done for
>> all the platforms.
>>
>> After this design, the phy can be got by passing the USB controller device
>> pointer and the index.
>>
>> Developed this patch series on
>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>> after applying "usb: musb: add driver for control module" patch series
>> and "ARM: dts: omap: add dt data for MUSB"
>>
>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>
> With this patchset USB completely breaks on am33xx beaglebone, is that intended?
Not really.
Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 15:45 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 15:45 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>
> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com> het volgende geschreven:
>
>> This patch series adds support for adding multiple PHY's (of same type).
>> The binding information has to be present in the PHY library (otg.c) in
>> order for it to return the appropriate PHY whenever the USB controller
>> request for the PHY. So added a new API usb_bind_phy() to pass the binding
>> information. This API should be called by platform specific initialization
>> code.
>>
>> So the binding should be done something like
>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying the USB
>> controller device name, index, and the PHY device name.
>> I have done this binding for OMAP platforms, but it should be done for
>> all the platforms.
>>
>> After this design, the phy can be got by passing the USB controller device
>> pointer and the index.
>>
>> Developed this patch series on
>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>> after applying "usb: musb: add driver for control module" patch series
>> and "ARM: dts: omap: add dt data for MUSB"
>>
>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>
> With this patchset USB completely breaks on am33xx beaglebone, is that intended?
Not really.
Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <50FEB3FD.3050001-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-22 15:45 ` kishon
(?)
@ 2013-01-22 16:16 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 16:16 UTC (permalink / raw)
To: Koen Kooi
Cc: tony-4v6yS6AI5VpBDgjK7y7TUQ, balbi-l0cyMroinI0,
linux-lFZ/pmaqli7XmaaqVzeoHQ, eballetbo-Re5JQEeQqe8AvxtiuMwx3w,
javier-0uQlZySMnqxg9hUCZPvPmw,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, Jason Kridner
Hi,
On Tuesday 22 January 2013 09:15 PM, kishon wrote:
> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>
>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>> het volgende geschreven:
>>
>>> This patch series adds support for adding multiple PHY's (of same type).
>>> The binding information has to be present in the PHY library (otg.c) in
>>> order for it to return the appropriate PHY whenever the USB controller
>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>> binding
>>> information. This API should be called by platform specific
>>> initialization
>>> code.
>>>
>>> So the binding should be done something like
>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>> the USB
>>> controller device name, index, and the PHY device name.
>>> I have done this binding for OMAP platforms, but it should be done for
>>> all the platforms.
>>>
>>> After this design, the phy can be got by passing the USB controller
>>> device
>>> pointer and the index.
>>>
>>> Developed this patch series on
>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>> after applying "usb: musb: add driver for control module" patch series
>>> and "ARM: dts: omap: add dt data for MUSB"
>>>
>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>
>> With this patchset USB completely breaks on am33xx beaglebone, is that
>> intended?
> Not really.
> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use
omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
Then we need to adapt am33xx to use devm_usb_get_phy_by_phandle.
I'll see how to do it.
Thank you for testing and reporting it :-)
Thanks
Kishon
--
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
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 16:16 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 16:16 UTC (permalink / raw)
To: Koen Kooi
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap@vger.kernel.org List, linux-kernel,
devicetree-discuss, Jason Kridner
Hi,
On Tuesday 22 January 2013 09:15 PM, kishon wrote:
> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>
>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com>
>> het volgende geschreven:
>>
>>> This patch series adds support for adding multiple PHY's (of same type).
>>> The binding information has to be present in the PHY library (otg.c) in
>>> order for it to return the appropriate PHY whenever the USB controller
>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>> binding
>>> information. This API should be called by platform specific
>>> initialization
>>> code.
>>>
>>> So the binding should be done something like
>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>> the USB
>>> controller device name, index, and the PHY device name.
>>> I have done this binding for OMAP platforms, but it should be done for
>>> all the platforms.
>>>
>>> After this design, the phy can be got by passing the USB controller
>>> device
>>> pointer and the index.
>>>
>>> Developed this patch series on
>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>> after applying "usb: musb: add driver for control module" patch series
>>> and "ARM: dts: omap: add dt data for MUSB"
>>>
>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>
>> With this patchset USB completely breaks on am33xx beaglebone, is that
>> intended?
> Not really.
> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use
omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
Then we need to adapt am33xx to use devm_usb_get_phy_by_phandle.
I'll see how to do it.
Thank you for testing and reporting it :-)
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 16:16 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-22 16:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Tuesday 22 January 2013 09:15 PM, kishon wrote:
> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>
>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com>
>> het volgende geschreven:
>>
>>> This patch series adds support for adding multiple PHY's (of same type).
>>> The binding information has to be present in the PHY library (otg.c) in
>>> order for it to return the appropriate PHY whenever the USB controller
>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>> binding
>>> information. This API should be called by platform specific
>>> initialization
>>> code.
>>>
>>> So the binding should be done something like
>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>> the USB
>>> controller device name, index, and the PHY device name.
>>> I have done this binding for OMAP platforms, but it should be done for
>>> all the platforms.
>>>
>>> After this design, the phy can be got by passing the USB controller
>>> device
>>> pointer and the index.
>>>
>>> Developed this patch series on
>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>> after applying "usb: musb: add driver for control module" patch series
>>> and "ARM: dts: omap: add dt data for MUSB"
>>>
>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>
>> With this patchset USB completely breaks on am33xx beaglebone, is that
>> intended?
> Not really.
> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use
omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
Then we need to adapt am33xx to use devm_usb_get_phy_by_phandle.
I'll see how to do it.
Thank you for testing and reporting it :-)
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <50FEBB61.9000707-l0cyMroinI0@public.gmane.org>]
* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-22 16:16 ` kishon
(?)
@ 2013-01-22 17:02 ` Koen Kooi
-1 siblings, 0 replies; 82+ messages in thread
From: Koen Kooi @ 2013-01-22 17:02 UTC (permalink / raw)
To: kishon
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
eballetbo-Re5JQEeQqe8AvxtiuMwx3w, javier-0uQlZySMnqxg9hUCZPvPmw,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Op 22 jan. 2013, om 17:16 heeft kishon <kishon-l0cyMroinI0@public.gmane.org> het volgende geschreven:
> Hi,
>
> On Tuesday 22 January 2013 09:15 PM, kishon wrote:
>> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>>
>>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>>> het volgende geschreven:
>>>
>>>> This patch series adds support for adding multiple PHY's (of same type).
>>>> The binding information has to be present in the PHY library (otg.c) in
>>>> order for it to return the appropriate PHY whenever the USB controller
>>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>>> binding
>>>> information. This API should be called by platform specific
>>>> initialization
>>>> code.
>>>>
>>>> So the binding should be done something like
>>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>>> the USB
>>>> controller device name, index, and the PHY device name.
>>>> I have done this binding for OMAP platforms, but it should be done for
>>>> all the platforms.
>>>>
>>>> After this design, the phy can be got by passing the USB controller
>>>> device
>>>> pointer and the index.
>>>>
>>>> Developed this patch series on
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>>> after applying "usb: musb: add driver for control module" patch series
>>>> and "ARM: dts: omap: add dt data for MUSB"
>>>>
>>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>>
>>> With this patchset USB completely breaks on am33xx beaglebone, is that
>>> intended?
>> Not really.
>> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
>
> I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
regards,
Koen
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 17:02 ` Koen Kooi
0 siblings, 0 replies; 82+ messages in thread
From: Koen Kooi @ 2013-01-22 17:02 UTC (permalink / raw)
To: kishon
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap@vger.kernel.org List, linux-kernel,
devicetree-discuss, Jason Kridner
Op 22 jan. 2013, om 17:16 heeft kishon <kishon@ti.com> het volgende geschreven:
> Hi,
>
> On Tuesday 22 January 2013 09:15 PM, kishon wrote:
>> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>>
>>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com>
>>> het volgende geschreven:
>>>
>>>> This patch series adds support for adding multiple PHY's (of same type).
>>>> The binding information has to be present in the PHY library (otg.c) in
>>>> order for it to return the appropriate PHY whenever the USB controller
>>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>>> binding
>>>> information. This API should be called by platform specific
>>>> initialization
>>>> code.
>>>>
>>>> So the binding should be done something like
>>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>>> the USB
>>>> controller device name, index, and the PHY device name.
>>>> I have done this binding for OMAP platforms, but it should be done for
>>>> all the platforms.
>>>>
>>>> After this design, the phy can be got by passing the USB controller
>>>> device
>>>> pointer and the index.
>>>>
>>>> Developed this patch series on
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>>> after applying "usb: musb: add driver for control module" patch series
>>>> and "ARM: dts: omap: add dt data for MUSB"
>>>>
>>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>>
>>> With this patchset USB completely breaks on am33xx beaglebone, is that
>>> intended?
>> Not really.
>> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
>
> I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
regards,
Koen
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-22 17:02 ` Koen Kooi
0 siblings, 0 replies; 82+ messages in thread
From: Koen Kooi @ 2013-01-22 17:02 UTC (permalink / raw)
To: linux-arm-kernel
Op 22 jan. 2013, om 17:16 heeft kishon <kishon@ti.com> het volgende geschreven:
> Hi,
>
> On Tuesday 22 January 2013 09:15 PM, kishon wrote:
>> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>>
>>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com>
>>> het volgende geschreven:
>>>
>>>> This patch series adds support for adding multiple PHY's (of same type).
>>>> The binding information has to be present in the PHY library (otg.c) in
>>>> order for it to return the appropriate PHY whenever the USB controller
>>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>>> binding
>>>> information. This API should be called by platform specific
>>>> initialization
>>>> code.
>>>>
>>>> So the binding should be done something like
>>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>>> the USB
>>>> controller device name, index, and the PHY device name.
>>>> I have done this binding for OMAP platforms, but it should be done for
>>>> all the platforms.
>>>>
>>>> After this design, the phy can be got by passing the USB controller
>>>> device
>>>> pointer and the index.
>>>>
>>>> Developed this patch series on
>>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>>> after applying "usb: musb: add driver for control module" patch series
>>>> and "ARM: dts: omap: add dt data for MUSB"
>>>>
>>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>>
>>> With this patchset USB completely breaks on am33xx beaglebone, is that
>>> intended?
>> Not really.
>> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
>
> I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
regards,
Koen
^ permalink raw reply [flat|nested] 82+ messages in thread[parent not found: <B9531499-0746-44DA-BDBB-999D4CA31E63-QLwJDigV5abLmq1fohREcCpxlwaOVQ5f@public.gmane.org>]
* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-22 17:02 ` Koen Kooi
(?)
@ 2013-01-23 5:19 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-23 5:19 UTC (permalink / raw)
To: Koen Kooi
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
linux-usb-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, balbi-l0cyMroinI0,
eballetbo-Re5JQEeQqe8AvxtiuMwx3w, javier-0uQlZySMnqxg9hUCZPvPmw,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Tuesday 22 January 2013 10:32 PM, Koen Kooi wrote:
>
> Op 22 jan. 2013, om 17:16 heeft kishon <kishon-l0cyMroinI0@public.gmane.org> het volgende geschreven:
>
>> Hi,
>>
>> On Tuesday 22 January 2013 09:15 PM, kishon wrote:
>>> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>>>
>>>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon-l0cyMroinI0@public.gmane.org>
>>>> het volgende geschreven:
>>>>
>>>>> This patch series adds support for adding multiple PHY's (of same type).
>>>>> The binding information has to be present in the PHY library (otg.c) in
>>>>> order for it to return the appropriate PHY whenever the USB controller
>>>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>>>> binding
>>>>> information. This API should be called by platform specific
>>>>> initialization
>>>>> code.
>>>>>
>>>>> So the binding should be done something like
>>>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>>>> the USB
>>>>> controller device name, index, and the PHY device name.
>>>>> I have done this binding for OMAP platforms, but it should be done for
>>>>> all the platforms.
>>>>>
>>>>> After this design, the phy can be got by passing the USB controller
>>>>> device
>>>>> pointer and the index.
>>>>>
>>>>> Developed this patch series on
>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>>>> after applying "usb: musb: add driver for control module" patch series
>>>>> and "ARM: dts: omap: add dt data for MUSB"
>>>>>
>>>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>>>
>>>> With this patchset USB completely breaks on am33xx beaglebone, is that
>>>> intended?
>>> Not really.
>>> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
>>
>> I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
>
> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
Cool. You can add your patch after applying this series then. (I'll post
a new version addressing the comments in this series.)
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-23 5:19 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-23 5:19 UTC (permalink / raw)
To: Koen Kooi
Cc: tony, balbi, linux, eballetbo, javier, gregkh, linux-usb,
linux-arm-kernel, linux-omap@vger.kernel.org List, linux-kernel,
devicetree-discuss, Jason Kridner
On Tuesday 22 January 2013 10:32 PM, Koen Kooi wrote:
>
> Op 22 jan. 2013, om 17:16 heeft kishon <kishon@ti.com> het volgende geschreven:
>
>> Hi,
>>
>> On Tuesday 22 January 2013 09:15 PM, kishon wrote:
>>> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>>>
>>>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com>
>>>> het volgende geschreven:
>>>>
>>>>> This patch series adds support for adding multiple PHY's (of same type).
>>>>> The binding information has to be present in the PHY library (otg.c) in
>>>>> order for it to return the appropriate PHY whenever the USB controller
>>>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>>>> binding
>>>>> information. This API should be called by platform specific
>>>>> initialization
>>>>> code.
>>>>>
>>>>> So the binding should be done something like
>>>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>>>> the USB
>>>>> controller device name, index, and the PHY device name.
>>>>> I have done this binding for OMAP platforms, but it should be done for
>>>>> all the platforms.
>>>>>
>>>>> After this design, the phy can be got by passing the USB controller
>>>>> device
>>>>> pointer and the index.
>>>>>
>>>>> Developed this patch series on
>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>>>> after applying "usb: musb: add driver for control module" patch series
>>>>> and "ARM: dts: omap: add dt data for MUSB"
>>>>>
>>>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>>>
>>>> With this patchset USB completely breaks on am33xx beaglebone, is that
>>>> intended?
>>> Not really.
>>> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
>>
>> I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
>
> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
Cool. You can add your patch after applying this series then. (I'll post
a new version addressing the comments in this series.)
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-23 5:19 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-23 5:19 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 22 January 2013 10:32 PM, Koen Kooi wrote:
>
> Op 22 jan. 2013, om 17:16 heeft kishon <kishon@ti.com> het volgende geschreven:
>
>> Hi,
>>
>> On Tuesday 22 January 2013 09:15 PM, kishon wrote:
>>> On Tuesday 22 January 2013 09:11 PM, Koen Kooi wrote:
>>>>
>>>> Op 22 jan. 2013, om 10:58 heeft Kishon Vijay Abraham I <kishon@ti.com>
>>>> het volgende geschreven:
>>>>
>>>>> This patch series adds support for adding multiple PHY's (of same type).
>>>>> The binding information has to be present in the PHY library (otg.c) in
>>>>> order for it to return the appropriate PHY whenever the USB controller
>>>>> request for the PHY. So added a new API usb_bind_phy() to pass the
>>>>> binding
>>>>> information. This API should be called by platform specific
>>>>> initialization
>>>>> code.
>>>>>
>>>>> So the binding should be done something like
>>>>> usb_bind_phy("musb-hdrc.0.auto", 0, "omap-usb2.1.auto"); specifying
>>>>> the USB
>>>>> controller device name, index, and the PHY device name.
>>>>> I have done this binding for OMAP platforms, but it should be done for
>>>>> all the platforms.
>>>>>
>>>>> After this design, the phy can be got by passing the USB controller
>>>>> device
>>>>> pointer and the index.
>>>>>
>>>>> Developed this patch series on
>>>>> git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git xceiv
>>>>> after applying "usb: musb: add driver for control module" patch series
>>>>> and "ARM: dts: omap: add dt data for MUSB"
>>>>>
>>>>> Did basic enumeration testing in omap4 panda and omap3 beagle.
>>>>
>>>> With this patchset USB completely breaks on am33xx beaglebone, is that
>>>> intended?
>>> Not really.
>>> Does am33xx makes use of omap2430.c? Which PHY does am33xx uses?
>>
>> I figured out it uses drivers/usb/musb/musb_dsps.c (So it doesn't use omap2430.c). I think it uses TWL4030_USB (TPS659x0) as PHY.
>
> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
Cool. You can add your patch after applying this series then. (I'll post
a new version addressing the comments in this series.)
Thanks
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* RE: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-22 17:02 ` Koen Kooi
(?)
@ 2013-01-23 13:58 ` Mohammed, Afzal
-1 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-23 13:58 UTC (permalink / raw)
To: Koen Kooi, ABRAHAM, KISHON VIJAY
Cc: linux@arm.linux.org.uk, tony@atomide.com,
gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Balbi, Felipe, eballetbo@gmail.com, Jason Kridner,
javier@dowhile0.org, linux-omap@vger.kernel.org List,
linux-arm-kernel@lists.infradead.org
Hi Koen,
On Tue, Jan 22, 2013 at 22:32:56, Koen Kooi wrote:
> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
USB first instance of am335x works in mainline as of now.
Regards
Afzal
^ permalink raw reply [flat|nested] 82+ messages in thread
* RE: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-23 13:58 ` Mohammed, Afzal
0 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-23 13:58 UTC (permalink / raw)
To: Koen Kooi, ABRAHAM, KISHON VIJAY
Cc: linux@arm.linux.org.uk, tony@atomide.com,
gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Balbi, Felipe, eballetbo@gmail.com, Jason Kridner,
javier@dowhile0.org, linux-omap@vger.kernel.org List,
linux-arm-kernel@lists.infradead.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 487 bytes --]
Hi Koen,
On Tue, Jan 22, 2013 at 22:32:56, Koen Kooi wrote:
> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
USB first instance of am335x works in mainline as of now.
Regards
Afzal
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-23 13:58 ` Mohammed, Afzal
0 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-23 13:58 UTC (permalink / raw)
To: linux-arm-kernel
Hi Koen,
On Tue, Jan 22, 2013 at 22:32:56, Koen Kooi wrote:
> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
USB first instance of am335x works in mainline as of now.
Regards
Afzal
^ permalink raw reply [flat|nested] 82+ messages in thread
[parent not found: <C8443D0743D26F4388EA172BF4E2A7A93EA922F5-Er742YJ7I/eIQmiDNMet8wC/G2K4zDHf@public.gmane.org>]
* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-23 13:58 ` Mohammed, Afzal
(?)
@ 2013-01-23 14:26 ` kishon
-1 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-23 14:26 UTC (permalink / raw)
To: Mohammed, Afzal
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
Koen Kooi, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Balbi, Felipe, eballetbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Hi Afzal,
On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> Hi Koen,
>
> On Tue, Jan 22, 2013 at 22:32:56, Koen Kooi wrote:
>
>> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
>
> USB first instance of am335x works in mainline as of now.
Can you check if this series indeed breaks am335x?
Thanks for your help.
Regards
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* Re: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-23 14:26 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-23 14:26 UTC (permalink / raw)
To: Mohammed, Afzal
Cc: Koen Kooi, linux@arm.linux.org.uk, tony@atomide.com,
gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Balbi, Felipe, eballetbo@gmail.com, Jason Kridner,
javier@dowhile0.org, linux-omap@vger.kernel.org List,
linux-arm-kernel@lists.infradead.org
Hi Afzal,
On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> Hi Koen,
>
> On Tue, Jan 22, 2013 at 22:32:56, Koen Kooi wrote:
>
>> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
>
> USB first instance of am335x works in mainline as of now.
Can you check if this series indeed breaks am335x?
Thanks for your help.
Regards
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-23 14:26 ` kishon
0 siblings, 0 replies; 82+ messages in thread
From: kishon @ 2013-01-23 14:26 UTC (permalink / raw)
To: linux-arm-kernel
Hi Afzal,
On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> Hi Koen,
>
> On Tue, Jan 22, 2013 at 22:32:56, Koen Kooi wrote:
>
>> Actually it uses nop-phy as a phy, which is missing from arch/arm/boot/dts/am33xx.dtsi, so mainline is already broken. But adding the nop-phy to the DT is easy enough to patch in locally.
>
> USB first instance of am335x works in mainline as of now.
Can you check if this series indeed breaks am335x?
Thanks for your help.
Regards
Kishon
^ permalink raw reply [flat|nested] 82+ messages in thread
[parent not found: <50FFF31D.2070908-l0cyMroinI0@public.gmane.org>]
* RE: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-23 14:26 ` kishon
(?)
@ 2013-01-24 11:51 ` Mohammed, Afzal
-1 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-24 11:51 UTC (permalink / raw)
To: ABRAHAM, KISHON VIJAY
Cc: linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
Koen Kooi, linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Balbi, Felipe, eballetbo-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org,
javier-0uQlZySMnqxg9hUCZPvPmw@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Hi Kishon,
On Wed, Jan 23, 2013 at 19:56:37, ABRAHAM, KISHON VIJAY wrote:
> On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> > USB first instance of am335x works in mainline as of now.
> Can you check if this series indeed breaks am335x?
>
> Thanks for your help.
Do you have a tree having these changes, it would be easier for me.
Regards
Afzal
^ permalink raw reply [flat|nested] 82+ messages in thread
* RE: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-24 11:51 ` Mohammed, Afzal
0 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-24 11:51 UTC (permalink / raw)
To: ABRAHAM, KISHON VIJAY
Cc: Koen Kooi, linux@arm.linux.org.uk, tony@atomide.com,
gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Balbi, Felipe, eballetbo@gmail.com, Jason Kridner,
javier@dowhile0.org, linux-omap@vger.kernel.org List,
linux-arm-kernel@lists.infradead.org
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 529 bytes --]
Hi Kishon,
On Wed, Jan 23, 2013 at 19:56:37, ABRAHAM, KISHON VIJAY wrote:
> On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> > USB first instance of am335x works in mainline as of now.
> Can you check if this series indeed breaks am335x?
>
> Thanks for your help.
Do you have a tree having these changes, it would be easier for me.
Regards
Afzal
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 82+ messages in thread* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-24 11:51 ` Mohammed, Afzal
0 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-24 11:51 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kishon,
On Wed, Jan 23, 2013 at 19:56:37, ABRAHAM, KISHON VIJAY wrote:
> On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> > USB first instance of am335x works in mainline as of now.
> Can you check if this series indeed breaks am335x?
>
> Thanks for your help.
Do you have a tree having these changes, it would be easier for me.
Regards
Afzal
^ permalink raw reply [flat|nested] 82+ messages in thread
* RE: [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
2013-01-24 11:51 ` Mohammed, Afzal
@ 2013-01-25 14:46 ` Mohammed, Afzal
-1 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-25 14:46 UTC (permalink / raw)
To: ABRAHAM, KISHON VIJAY
Cc: Koen Kooi, linux@arm.linux.org.uk, tony@atomide.com,
gregkh@linuxfoundation.org, devicetree-discuss@lists.ozlabs.org,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
Balbi, Felipe, eballetbo@gmail.com, Jason Kridner,
javier@dowhile0.org, linux-omap@vger.kernel.org List,
linux-arm-kernel@lists.infradead.org
Hi Kishon,
On Thu, Jan 24, 2013 at 17:21:45, Mohammed, Afzal wrote:
> On Wed, Jan 23, 2013 at 19:56:37, ABRAHAM, KISHON VIJAY wrote:
> > On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> > > USB first instance of am335x works in mainline as of now.
>
> > Can you check if this series indeed breaks am335x?
> >
> > Thanks for your help.
>
> Do you have a tree having these changes, it would be easier for me.
I tried with your "omap5-with-palmas" branch that was mentioned in
the cover letter of your latest series (but couldn't find the commit
that you mentioned in the cover letter, HEAD of that branch that I
tested was "2c29519 ARM: dts: palmas: update dt data for palmas-usb")
usb first instance of am335x works as earlier.
Regards
Afzal
^ permalink raw reply [flat|nested] 82+ messages in thread
* [PATCH v1 0/6] USB: Add support for multiple PHYs of same type
@ 2013-01-25 14:46 ` Mohammed, Afzal
0 siblings, 0 replies; 82+ messages in thread
From: Mohammed, Afzal @ 2013-01-25 14:46 UTC (permalink / raw)
To: linux-arm-kernel
Hi Kishon,
On Thu, Jan 24, 2013 at 17:21:45, Mohammed, Afzal wrote:
> On Wed, Jan 23, 2013 at 19:56:37, ABRAHAM, KISHON VIJAY wrote:
> > On Wednesday 23 January 2013 07:28 PM, Mohammed, Afzal wrote:
> > > USB first instance of am335x works in mainline as of now.
>
> > Can you check if this series indeed breaks am335x?
> >
> > Thanks for your help.
>
> Do you have a tree having these changes, it would be easier for me.
I tried with your "omap5-with-palmas" branch that was mentioned in
the cover letter of your latest series (but couldn't find the commit
that you mentioned in the cover letter, HEAD of that branch that I
tested was "2c29519 ARM: dts: palmas: update dt data for palmas-usb")
usb first instance of am335x works as earlier.
Regards
Afzal
^ permalink raw reply [flat|nested] 82+ messages in thread