Skip to contentSkip to conversation

reset: Consumers to explicitly request 'exclusive' or 'shared' lines

PATCH Applied Lee Jones 7 participants 35 messages Jun 6, 2016 – Jun 29, 2016

Subsystems (7)
lore
Share & tools
lore

Lee Jones

author
#0 lore raw

cover reset: Consumers to explicitly request 'exclusive' or 'shared' lines

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(-)
Signature · 1 line
2.8.3
author
#1 lore raw

PATCH 1/7 reset: Reorder inline reset_control_get*() wrappers

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()

---
 include/linux/reset.h | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)
include/linux/reset.h +21 -21
index ec0306ce..33eaf11 100644
@@ -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
Signature · 1 line
2.8.3
maintainer Applied
#2 lore raw

Re: [PATCH 1/7] reset: Reorder inline reset_control_get*() wrappers

Am Montag, den 06.06.2016, 16:56 +0100 schrieb Lee Jones:

Quoted 23 lines

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()

Quoted 1 line

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

regards
Philipp

author
#3 lore raw

PATCH 2/7 reset: Ensure drivers are explicit when requesting reset lines

In reply to 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.

---
 include/linux/reset.h | 106 ++++++++++++++++++++++++++++++++++++++------------
 1 file changed, 82 insertions(+), 24 deletions(-)
include/linux/reset.h +82 -24
index 33eaf11..9cf4cf3 100644
@@ -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
Signature · 1 line
2.8.3
author
#4 lore raw

PATCH 3/7 reset: Supply *_shared variant calls when using of_* API

In reply to 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.

---
 include/linux/reset.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
include/linux/reset.h +53 -0
index 9cf4cf3..fd69240 100644
@@ -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
Signature · 1 line
2.8.3
author
#5 lore raw

PATCH 4/7 reset: Supply *_shared variant calls when using *_optional APIs

In reply to 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.

---
 include/linux/reset.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
include/linux/reset.h +12 -0
index fd69240..c358106 100644
@@ -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()
Signature · 1 line
2.8.3
author
#6 lore raw

Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

Philipp,

I need this to go into the -rcs too.

Can I add it with your Ack please?

Quoted 40 lines

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.

---
 include/linux/reset.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)
include/linux/reset.h +12 -0
index fd69240..c358106 100644
@@ -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()
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#7 lore raw

Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

Hi Lee,

Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:

Quoted 5 lines

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

author
#8 lore raw

Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

Quoted 7 lines · Philipp Zabel

Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:

Quoted 5 lines

Philipp,

I need this to go into the -rcs too.

Can I add it with your Ack please?

Quoted 7 lines

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.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#9 lore raw

Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

Am Mittwoch, den 29.06.2016, 09:06 +0100 schrieb Lee Jones:

Quoted 16 lines · Philipp Zabel
Quoted 7 lines

Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:

Quoted 5 lines

Philipp,

I need this to go into the -rcs too.

Can I add it with your Ack please?

Quoted 7 lines

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.

Quoted 6 lines

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

author
#10 lore raw

Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

Quoted 17 lines · Philipp Zabel

Am Mittwoch, den 29.06.2016, 09:06 +0100 schrieb Lee Jones:

Quoted 16 lines · Philipp Zabel
Quoted 14 lines

Am Dienstag, den 28.06.2016, 09:56 +0100 schrieb Lee Jones:

Quoted 5 lines

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.

Quoted 8 lines
Quoted 6 lines

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?

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
#11 lore raw

Re: [PATCH 4/7] reset: Supply *_shared variant calls when using *_optional APIs

Hi Lee,

On Wed, Jun 29, 2016 at 10:37:34AM +0100, Lee Jones wrote:
[...]

Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
Quoted 3 lines

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.

Quoted 6 lines
Quoted 1 line

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

author
#12 lore raw

PATCH 5/7 reset: TRIVIAL: Add line break at same place for similar APIs

In reply to Lee Jones

Standardise the way inline functions:

devm_reset_control_get_shared_by_index
devm_reset_control_get_exclusive_by_index

... are formatted.

---
 include/linux/reset.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/reset.h +2 -2
index c358106..45a4abe 100644
@@ -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);
 }
Signature · 1 line
2.8.3
author
#13 lore raw

PATCH 6/7 phy: miphy28lp: Inform the reset framework that our reset line may be shared

In reply to 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.

---
 drivers/phy/phy-miphy28lp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/phy-miphy28lp.c +2 -1
index 3acd2a1..213e2e1 100644
@@ -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,
Signature · 1 line
2.8.3
Acked-by on v1 6/7
#14 lore raw

Re: [STLinux Kernel] [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared

Quoted 9 lines · 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.

---
 drivers/phy/phy-miphy28lp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Acked-by on v1 6/7
#15 lore raw

Re: [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared

In reply to Lee Jones
Quoted 6 lines · 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.

Quoted 19 lines
---
 drivers/phy/phy-miphy28lp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/phy-miphy28lp.c +2 -1
index 3acd2a1..213e2e1 100644
@@ -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,
author
#16 lore raw

Re: [PATCH 6/7] phy: miphy28lp: Inform the reset framework that our reset line may be shared

Quoted 11 lines · Kishon Vijay Abraham I
Quoted 6 lines · 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.

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

Quoted 19 lines
Quoted 19 lines
---
 drivers/phy/phy-miphy28lp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/phy/phy-miphy28lp.c +2 -1
index 3acd2a1..213e2e1 100644
@@ -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,
Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#17 lore raw

PATCH 7/7 usb: dwc3: st: Inform the reset framework that our reset line may be shared

In reply to 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.

---
 drivers/usb/dwc3/dwc3-st.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/dwc3/dwc3-st.c +4 -2
index 5c0adb9..e77bacb 100644
@@ -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);
Signature · 1 line
2.8.3
author
#18 lore raw

PATCH 8/10 phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared

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.

---
 drivers/phy/phy-stih407-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-stih407-usb.c +2 -2
index 1d5ae5f..b1f44ab 100644
@@ -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);
Signature · 1 line
2.8.3
author
#19 lore raw

PATCH 9/10 usb: host: ehci-st: Inform the reset framework that our reset line may be shared

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.

---
 drivers/usb/host/ehci-st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ehci-st.c +2 -2
index a94ed67..6cfce6f 100644
@@ -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)
Signature · 1 line
2.8.3
maintainer Acked-by on v1 9/10
#20 lore raw

Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared

Quoted 5 lines · 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.

For this andd the 10/10 patch:

author
#21 lore raw

Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared

Quoted 11 lines · Alan Stern
Quoted 5 lines · 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.

For this andd the 10/10 patch:

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.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#22 lore raw

Re: [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared

Quoted 12 lines · Lee Jones
Quoted 10 lines · Alan Stern
Quoted 5 lines · 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.

For this andd the 10/10 patch:

Quoted 7 lines
Quoted 1 line

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.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Acked-by on v1 9/10
#23 lore raw

Re: [STLinux Kernel] [PATCH 9/10] usb: host: ehci-st: Inform the reset framework that our reset line may be shared

In reply to Lee Jones
Quoted 8 lines · 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.

---
 drivers/usb/host/ehci-st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
author
#24 lore raw

PATCH 10/10 usb: host: ohci-st: Inform the reset framework that our reset line may be shared

In reply to 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.

---
 drivers/usb/host/ohci-st.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/host/ohci-st.c +2 -2
index acf2eb2..1f1f23c 100644
@@ -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;
Signature · 1 line
2.8.3
Acked-by on v1 8/10
#25 lore raw

Re: [STLinux Kernel] [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared

In reply to Lee Jones
Quoted 6 lines · 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.

Acked-by on v1 8/10
#26 lore raw

Re: [PATCH 8/10] phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared

In reply to Lee Jones
Quoted 6 lines · 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.

Quoted 25 lines
---
 drivers/phy/phy-stih407-usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/phy-stih407-usb.c +2 -2
index 1d5ae5f..b1f44ab 100644
@@ -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);
Acked-by on v1 7/7
#27 lore raw

Re: [STLinux Kernel] [PATCH 7/7] usb: dwc3: st: Inform the reset framework that our reset line may be shared

In reply to Lee Jones

Hi Lee,

Quoted 9 lines · 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.

---
 drivers/usb/dwc3/dwc3-st.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
maintainer
#28 lore raw

Re: [PATCH 7/7] usb: dwc3: st: Inform the reset framework that our reset line may be shared

In reply to Lee Jones

Am Montag, den 06.06.2016, 16:56 +0100 schrieb Lee Jones:

Quoted 15 lines

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.

---
 drivers/usb/dwc3/dwc3-st.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/usb/dwc3/dwc3-st.c +0 -0
index 5c0adb9..e77bacb 100644

drivers/usb/dwc3/dwc3-st.c static int st_dwc3_probe(struct platform_device *pdev) · line 231

Quoted 6 lines
drivers/usb/dwc3/dwc3-st.c +2 -1
@@ -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

author
#29 lore raw

PATCH 1/1 usb: dwc3: st: Inform the reset framework that our reset line may be shared

In reply to 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.

---
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(-)
drivers/usb/dwc3/dwc3-st.c +2 -1
index 5c0adb9..b204617 100644
@@ -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);
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#30 lore raw

Re: [PATCH 1/1] usb: dwc3: st: Inform the reset framework that our reset line may be shared

Hi,

Quoted 5 lines · 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.

Quoted 7 lines

---
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:

Quoted 24 lines

drivers/usb/dwc3/dwc3-st.c | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-st.c +2 -1
index 5c0adb9..b204617 100644
@@ -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);
Signature · 5 lines
2.9.0
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Signature · 8 lines
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160629/202fec8f/attachment.sig>
#31 lore raw
In reply to Lee Jones

Hi,

Quoted 9 lines · 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.

Quoted 5 lines

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.

author
#32 lore raw
Quoted 19 lines · Peter Griffin

Hi,

Quoted 9 lines · 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.

Quoted 5 lines

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.

Quoted 4 lines

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.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
author
#33 lore raw
Quoted 21 lines · Lee Jones
Quoted 19 lines · Peter Griffin

Hi,

Quoted 14 lines · 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.

Quoted 6 lines
Quoted 4 lines

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.

Signature · 4 lines
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
maintainer
#34 lore raw

Hi Lee,

Am Dienstag, den 07.06.2016, 10:24 +0100 schrieb Lee Jones:
[...]

Quoted 3 lines

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.

Quoted 4 lines

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