linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines
@ 2016-06-06 15:56 Lee Jones
  2016-06-06 15:56 ` [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers Lee Jones
                   ` (7 more replies)
  0 siblings, 8 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

Phasing out generic reset line requests enables us to make some better
decisions on when and how to (de)assert said lines.  If an 'exclusive'
line is requested, we know a device *requires* a reset and that it's
preferable to act upon a request right away.  However, if a 'shared'
reset line is requested, we can reasonably assume sure that placing a
device into reset isn't a hard requirement, but probably a measure to
save power and is thus able to cope with not being asserted if another
device is still in use.

In order allow gentle adoption and not to forcing all consumers to
move to the API immediately, causing administration headache between
subsystems, this patch adds some temporary stand-in shim-calls.  This
will ease the burden at merge time and allow subsystems to migrate over
to the new API in a more realistic time-frame.

Lee Jones (7):
  reset: Reorder inline reset_control_get*() wrappers
  reset: Ensure drivers are explicit when requesting reset lines
  reset: Supply *_shared variant calls when using of_* API
  reset: Supply *_shared variant calls when using *_optional APIs
  reset: TRIVIAL: Add line break at same place for similar APIs
  phy: miphy28lp: Inform the reset framework that our reset line may be
    shared
  usb: dwc3: st: Inform the reset framework that our reset line may be
    shared

 drivers/phy/phy-miphy28lp.c |   3 +-
 drivers/usb/dwc3/dwc3-st.c  |   6 +-
 include/linux/reset.h       | 211 +++++++++++++++++++++++++++++++++++---------
 3 files changed, 173 insertions(+), 47 deletions(-)

-- 
2.8.3

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

* [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-20 12:07   ` Philipp Zabel
  2016-06-06 15:56 ` [PATCH 2/7] reset: Ensure drivers are explicit when requesting reset lines Lee Jones
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

We're about to split the current API into two, where consumers will
be forced to be explicit when requesting reset lines.  The choice
will be to either the call the *_exclusive or *_shared variant
depending on whether they can actually tolorate not being asserted
when that request is made.

The new API will look like this once reorded and complete:

  reset_control_get_exclusive()
  reset_control_get_shared()
  reset_control_get_optional_exclusive()
  reset_control_get_optional_shared()
  of_reset_control_get_exclusive()
  of_reset_control_get_shared()
  of_reset_control_get_exclusive_by_index()
  of_reset_control_get_shared_by_index()
  devm_reset_control_get_exclusive()
  devm_reset_control_get_shared()
  devm_reset_control_get_optional_exclusive()
  devm_reset_control_get_optional_shared()
  devm_reset_control_get_exclusive_by_index()
  devm_reset_control_get_shared_by_index()

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/reset.h | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index ec0306ce..33eaf11 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -107,12 +107,6 @@ static inline struct reset_control *__must_check reset_control_get(
 	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
 }
 
-static inline struct reset_control *reset_control_get_optional(
-					struct device *dev, const char *id)
-{
-	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
-}
-
 /**
  * reset_control_get_shared - Lookup and obtain a shared reference to a
  *                            reset controller.
@@ -141,6 +135,12 @@ static inline struct reset_control *reset_control_get_shared(
 	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
 }
 
+static inline struct reset_control *reset_control_get_optional(
+					struct device *dev, const char *id)
+{
+	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
+}
+
 /**
  * of_reset_control_get - Lookup and obtain an exclusive reference to a
  *                        reset controller.
@@ -191,6 +191,21 @@ static inline struct reset_control *__must_check devm_reset_control_get(
 	return __devm_reset_control_get(dev, id, 0, 0);
 }
 
+/**
+ * devm_reset_control_get_shared - resource managed reset_control_get_shared()
+ * @dev: device to be reset by the controller
+ * @id: reset line name
+ *
+ * Managed reset_control_get_shared(). For reset controllers returned from
+ * this function, reset_control_put() is called automatically on driver detach.
+ * See reset_control_get_shared() for more information.
+ */
+static inline struct reset_control *devm_reset_control_get_shared(
+					struct device *dev, const char *id)
+{
+	return __devm_reset_control_get(dev, id, 0, 1);
+}
+
 static inline struct reset_control *devm_reset_control_get_optional(
 					struct device *dev, const char *id)
 {
@@ -213,21 +228,6 @@ static inline struct reset_control *devm_reset_control_get_by_index(
 }
 
 /**
- * devm_reset_control_get_shared - resource managed reset_control_get_shared()
- * @dev: device to be reset by the controller
- * @id: reset line name
- *
- * Managed reset_control_get_shared(). For reset controllers returned from
- * this function, reset_control_put() is called automatically on driver detach.
- * See reset_control_get_shared() for more information.
- */
-static inline struct reset_control *devm_reset_control_get_shared(
-					struct device *dev, const char *id)
-{
-	return __devm_reset_control_get(dev, id, 0, 1);
-}
-
-/**
  * devm_reset_control_get_shared_by_index - resource managed
  * reset_control_get_shared
  * @dev: device to be reset by the controller
-- 
2.8.3

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

* [PATCH 2/7] reset: Ensure drivers are explicit when requesting reset lines
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
  2016-06-06 15:56 ` [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-06 15:56 ` [PATCH 3/7] reset: Supply *_shared variant calls when using of_* API Lee Jones
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

Phasing out generic reset line requests enables us to make some better
decisions on when and how to (de)assert said lines.  If an 'exclusive'
line is requested, we know a device *requires* a reset and that it's
preferable to act upon a request right away.  However, if a 'shared'
reset line is requested, we can reasonably assume sure that placing a
device into reset isn't a hard requirement, but probably a measure to
save power and is thus able to cope with not being asserted if another
device is still in use.

In order allow gentle adoption and not to forcing all consumers to
move to the API immediately, causing administration headache between
subsystems, this patch adds some temporary stand-in shim-calls.  This
will ease the burden at merge time and allow subsystems to migrate over
to the new API in a more realistic time-frame.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/reset.h | 106 ++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 82 insertions(+), 24 deletions(-)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index 33eaf11..9cf4cf3 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -84,8 +84,8 @@ static inline struct reset_control *__devm_reset_control_get(
 #endif /* CONFIG_RESET_CONTROLLER */
 
 /**
- * reset_control_get - Lookup and obtain an exclusive reference to a
- *                     reset controller.
+ * reset_control_get_exclusive - Lookup and obtain an exclusive reference
+ *                               to a reset controller.
  * @dev: device to be reset by the controller
  * @id: reset line name
  *
@@ -98,8 +98,8 @@ static inline struct reset_control *__devm_reset_control_get(
  *
  * Use of id names is optional.
  */
-static inline struct reset_control *__must_check reset_control_get(
-					struct device *dev, const char *id)
+static inline struct reset_control *
+__must_check reset_control_get_exclusive(struct device *dev, const char *id)
 {
 #ifndef CONFIG_RESET_CONTROLLER
 	WARN_ON(1);
@@ -135,15 +135,15 @@ static inline struct reset_control *reset_control_get_shared(
 	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
 }
 
-static inline struct reset_control *reset_control_get_optional(
+static inline struct reset_control *reset_control_get_optional_exclusive(
 					struct device *dev, const char *id)
 {
 	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
 }
 
 /**
- * of_reset_control_get - Lookup and obtain an exclusive reference to a
- *                        reset controller.
+ * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
+ *                                  to a reset controller.
  * @node: device to be reset by the controller
  * @id: reset line name
  *
@@ -151,15 +151,16 @@ static inline struct reset_control *reset_control_get_optional(
  *
  * Use of id names is optional.
  */
-static inline struct reset_control *of_reset_control_get(
+static inline struct reset_control *of_reset_control_get_exclusive(
 				struct device_node *node, const char *id)
 {
 	return __of_reset_control_get(node, id, 0, 0);
 }
 
 /**
- * of_reset_control_get_by_index - Lookup and obtain an exclusive reference to
- *                                 a reset controller by index.
+ * of_reset_control_get_exclusive_by_index - Lookup and obtain an exclusive
+ *                                           reference to a reset controller
+ *                                           by index.
  * @node: device to be reset by the controller
  * @index: index of the reset controller
  *
@@ -167,23 +168,27 @@ static inline struct reset_control *of_reset_control_get(
  * in whatever order. Returns a struct reset_control or IS_ERR() condition
  * containing errno.
  */
-static inline struct reset_control *of_reset_control_get_by_index(
+static inline struct reset_control *of_reset_control_get_exclusive_by_index(
 					struct device_node *node, int index)
 {
 	return __of_reset_control_get(node, NULL, index, 0);
 }
 
 /**
- * devm_reset_control_get - resource managed reset_control_get()
+ * devm_reset_control_get_exclusive - resource managed
+ *                                    reset_control_get_exclusive()
  * @dev: device to be reset by the controller
  * @id: reset line name
  *
- * Managed reset_control_get(). For reset controllers returned from this
- * function, reset_control_put() is called automatically on driver detach.
- * See reset_control_get() for more information.
+ * Managed reset_control_get_exclusive(). For reset controllers returned
+ * from this function, reset_control_put() is called automatically on driver
+ * detach.
+ *
+ * See reset_control_get_exclusive() for more information.
  */
-static inline struct reset_control *__must_check devm_reset_control_get(
-					struct device *dev, const char *id)
+static inline struct reset_control *
+__must_check devm_reset_control_get_exclusive(struct device *dev,
+					      const char *id)
 {
 #ifndef CONFIG_RESET_CONTROLLER
 	WARN_ON(1);
@@ -206,23 +211,26 @@ static inline struct reset_control *devm_reset_control_get_shared(
 	return __devm_reset_control_get(dev, id, 0, 1);
 }
 
-static inline struct reset_control *devm_reset_control_get_optional(
+static inline struct reset_control *devm_reset_control_get_optional_exclusive(
 					struct device *dev, const char *id)
 {
 	return __devm_reset_control_get(dev, id, 0, 0);
 }
 
 /**
- * devm_reset_control_get_by_index - resource managed reset_control_get
+ * devm_reset_control_get_exclusive_by_index - resource managed
+ *                                             reset_control_get_exclusive()
  * @dev: device to be reset by the controller
  * @index: index of the reset controller
  *
- * Managed reset_control_get(). For reset controllers returned from this
- * function, reset_control_put() is called automatically on driver detach.
- * See reset_control_get() for more information.
+ * Managed reset_control_get_exclusive(). For reset controllers returned from
+ * this function, reset_control_put() is called automatically on driver
+ * detach.
+ *
+ * See reset_control_get_exclusive() for more information.
  */
-static inline struct reset_control *devm_reset_control_get_by_index(
-					struct device *dev, int index)
+static inline struct reset_control *
+devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
 {
 	return __devm_reset_control_get(dev, NULL, index, 0);
 }
@@ -243,4 +251,54 @@ static inline struct reset_control *devm_reset_control_get_shared_by_index(
 	return __devm_reset_control_get(dev, NULL, index, 1);
 }
 
+/*
+ * TEMPORARY calls to use during transition:
+ *
+ *   of_reset_control_get() => of_reset_control_get_exclusive()
+ *
+ * These inline function calls will be removed once all consumers
+ * have been moved over to the new explicit API.
+ */
+static inline struct reset_control *reset_control_get(
+				struct device *dev, const char *id)
+{
+	return reset_control_get_exclusive(dev, id);
+}
+
+static inline struct reset_control *reset_control_get_optional(
+					struct device *dev, const char *id)
+{
+	return reset_control_get_optional_exclusive(dev, id);
+}
+
+static inline struct reset_control *of_reset_control_get(
+				struct device_node *node, const char *id)
+{
+	return of_reset_control_get_exclusive(node, id);
+}
+
+static inline struct reset_control *of_reset_control_get_by_index(
+				struct device_node *node, int index)
+{
+	return of_reset_control_get_exclusive_by_index(node, index);
+}
+
+static inline struct reset_control *devm_reset_control_get(
+				struct device *dev, const char *id)
+{
+	return devm_reset_control_get_exclusive(dev, id);
+}
+
+static inline struct reset_control *devm_reset_control_get_optional(
+				struct device *dev, const char *id)
+{
+	return devm_reset_control_get_optional_exclusive(dev, id);
+
+}
+
+static inline struct reset_control *devm_reset_control_get_by_index(
+				struct device *dev, int index)
+{
+	return devm_reset_control_get_exclusive_by_index(dev, index);
+}
 #endif
-- 
2.8.3

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

* [PATCH 3/7] reset: Supply *_shared variant calls when using of_* API
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
  2016-06-06 15:56 ` [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers Lee Jones
  2016-06-06 15:56 ` [PATCH 2/7] reset: Ensure drivers are explicit when requesting reset lines Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-06 15:56 ` [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs Lee Jones
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

Consumers need to be able to specify whether they are requesting an
'exclusive' or 'shared' reset line no matter which API (of_*, devm_*,
etc) they are using.  This change allows users of the of_* API in
particular to specify that their request is for a 'shared' line.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/reset.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index 9cf4cf3..fd69240 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -158,6 +158,31 @@ static inline struct reset_control *of_reset_control_get_exclusive(
 }
 
 /**
+ * of_reset_control_get_shared - Lookup and obtain an shared reference
+ *                               to a reset controller.
+ * @node: device to be reset by the controller
+ * @id: reset line name
+ *
+ * When a reset-control is shared, the behavior of reset_control_assert /
+ * deassert is changed, the reset-core will keep track of a deassert_count
+ * and only (re-)assert the reset after reset_control_assert has been called
+ * as many times as reset_control_deassert was called. Also see the remark
+ * about shared reset-controls in the reset_control_assert docs.
+ *
+ * Calling reset_control_assert without first calling reset_control_deassert
+ * is not allowed on a shared reset control. Calling reset_control_reset is
+ * also not allowed on a shared reset control.
+ * Returns a struct reset_control or IS_ERR() condition containing errno.
+ *
+ * Use of id names is optional.
+ */
+static inline struct reset_control *of_reset_control_get_shared(
+				struct device_node *node, const char *id)
+{
+	return __of_reset_control_get(node, id, 0, 1);
+}
+
+/**
  * of_reset_control_get_exclusive_by_index - Lookup and obtain an exclusive
  *                                           reference to a reset controller
  *                                           by index.
@@ -175,6 +200,34 @@ static inline struct reset_control *of_reset_control_get_exclusive_by_index(
 }
 
 /**
+ * of_reset_control_get_shared_by_index - Lookup and obtain an shared
+ *                                        reference to a reset controller
+ *                                        by index.
+ * @node: device to be reset by the controller
+ * @index: index of the reset controller
+ *
+ * When a reset-control is shared, the behavior of reset_control_assert /
+ * deassert is changed, the reset-core will keep track of a deassert_count
+ * and only (re-)assert the reset after reset_control_assert has been called
+ * as many times as reset_control_deassert was called. Also see the remark
+ * about shared reset-controls in the reset_control_assert docs.
+ *
+ * Calling reset_control_assert without first calling reset_control_deassert
+ * is not allowed on a shared reset control. Calling reset_control_reset is
+ * also not allowed on a shared reset control.
+ * Returns a struct reset_control or IS_ERR() condition containing errno.
+ *
+ * This is to be used to perform a list of resets for a device or power domain
+ * in whatever order. Returns a struct reset_control or IS_ERR() condition
+ * containing errno.
+ */
+static inline struct reset_control *of_reset_control_get_shared_by_index(
+					struct device_node *node, int index)
+{
+	return __of_reset_control_get(node, NULL, index, 1);
+}
+
+/**
  * devm_reset_control_get_exclusive - resource managed
  *                                    reset_control_get_exclusive()
  * @dev: device to be reset by the controller
-- 
2.8.3

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

* [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
                   ` (2 preceding siblings ...)
  2016-06-06 15:56 ` [PATCH 3/7] reset: Supply *_shared variant calls when using of_* API Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-28  8:56   ` Lee Jones
  2016-06-06 15:56 ` [PATCH 5/7] reset: TRIVIAL: Add line break at same place for similar APIs Lee Jones
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

Consumers need to be able to specify whether they are requesting an
'exclusive' or 'shared' reset line no matter which API (of_*, devm_*,
etc) they are using.  This change allows users of the optional_* API
in particular to specify that their request is for a 'shared' line.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/reset.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index fd69240..c358106 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -141,6 +141,12 @@ static inline struct reset_control *reset_control_get_optional_exclusive(
 	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
 }
 
+static inline struct reset_control *reset_control_get_optional_shared(
+					struct device *dev, const char *id)
+{
+	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
+}
+
 /**
  * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
  *                                  to a reset controller.
@@ -270,6 +276,12 @@ static inline struct reset_control *devm_reset_control_get_optional_exclusive(
 	return __devm_reset_control_get(dev, id, 0, 0);
 }
 
+static inline struct reset_control *devm_reset_control_get_optional_shared(
+					struct device *dev, const char *id)
+{
+	return __devm_reset_control_get(dev, id, 0, 1);
+}
+
 /**
  * devm_reset_control_get_exclusive_by_index - resource managed
  *                                             reset_control_get_exclusive()
-- 
2.8.3

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

* [PATCH 5/7] reset: TRIVIAL: Add line break at same place for similar APIs
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
                   ` (3 preceding siblings ...)
  2016-06-06 15:56 ` [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-06 15:56 ` [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared Lee Jones
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

Standardise the way inline functions:

  devm_reset_control_get_shared_by_index
  devm_reset_control_get_exclusive_by_index

... are formatted.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 include/linux/reset.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/reset.h b/include/linux/reset.h
index c358106..45a4abe 100644
--- a/include/linux/reset.h
+++ b/include/linux/reset.h
@@ -310,8 +310,8 @@ devm_reset_control_get_exclusive_by_index(struct device *dev, int index)
  * this function, reset_control_put() is called automatically on driver detach.
  * See reset_control_get_shared() for more information.
  */
-static inline struct reset_control *devm_reset_control_get_shared_by_index(
-					struct device *dev, int index)
+static inline struct reset_control *
+devm_reset_control_get_shared_by_index(struct device *dev, int index)
 {
 	return __devm_reset_control_get(dev, NULL, index, 1);
 }
-- 
2.8.3

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

* [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
                   ` (4 preceding siblings ...)
  2016-06-06 15:56 ` [PATCH 5/7] reset: TRIVIAL: Add line break at same place for similar APIs Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-07  8:37   ` [STLinux Kernel] " Peter Griffin
  2016-06-07  8:59   ` Kishon Vijay Abraham I
  2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
  2016-06-07  8:42 ` [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Peter Griffin
  7 siblings, 2 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

On the STiH410 B2120 development board the MiPHY28lp shares its reset
line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
(DRD).  New functionality in the reset subsystems forces consumers to
be explicit when requesting shared/exclusive reset lines.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/phy/phy-miphy28lp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
index 3acd2a1..213e2e1 100644
--- a/drivers/phy/phy-miphy28lp.c
+++ b/drivers/phy/phy-miphy28lp.c
@@ -1143,7 +1143,8 @@ static int miphy28lp_probe_resets(struct device_node *node,
 	struct miphy28lp_dev *miphy_dev = miphy_phy->phydev;
 	int err;
 
-	miphy_phy->miphy_rst = of_reset_control_get(node, "miphy-sw-rst");
+	miphy_phy->miphy_rst =
+		of_reset_control_get_shared(node, "miphy-sw-rst");
 
 	if (IS_ERR(miphy_phy->miphy_rst)) {
 		dev_err(miphy_dev->dev,
-- 
2.8.3

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

* [PATCH 7/7] usb: dwc3: st: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
                   ` (5 preceding siblings ...)
  2016-06-06 15:56 ` [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared Lee Jones
@ 2016-06-06 15:56 ` Lee Jones
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
                     ` (3 more replies)
  2016-06-07  8:42 ` [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Peter Griffin
  7 siblings, 4 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 15:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

On the STiH410 B2120 development board the MiPHY28lp shares its reset
line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
(DRD).  New functionality in the reset subsystems forces consumers to
be explicit when requesting shared/exclusive reset lines.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/dwc3/dwc3-st.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
index 5c0adb9..e77bacb 100644
--- a/drivers/usb/dwc3/dwc3-st.c
+++ b/drivers/usb/dwc3/dwc3-st.c
@@ -227,7 +227,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	dev_vdbg(&pdev->dev, "glue-logic addr 0x%p, syscfg-reg offset 0x%x\n",
 		 dwc3_data->glue_base, dwc3_data->syscfg_reg_off);
 
-	dwc3_data->rstc_pwrdn = devm_reset_control_get(dev, "powerdown");
+	dwc3_data->rstc_pwrdn =
+		devm_reset_control_get_exclusive(dev, "powerdown");
 	if (IS_ERR(dwc3_data->rstc_pwrdn)) {
 		dev_err(&pdev->dev, "could not get power controller\n");
 		ret = PTR_ERR(dwc3_data->rstc_pwrdn);
@@ -237,7 +238,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	/* Manage PowerDown */
 	reset_control_deassert(dwc3_data->rstc_pwrdn);
 
-	dwc3_data->rstc_rst = devm_reset_control_get(dev, "softreset");
+	dwc3_data->rstc_rst =
+		devm_reset_control_get_shared(dev, "softreset");
 	if (IS_ERR(dwc3_data->rstc_rst)) {
 		dev_err(&pdev->dev, "could not get reset controller\n");
 		ret = PTR_ERR(dwc3_data->rstc_rst);
-- 
2.8.3

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

* [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
@ 2016-06-06 17:08   ` Lee Jones
  2016-06-06 17:08     ` [PATCH 9/10] usb: host: ehci-st: " Lee Jones
                       ` (3 more replies)
  2016-06-07  8:36   ` [STLinux Kernel] [PATCH 7/7] usb: dwc3: st: " Peter Griffin
                     ` (2 subsequent siblings)
  3 siblings, 4 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 17:08 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

On the STiH410 B2120 development board the ports on the Generic PHY
share their reset lines with each other.  New functionality in the
reset subsystems forces consumers to be explicit when requesting
shared/exclusive reset lines.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/phy/phy-stih407-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/phy/phy-stih407-usb.c b/drivers/phy/phy-stih407-usb.c
index 1d5ae5f..b1f44ab 100644
--- a/drivers/phy/phy-stih407-usb.c
+++ b/drivers/phy/phy-stih407-usb.c
@@ -105,13 +105,13 @@ static int stih407_usb2_picophy_probe(struct platform_device *pdev)
 	phy_dev->dev = dev;
 	dev_set_drvdata(dev, phy_dev);
 
-	phy_dev->rstc = devm_reset_control_get(dev, "global");
+	phy_dev->rstc = devm_reset_control_get_shared(dev, "global");
 	if (IS_ERR(phy_dev->rstc)) {
 		dev_err(dev, "failed to ctrl picoPHY reset\n");
 		return PTR_ERR(phy_dev->rstc);
 	}
 
-	phy_dev->rstport = devm_reset_control_get(dev, "port");
+	phy_dev->rstport = devm_reset_control_get_exclusive(dev, "port");
 	if (IS_ERR(phy_dev->rstport)) {
 		dev_err(dev, "failed to ctrl picoPHY reset\n");
 		return PTR_ERR(phy_dev->rstport);
-- 
2.8.3

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

* [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
@ 2016-06-06 17:08     ` Lee Jones
  2016-06-06 17:44       ` Alan Stern
  2016-06-07  8:36       ` [STLinux Kernel] " Peter Griffin
  2016-06-06 17:08     ` [PATCH 10/10] usb: host: ohci-st: " Lee Jones
                       ` (2 subsequent siblings)
  3 siblings, 2 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 17:08 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

On the STiH410 B2120 development board the ST EHCI IP shares its reset
line with the OHCI IP.  New functionality in the reset subsystems forces
consumers to be explicit when requesting shared/exclusive reset lines.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/ehci-st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ehci-st.c b/drivers/usb/host/ehci-st.c
index a94ed67..6cfce6f 100644
--- a/drivers/usb/host/ehci-st.c
+++ b/drivers/usb/host/ehci-st.c
@@ -206,7 +206,7 @@ static int st_ehci_platform_probe(struct platform_device *dev)
 		priv->clk48 = NULL;
 	}
 
-	priv->pwr = devm_reset_control_get_optional(&dev->dev, "power");
+	priv->pwr = devm_reset_control_get_optional_shared(&dev->dev, "power");
 	if (IS_ERR(priv->pwr)) {
 		err = PTR_ERR(priv->pwr);
 		if (err == -EPROBE_DEFER)
@@ -214,7 +214,7 @@ static int st_ehci_platform_probe(struct platform_device *dev)
 		priv->pwr = NULL;
 	}
 
-	priv->rst = devm_reset_control_get_optional(&dev->dev, "softreset");
+	priv->rst = devm_reset_control_get_optional_shared(&dev->dev, "softreset");
 	if (IS_ERR(priv->rst)) {
 		err = PTR_ERR(priv->rst);
 		if (err == -EPROBE_DEFER)
-- 
2.8.3

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

* [PATCH 10/10] usb: host: ohci-st: Inform the reset framework that our reset line may be shared
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
  2016-06-06 17:08     ` [PATCH 9/10] usb: host: ehci-st: " Lee Jones
@ 2016-06-06 17:08     ` Lee Jones
  2016-06-07  8:36     ` [STLinux Kernel] [PATCH 8/10] phy: phy-stih407-usb: " Peter Griffin
  2016-06-07  9:00     ` Kishon Vijay Abraham I
  3 siblings, 0 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-06 17:08 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb, Lee Jones

On the STiH410 B2120 development board the ST EHCI IP shares its reset
line with the OHCI IP.  New functionality in the reset subsystems forces
consumers to be explicit when requesting shared/exclusive reset lines.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
 drivers/usb/host/ohci-st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/host/ohci-st.c b/drivers/usb/host/ohci-st.c
index acf2eb2..1f1f23c 100644
--- a/drivers/usb/host/ohci-st.c
+++ b/drivers/usb/host/ohci-st.c
@@ -188,13 +188,13 @@ static int st_ohci_platform_probe(struct platform_device *dev)
 		priv->clk48 = NULL;
 	}
 
-	priv->pwr = devm_reset_control_get_optional(&dev->dev, "power");
+	priv->pwr = devm_reset_control_get_optional_shared(&dev->dev, "power");
 	if (IS_ERR(priv->pwr)) {
 		err = PTR_ERR(priv->pwr);
 		goto err_put_clks;
 	}
 
-	priv->rst = devm_reset_control_get_optional(&dev->dev, "softreset");
+	priv->rst = devm_reset_control_get_optional_shared(&dev->dev, "softreset");
 	if (IS_ERR(priv->rst)) {
 		err = PTR_ERR(priv->rst);
 		goto err_put_clks;
-- 
2.8.3

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

* Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared
  2016-06-06 17:08     ` [PATCH 9/10] usb: host: ehci-st: " Lee Jones
@ 2016-06-06 17:44       ` Alan Stern
  2016-06-28  7:58         ` Lee Jones
  2016-06-07  8:36       ` [STLinux Kernel] " Peter Griffin
  1 sibling, 1 reply; 35+ messages in thread
From: Alan Stern @ 2016-06-06 17:44 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, p.zabel, linux-usb

On Mon, 6 Jun 2016, Lee Jones wrote:

> On the STiH410 B2120 development board the ST EHCI IP shares its reset
> line with the OHCI IP.  New functionality in the reset subsystems forces
> consumers to be explicit when requesting shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

For this andd the 10/10 patch:

Acked-by: Alan Stern <stern@rowland.harvard.edu>

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

* Re: [STLinux Kernel] [PATCH 7/7] usb: dwc3: st: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
@ 2016-06-07  8:36   ` Peter Griffin
  2016-06-16  9:03   ` Philipp Zabel
  2016-06-28  9:27   ` [PATCH 1/1] " Lee Jones
  3 siblings, 0 replies; 35+ messages in thread
From: Peter Griffin @ 2016-06-07  8:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

Hi Lee,

On Mon, 06 Jun 2016, Lee Jones wrote:

> On the STiH410 B2120 development board the MiPHY28lp shares its reset
> line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
> (DRD).  New functionality in the reset subsystems forces consumers to
> be explicit when requesting shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/dwc3/dwc3-st.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

Acked-by: Peter Griffin <peter.griffin@linaro.org>

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

* Re: [STLinux Kernel] [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
  2016-06-06 17:08     ` [PATCH 9/10] usb: host: ehci-st: " Lee Jones
  2016-06-06 17:08     ` [PATCH 10/10] usb: host: ohci-st: " Lee Jones
@ 2016-06-07  8:36     ` Peter Griffin
  2016-06-07  9:00     ` Kishon Vijay Abraham I
  3 siblings, 0 replies; 35+ messages in thread
From: Peter Griffin @ 2016-06-07  8:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

On Mon, 06 Jun 2016, Lee Jones wrote:

> On the STiH410 B2120 development board the ports on the Generic PHY
> share their reset lines with each other.  New functionality in the
> reset subsystems forces consumers to be explicit when requesting
> shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Peter Griffin <peter.griffin@linaro.org>

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

* Re: [STLinux Kernel] [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared
  2016-06-06 17:08     ` [PATCH 9/10] usb: host: ehci-st: " Lee Jones
  2016-06-06 17:44       ` Alan Stern
@ 2016-06-07  8:36       ` Peter Griffin
  1 sibling, 0 replies; 35+ messages in thread
From: Peter Griffin @ 2016-06-07  8:36 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

On Mon, 06 Jun 2016, Lee Jones wrote:

> On the STiH410 B2120 development board the ST EHCI IP shares its reset
> line with the OHCI IP.  New functionality in the reset subsystems forces
> consumers to be explicit when requesting shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/host/ehci-st.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Peter Griffin <peter.griffin@linaro.org>

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

* Re: [STLinux Kernel] [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 ` [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared Lee Jones
@ 2016-06-07  8:37   ` Peter Griffin
  2016-06-07  8:59   ` Kishon Vijay Abraham I
  1 sibling, 0 replies; 35+ messages in thread
From: Peter Griffin @ 2016-06-07  8:37 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

On Mon, 06 Jun 2016, Lee Jones wrote:

> On the STiH410 B2120 development board the MiPHY28lp shares its reset
> line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
> (DRD).  New functionality in the reset subsystems forces consumers to
> be explicit when requesting shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/phy/phy-miphy28lp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Acked-by: Peter Griffin <peter.griffin@linaro.org>

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

* Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines
  2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
                   ` (6 preceding siblings ...)
  2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
@ 2016-06-07  8:42 ` Peter Griffin
  2016-06-07  9:15   ` Lee Jones
  7 siblings, 1 reply; 35+ messages in thread
From: Peter Griffin @ 2016-06-07  8:42 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

Hi,

On Mon, 06 Jun 2016, Lee Jones wrote:

> Phasing out generic reset line requests enables us to make some better
> decisions on when and how to (de)assert said lines.  If an 'exclusive'
> line is requested, we know a device *requires* a reset and that it's
> preferable to act upon a request right away.  However, if a 'shared'
> reset line is requested, we can reasonably assume sure that placing a
> device into reset isn't a hard requirement, but probably a measure to
> save power and is thus able to cope with not being asserted if another
> device is still in use.
> 
> In order allow gentle adoption and not to forcing all consumers to
> move to the API immediately, causing administration headache between
> subsystems, this patch adds some temporary stand-in shim-calls.  This
> will ease the burden at merge time and allow subsystems to migrate over
> to the new API in a more realistic time-frame.

Is the intention that this series will be taken into the next -rc?

As the introduction of shared resets in reset subsystem has caused regressions
on STi platforms.

regards,

Peter.

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

* Re: [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 ` [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared Lee Jones
  2016-06-07  8:37   ` [STLinux Kernel] " Peter Griffin
@ 2016-06-07  8:59   ` Kishon Vijay Abraham I
  2016-06-28  7:55     ` Lee Jones
  1 sibling, 1 reply; 35+ messages in thread
From: Kishon Vijay Abraham I @ 2016-06-07  8:59 UTC (permalink / raw)
  To: Lee Jones, linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, balbi, gregkh,
	p.zabel, linux-usb



On Monday 06 June 2016 09:26 PM, Lee Jones wrote:
> On the STiH410 B2120 development board the MiPHY28lp shares its reset
> line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
> (DRD).  New functionality in the reset subsystems forces consumers to
> be explicit when requesting shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/phy/phy-miphy28lp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
> index 3acd2a1..213e2e1 100644
> --- a/drivers/phy/phy-miphy28lp.c
> +++ b/drivers/phy/phy-miphy28lp.c
> @@ -1143,7 +1143,8 @@ static int miphy28lp_probe_resets(struct device_node *node,
>  	struct miphy28lp_dev *miphy_dev = miphy_phy->phydev;
>  	int err;
>  
> -	miphy_phy->miphy_rst = of_reset_control_get(node, "miphy-sw-rst");
> +	miphy_phy->miphy_rst =
> +		of_reset_control_get_shared(node, "miphy-sw-rst");
>  
>  	if (IS_ERR(miphy_phy->miphy_rst)) {
>  		dev_err(miphy_dev->dev,
> 

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

* Re: [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
                       ` (2 preceding siblings ...)
  2016-06-07  8:36     ` [STLinux Kernel] [PATCH 8/10] phy: phy-stih407-usb: " Peter Griffin
@ 2016-06-07  9:00     ` Kishon Vijay Abraham I
  3 siblings, 0 replies; 35+ messages in thread
From: Kishon Vijay Abraham I @ 2016-06-07  9:00 UTC (permalink / raw)
  To: Lee Jones, linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, balbi, gregkh,
	p.zabel, linux-usb



On Monday 06 June 2016 10:38 PM, Lee Jones wrote:
> On the STiH410 B2120 development board the ports on the Generic PHY
> share their reset lines with each other.  New functionality in the
> reset subsystems forces consumers to be explicit when requesting
> shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Acked-by: Kishon Vijay Abraham I <kishon@ti.com>
> ---
>  drivers/phy/phy-stih407-usb.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/phy/phy-stih407-usb.c b/drivers/phy/phy-stih407-usb.c
> index 1d5ae5f..b1f44ab 100644
> --- a/drivers/phy/phy-stih407-usb.c
> +++ b/drivers/phy/phy-stih407-usb.c
> @@ -105,13 +105,13 @@ static int stih407_usb2_picophy_probe(struct platform_device *pdev)
>  	phy_dev->dev = dev;
>  	dev_set_drvdata(dev, phy_dev);
>  
> -	phy_dev->rstc = devm_reset_control_get(dev, "global");
> +	phy_dev->rstc = devm_reset_control_get_shared(dev, "global");
>  	if (IS_ERR(phy_dev->rstc)) {
>  		dev_err(dev, "failed to ctrl picoPHY reset\n");
>  		return PTR_ERR(phy_dev->rstc);
>  	}
>  
> -	phy_dev->rstport = devm_reset_control_get(dev, "port");
> +	phy_dev->rstport = devm_reset_control_get_exclusive(dev, "port");
>  	if (IS_ERR(phy_dev->rstport)) {
>  		dev_err(dev, "failed to ctrl picoPHY reset\n");
>  		return PTR_ERR(phy_dev->rstport);
> 

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

* Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines
  2016-06-07  8:42 ` [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Peter Griffin
@ 2016-06-07  9:15   ` Lee Jones
  2016-06-07  9:24     ` Lee Jones
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-07  9:15 UTC (permalink / raw)
  To: Peter Griffin
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

On Tue, 07 Jun 2016, Peter Griffin wrote:

> Hi,
> 
> On Mon, 06 Jun 2016, Lee Jones wrote:
> 
> > Phasing out generic reset line requests enables us to make some better
> > decisions on when and how to (de)assert said lines.  If an 'exclusive'
> > line is requested, we know a device *requires* a reset and that it's
> > preferable to act upon a request right away.  However, if a 'shared'
> > reset line is requested, we can reasonably assume sure that placing a
> > device into reset isn't a hard requirement, but probably a measure to
> > save power and is thus able to cope with not being asserted if another
> > device is still in use.
> > 
> > In order allow gentle adoption and not to forcing all consumers to
> > move to the API immediately, causing administration headache between
> > subsystems, this patch adds some temporary stand-in shim-calls.  This
> > will ease the burden at merge time and allow subsystems to migrate over
> > to the new API in a more realistic time-frame.
> 
> Is the intention that this series will be taken into the next -rc?
> 
> As the introduction of shared resets in reset subsystem has caused regressions
> on STi platforms.

Yes, which is why it has a Fixes: tag.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines
  2016-06-07  9:15   ` Lee Jones
@ 2016-06-07  9:24     ` Lee Jones
  2016-06-16  9:03       ` Philipp Zabel
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-07  9:24 UTC (permalink / raw)
  To: Peter Griffin
  Cc: linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, p.zabel, gregkh

On Tue, 07 Jun 2016, Lee Jones wrote:

> On Tue, 07 Jun 2016, Peter Griffin wrote:
> 
> > Hi,
> > 
> > On Mon, 06 Jun 2016, Lee Jones wrote:
> > 
> > > Phasing out generic reset line requests enables us to make some better
> > > decisions on when and how to (de)assert said lines.  If an 'exclusive'
> > > line is requested, we know a device *requires* a reset and that it's
> > > preferable to act upon a request right away.  However, if a 'shared'
> > > reset line is requested, we can reasonably assume sure that placing a
> > > device into reset isn't a hard requirement, but probably a measure to
> > > save power and is thus able to cope with not being asserted if another
> > > device is still in use.
> > > 
> > > In order allow gentle adoption and not to forcing all consumers to
> > > move to the API immediately, causing administration headache between
> > > subsystems, this patch adds some temporary stand-in shim-calls.  This
> > > will ease the burden at merge time and allow subsystems to migrate over
> > > to the new API in a more realistic time-frame.
> > 
> > Is the intention that this series will be taken into the next -rc?
> > 
> > As the introduction of shared resets in reset subsystem has caused regressions
> > on STi platforms.
> 
> Yes, which is why it has a Fixes: tag.

Ah wait.  I thought this was the shared-memory patch.

More haste, less speed and all that.

I guess it should really go into the -rcs, yes.  Since Hans' patch
actually breaks a lot of devices.  I'm pretty surprised a patch
capable of this much damage was actually accepted to be honest.  A
better approach would have been to issue a warning, but keep the
semantics the same for at least a couple of releases.  However, I
guess the damage has been done now, so let's do what we can do fix
it.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines
  2016-06-07  9:24     ` Lee Jones
@ 2016-06-16  9:03       ` Philipp Zabel
  0 siblings, 0 replies; 35+ messages in thread
From: Philipp Zabel @ 2016-06-16  9:03 UTC (permalink / raw)
  To: Lee Jones
  Cc: Peter Griffin, linux-arm-kernel, linux-kernel, balbi, kernel,
	srinivas.kandagatla, linux-usb, kishon, gregkh

Hi Lee,

Am Dienstag, den 07.06.2016, 10:24 +0100 schrieb Lee Jones:
[...]
> I guess it should really go into the -rcs, yes.  Since Hans' patch
> actually breaks a lot of devices.  I'm pretty surprised a patch
> capable of this much damage was actually accepted to be honest.

I wasn't aware there were more drivers already sharing resets, and
arguably before Hans' patches this wasn't really supported at all.
It only worked by circumstance.

> A better approach would have been to issue a warning, but keep the
> semantics the same for at least a couple of releases.  However, I
> guess the damage has been done now, so let's do what we can do fix
> it.

Agreed.

regards
Philipp

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

* Re: [PATCH 7/7] usb: dwc3: st: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
  2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
  2016-06-07  8:36   ` [STLinux Kernel] [PATCH 7/7] usb: dwc3: st: " Peter Griffin
@ 2016-06-16  9:03   ` Philipp Zabel
  2016-06-28  9:27   ` [PATCH 1/1] " Lee Jones
  3 siblings, 0 replies; 35+ messages in thread
From: Philipp Zabel @ 2016-06-16  9:03 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

Am Montag, den 06.06.2016, 16:56 +0100 schrieb Lee Jones:
> On the STiH410 B2120 development board the MiPHY28lp shares its reset
> line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
> (DRD).  New functionality in the reset subsystems forces consumers to
> be explicit when requesting shared/exclusive reset lines.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  drivers/usb/dwc3/dwc3-st.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
> index 5c0adb9..e77bacb 100644
> --- a/drivers/usb/dwc3/dwc3-st.c
> +++ b/drivers/usb/dwc3/dwc3-st.c
> @@ -227,7 +227,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  	dev_vdbg(&pdev->dev, "glue-logic addr 0x%p, syscfg-reg offset 0x%x\n",
>  		 dwc3_data->glue_base, dwc3_data->syscfg_reg_off);
>  
> -	dwc3_data->rstc_pwrdn = devm_reset_control_get(dev, "powerdown");
> +	dwc3_data->rstc_pwrdn =
> +		devm_reset_control_get_exclusive(dev, "powerdown");

This hunk is not critical. If you split it into a separate patch, this
one doesn't depend on patch 2. The same applies to patch 8.
That way I could take patches 1-5 through reset/next and you wouldn't
have to wait for them to be merged into arm-soc.

regards
Philipp

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

* Re: [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers
  2016-06-06 15:56 ` [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers Lee Jones
@ 2016-06-20 12:07   ` Philipp Zabel
  0 siblings, 0 replies; 35+ messages in thread
From: Philipp Zabel @ 2016-06-20 12:07 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

Am Montag, den 06.06.2016, 16:56 +0100 schrieb Lee Jones:
> We're about to split the current API into two, where consumers will
> be forced to be explicit when requesting reset lines.  The choice
> will be to either the call the *_exclusive or *_shared variant
> depending on whether they can actually tolorate not being asserted
> when that request is made.
> 
> The new API will look like this once reorded and complete:
> 
>   reset_control_get_exclusive()
>   reset_control_get_shared()
>   reset_control_get_optional_exclusive()
>   reset_control_get_optional_shared()
>   of_reset_control_get_exclusive()
>   of_reset_control_get_shared()
>   of_reset_control_get_exclusive_by_index()
>   of_reset_control_get_shared_by_index()
>   devm_reset_control_get_exclusive()
>   devm_reset_control_get_shared()
>   devm_reset_control_get_optional_exclusive()
>   devm_reset_control_get_optional_shared()
>   devm_reset_control_get_exclusive_by_index()
>   devm_reset_control_get_shared_by_index()
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

I have applied patches 1-5 to my reset/next branch.

regards
Philipp

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

* Re: [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared
  2016-06-07  8:59   ` Kishon Vijay Abraham I
@ 2016-06-28  7:55     ` Lee Jones
  0 siblings, 0 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-28  7:55 UTC (permalink / raw)
  To: Kishon Vijay Abraham I
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, balbi, gregkh, p.zabel, linux-usb

On Tue, 07 Jun 2016, Kishon Vijay Abraham I wrote:

> 
> 
> On Monday 06 June 2016 09:26 PM, Lee Jones wrote:
> > On the STiH410 B2120 development board the MiPHY28lp shares its reset
> > line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
> > (DRD).  New functionality in the reset subsystems forces consumers to
> > be explicit when requesting shared/exclusive reset lines.
> > 
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> 
> Acked-by: Kishon Vijay Abraham I <kishon@ti.com>

Thanks Kishon.  I'm going to add this to my MFD -fixes submission.

> > ---
> >  drivers/phy/phy-miphy28lp.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/phy/phy-miphy28lp.c b/drivers/phy/phy-miphy28lp.c
> > index 3acd2a1..213e2e1 100644
> > --- a/drivers/phy/phy-miphy28lp.c
> > +++ b/drivers/phy/phy-miphy28lp.c
> > @@ -1143,7 +1143,8 @@ static int miphy28lp_probe_resets(struct device_node *node,
> >  	struct miphy28lp_dev *miphy_dev = miphy_phy->phydev;
> >  	int err;
> >  
> > -	miphy_phy->miphy_rst = of_reset_control_get(node, "miphy-sw-rst");
> > +	miphy_phy->miphy_rst =
> > +		of_reset_control_get_shared(node, "miphy-sw-rst");
> >  
> >  	if (IS_ERR(miphy_phy->miphy_rst)) {
> >  		dev_err(miphy_dev->dev,
> > 

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared
  2016-06-06 17:44       ` Alan Stern
@ 2016-06-28  7:58         ` Lee Jones
  2016-06-28  8:01           ` Lee Jones
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-28  7:58 UTC (permalink / raw)
  To: Alan Stern
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, p.zabel, linux-usb

On Mon, 06 Jun 2016, Alan Stern wrote:

> On Mon, 6 Jun 2016, Lee Jones wrote:
> 
> > On the STiH410 B2120 development board the ST EHCI IP shares its reset
> > line with the OHCI IP.  New functionality in the reset subsystems forces
> > consumers to be explicit when requesting shared/exclusive reset lines.
> > 
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> 
> For this andd the 10/10 patch:
> 
> Acked-by: Alan Stern <stern@rowland.harvard.edu>

Thanks Alan.

I'm going to take this (actually half of this patch -- the other half
which is due for -next I will resubmit with your Ack) along with the
other patches due for the -rcs though my MFD -next branch.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared
  2016-06-28  7:58         ` Lee Jones
@ 2016-06-28  8:01           ` Lee Jones
  0 siblings, 0 replies; 35+ messages in thread
From: Lee Jones @ 2016-06-28  8:01 UTC (permalink / raw)
  To: Alan Stern
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, p.zabel, linux-usb

On Tue, 28 Jun 2016, Lee Jones wrote:

> On Mon, 06 Jun 2016, Alan Stern wrote:
> 
> > On Mon, 6 Jun 2016, Lee Jones wrote:
> > 
> > > On the STiH410 B2120 development board the ST EHCI IP shares its reset
> > > line with the OHCI IP.  New functionality in the reset subsystems forces
> > > consumers to be explicit when requesting shared/exclusive reset lines.
> > > 
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > 
> > For this andd the 10/10 patch:
> > 
> > Acked-by: Alan Stern <stern@rowland.harvard.edu>
> 
> Thanks Alan.
> 
> I'm going to take this (actually half of this patch -- the other half
> which is due for -next I will resubmit with your Ack) along with the
> other patches due for the -rcs though my MFD -next branch.

Sorry, ignore that.  I'm going to take the whole thing.  Just realised
that both APIs are the *_shared() variant in this patch.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-06 15:56 ` [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs Lee Jones
@ 2016-06-28  8:56   ` Lee Jones
  2016-06-29  7:48     ` Philipp Zabel
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-28  8:56 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb

Philipp,

I need this to go into the -rcs too.

Can I add it with your Ack please?

> Consumers need to be able to specify whether they are requesting an
> 'exclusive' or 'shared' reset line no matter which API (of_*, devm_*,
> etc) they are using.  This change allows users of the optional_* API
> in particular to specify that their request is for a 'shared' line.
> 
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
>  include/linux/reset.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/include/linux/reset.h b/include/linux/reset.h
> index fd69240..c358106 100644
> --- a/include/linux/reset.h
> +++ b/include/linux/reset.h
> @@ -141,6 +141,12 @@ static inline struct reset_control *reset_control_get_optional_exclusive(
>  	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 0);
>  }
>  
> +static inline struct reset_control *reset_control_get_optional_shared(
> +					struct device *dev, const char *id)
> +{
> +	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0, 1);
> +}
> +
>  /**
>   * of_reset_control_get_exclusive - Lookup and obtain an exclusive reference
>   *                                  to a reset controller.
> @@ -270,6 +276,12 @@ static inline struct reset_control *devm_reset_control_get_optional_exclusive(
>  	return __devm_reset_control_get(dev, id, 0, 0);
>  }
>  
> +static inline struct reset_control *devm_reset_control_get_optional_shared(
> +					struct device *dev, const char *id)
> +{
> +	return __devm_reset_control_get(dev, id, 0, 1);
> +}
> +
>  /**
>   * devm_reset_control_get_exclusive_by_index - resource managed
>   *                                             reset_control_get_exclusive()

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* [PATCH 1/1] usb: dwc3: st: Inform the reset framework that our reset line may be shared
  2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
                     ` (2 preceding siblings ...)
  2016-06-16  9:03   ` Philipp Zabel
@ 2016-06-28  9:27   ` Lee Jones
  2016-06-29  6:33     ` Felipe Balbi
  3 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-28  9:27 UTC (permalink / raw)
  To: linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, balbi,
	gregkh, p.zabel, linux-usb

On the STiH410 B2120 development board the MiPHY28lp shares its reset
line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
(DRD).  New functionality in the reset subsystems forces consumers to
be explicit when requesting shared/exclusive reset lines.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
Felipe,

I'd like to send this patch (amonst others) to the -rcs today if possible.

Would you be kind enough to Ack it, so I can do so please?

drivers/usb/dwc3/dwc3-st.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
index 5c0adb9..b204617 100644
--- a/drivers/usb/dwc3/dwc3-st.c
+++ b/drivers/usb/dwc3/dwc3-st.c
@@ -237,7 +237,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
 	/* Manage PowerDown */
 	reset_control_deassert(dwc3_data->rstc_pwrdn);
 
-	dwc3_data->rstc_rst = devm_reset_control_get(dev, "softreset");
+	dwc3_data->rstc_rst =
+		devm_reset_control_get_shared(dev, "softreset");
 	if (IS_ERR(dwc3_data->rstc_rst)) {
 		dev_err(&pdev->dev, "could not get reset controller\n");
 		ret = PTR_ERR(dwc3_data->rstc_rst);
-- 
2.9.0

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

* Re: [PATCH 1/1] usb: dwc3: st: Inform the reset framework that our reset line may be shared
  2016-06-28  9:27   ` [PATCH 1/1] " Lee Jones
@ 2016-06-29  6:33     ` Felipe Balbi
  0 siblings, 0 replies; 35+ messages in thread
From: Felipe Balbi @ 2016-06-29  6:33 UTC (permalink / raw)
  To: Lee Jones, linux-arm-kernel, linux-kernel
  Cc: kernel, maxime.coquelin, srinivas.kandagatla, kishon, gregkh,
	p.zabel, linux-usb

[-- Attachment #1: Type: text/plain, Size: 1619 bytes --]


Hi,

Lee Jones <lee.jones@linaro.org> writes:
> On the STiH410 B2120 development board the MiPHY28lp shares its reset
> line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device
> (DRD).  New functionality in the reset subsystems forces consumers to
> be explicit when requesting shared/exclusive reset lines.
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> Felipe,
>
> I'd like to send this patch (amonst others) to the -rcs today if possible.
>
> Would you be kind enough to Ack it, so I can do so please?

okay, back from vacations.

Here you go:

Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>

>
> drivers/usb/dwc3/dwc3-st.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/dwc3-st.c b/drivers/usb/dwc3/dwc3-st.c
> index 5c0adb9..b204617 100644
> --- a/drivers/usb/dwc3/dwc3-st.c
> +++ b/drivers/usb/dwc3/dwc3-st.c
> @@ -237,7 +237,8 @@ static int st_dwc3_probe(struct platform_device *pdev)
>  	/* Manage PowerDown */
>  	reset_control_deassert(dwc3_data->rstc_pwrdn);
>  
> -	dwc3_data->rstc_rst = devm_reset_control_get(dev, "softreset");
> +	dwc3_data->rstc_rst =
> +		devm_reset_control_get_shared(dev, "softreset");
>  	if (IS_ERR(dwc3_data->rstc_rst)) {
>  		dev_err(&pdev->dev, "could not get reset controller\n");
>  		ret = PTR_ERR(dwc3_data->rstc_rst);
> -- 
> 2.9.0
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

* Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-28  8:56   ` Lee Jones
@ 2016-06-29  7:48     ` Philipp Zabel
  2016-06-29  8:06       ` Lee Jones
  0 siblings, 1 reply; 35+ messages in thread
From: Philipp Zabel @ 2016-06-29  7:48 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

Hi Lee,

Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:
> Philipp,
> 
> I need this to go into the -rcs too.
> 
> Can I add it with your Ack please?

I have already added your patches to my branch, and I intend to send a
pull request for it tomorrow. I am afraid applying this patch in another
branch would create a merge conflict with
git://git.pengutronix.de/git/pza/linux.git reset/next
in arm-soc. If that is not the case, go ahead. Otherwise I could provide
a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same
place for similar APIs") for you to merge.

regards
Philipp

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

* Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-29  7:48     ` Philipp Zabel
@ 2016-06-29  8:06       ` Lee Jones
  2016-06-29  9:23         ` Philipp Zabel
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-29  8:06 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

On Wed, 29 Jun 2016, Philipp Zabel wrote:
> Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:
> > Philipp,
> > 
> > I need this to go into the -rcs too.
> > 
> > Can I add it with your Ack please?
> 
> I have already added your patches to my branch, and I intend to send a
> pull request for it tomorrow. I am afraid applying this patch in another
> branch would create a merge conflict with
> git://git.pengutronix.de/git/pza/linux.git reset/next
> in arm-soc. If that is not the case, go ahead. Otherwise I could provide
> a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same
> place for similar APIs") for you to merge.

Yes please.  If you could tag a branch containing commit:

  reset: Supply *_shared variant calls when using *_optional APIs

... that would be perfect.  Would you mind sending me the tag name
ASAP please, since I am ready to send my pull-request to Linus.

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-29  8:06       ` Lee Jones
@ 2016-06-29  9:23         ` Philipp Zabel
  2016-06-29  9:37           ` Lee Jones
  0 siblings, 1 reply; 35+ messages in thread
From: Philipp Zabel @ 2016-06-29  9:23 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

Am Mittwoch, den 29.06.2016, 09:06 +0100 schrieb Lee Jones:
> On Wed, 29 Jun 2016, Philipp Zabel wrote:
> > Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:
> > > Philipp,
> > > 
> > > I need this to go into the -rcs too.
> > > 
> > > Can I add it with your Ack please?
> > 
> > I have already added your patches to my branch, and I intend to send a
> > pull request for it tomorrow. I am afraid applying this patch in another
> > branch would create a merge conflict with
> > git://git.pengutronix.de/git/pza/linux.git reset/next
> > in arm-soc. If that is not the case, go ahead. Otherwise I could provide
> > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same
> > place for similar APIs") for you to merge.
> 
> Yes please.  If you could tag a branch containing commit:
> 
>   reset: Supply *_shared variant calls when using *_optional APIs
> 
> ... that would be perfect.  Would you mind sending me the tag name
> ASAP please, since I am ready to send my pull-request to Linus.

git://git.pengutronix.de/git/pza/linux.git tags/reset-shared-optional

regards
Philipp

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

* Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-29  9:23         ` Philipp Zabel
@ 2016-06-29  9:37           ` Lee Jones
  2016-06-29 21:57             ` Philipp Zabel
  0 siblings, 1 reply; 35+ messages in thread
From: Lee Jones @ 2016-06-29  9:37 UTC (permalink / raw)
  To: Philipp Zabel
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

On Wed, 29 Jun 2016, Philipp Zabel wrote:

> Am Mittwoch, den 29.06.2016, 09:06 +0100 schrieb Lee Jones:
> > On Wed, 29 Jun 2016, Philipp Zabel wrote:
> > > Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:
> > > > Philipp,
> > > > 
> > > > I need this to go into the -rcs too.
> > > > 
> > > > Can I add it with your Ack please?
> > > 
> > > I have already added your patches to my branch, and I intend to send a
> > > pull request for it tomorrow. I am afraid applying this patch in another
> > > branch would create a merge conflict with
> > > git://git.pengutronix.de/git/pza/linux.git reset/next
> > > in arm-soc. If that is not the case, go ahead. Otherwise I could provide
> > > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same
> > > place for similar APIs") for you to merge.
> > 
> > Yes please.  If you could tag a branch containing commit:
> > 
> >   reset: Supply *_shared variant calls when using *_optional APIs
> > 
> > ... that would be perfect.  Would you mind sending me the tag name
> > ASAP please, since I am ready to send my pull-request to Linus.
> 
> git://git.pengutronix.de/git/pza/linux.git tags/reset-shared-optional

Ah!  If I rebase on that tag, I will also take in all of the patches
between it and v4.7-rc1, which is 14 commits.  Is there any way you
can place it onto it's own branch, then we both merge it into our
respective trees?

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

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

* Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs
  2016-06-29  9:37           ` Lee Jones
@ 2016-06-29 21:57             ` Philipp Zabel
  0 siblings, 0 replies; 35+ messages in thread
From: Philipp Zabel @ 2016-06-29 21:57 UTC (permalink / raw)
  To: Lee Jones
  Cc: linux-arm-kernel, linux-kernel, kernel, maxime.coquelin,
	srinivas.kandagatla, kishon, balbi, gregkh, linux-usb

Hi Lee,

On Wed, Jun 29, 2016 at 10:37:34AM +0100, Lee Jones wrote:
[...]
> > > > If that is not the case, go ahead. Otherwise I could provide
> > > > a tag at commit 2485394d9e0b ("reset: TRIVIAL: Add line break at same
> > > > place for similar APIs") for you to merge.
> > > 
> > > Yes please.  If you could tag a branch containing commit:
> > > 
> > >   reset: Supply *_shared variant calls when using *_optional APIs
> > > 
> > > ... that would be perfect.  Would you mind sending me the tag name
> > > ASAP please, since I am ready to send my pull-request to Linus.
> > 
> > git://git.pengutronix.de/git/pza/linux.git tags/reset-shared-optional
> 
> Ah!  If I rebase on that tag, I will also take in all of the patches
> between it and v4.7-rc1, which is 14 commits.  Is there any way you
> can place it onto it's own branch, then we both merge it into our
> respective trees?

I have now moved your patches into their own branch at
git://git.pengutronix.de/git/pza/linux.git tags/reset-explicit-api
and merged that back in.

regards
Philipp

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

end of thread, other threads:[~2016-06-29 21:57 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 15:56 [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Lee Jones
2016-06-06 15:56 ` [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers Lee Jones
2016-06-20 12:07   ` Philipp Zabel
2016-06-06 15:56 ` [PATCH 2/7] reset: Ensure drivers are explicit when requesting reset lines Lee Jones
2016-06-06 15:56 ` [PATCH 3/7] reset: Supply *_shared variant calls when using of_* API Lee Jones
2016-06-06 15:56 ` [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs Lee Jones
2016-06-28  8:56   ` Lee Jones
2016-06-29  7:48     ` Philipp Zabel
2016-06-29  8:06       ` Lee Jones
2016-06-29  9:23         ` Philipp Zabel
2016-06-29  9:37           ` Lee Jones
2016-06-29 21:57             ` Philipp Zabel
2016-06-06 15:56 ` [PATCH 5/7] reset: TRIVIAL: Add line break at same place for similar APIs Lee Jones
2016-06-06 15:56 ` [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared Lee Jones
2016-06-07  8:37   ` [STLinux Kernel] " Peter Griffin
2016-06-07  8:59   ` Kishon Vijay Abraham I
2016-06-28  7:55     ` Lee Jones
2016-06-06 15:56 ` [PATCH 7/7] usb: dwc3: st: " Lee Jones
2016-06-06 17:08   ` [PATCH 8/10] phy: phy-stih407-usb: " Lee Jones
2016-06-06 17:08     ` [PATCH 9/10] usb: host: ehci-st: " Lee Jones
2016-06-06 17:44       ` Alan Stern
2016-06-28  7:58         ` Lee Jones
2016-06-28  8:01           ` Lee Jones
2016-06-07  8:36       ` [STLinux Kernel] " Peter Griffin
2016-06-06 17:08     ` [PATCH 10/10] usb: host: ohci-st: " Lee Jones
2016-06-07  8:36     ` [STLinux Kernel] [PATCH 8/10] phy: phy-stih407-usb: " Peter Griffin
2016-06-07  9:00     ` Kishon Vijay Abraham I
2016-06-07  8:36   ` [STLinux Kernel] [PATCH 7/7] usb: dwc3: st: " Peter Griffin
2016-06-16  9:03   ` Philipp Zabel
2016-06-28  9:27   ` [PATCH 1/1] " Lee Jones
2016-06-29  6:33     ` Felipe Balbi
2016-06-07  8:42 ` [STLinux Kernel] [PATCH 0/7] reset: Consumers to explicitly request 'exclusive' or 'shared' lines Peter Griffin
2016-06-07  9:15   ` Lee Jones
2016-06-07  9:24     ` Lee Jones
2016-06-16  9:03       ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).