Thread (15 messages) 15 messages, 4 authors, 2016-02-08

[PATCH v3 1/3] reset: Make [of_]reset_control_get[_foo] functions wrappers

flat view
STALE3906d SUPERSEDED

From: Hans de Goede <hidden>
Date: 2016-02-05 18:30:30

Revision v3 of 4 in this series.

Revisions (4)
  1. v3
  2. v3
  3. v3 current
  4. v4 [diff vs current]
Hi,

On 04-02-16 17:54, Philipp Zabel wrote:
Hi Hans,

Am Mittwoch, den 27.01.2016, 19:15 +0100 schrieb Hans de Goede:
[...]
quoted
+/**
+ * reset_control_get - Lookup and obtain a reference to a reset controller.
+ * @dev: device to be reset by the controller
+ * @id: reset line name
+ *
+ * Returns a struct reset_control or IS_ERR() condition containing errno.
+ *
+ * Use of id names is optional.
+ */
+static inline struct reset_control *__must_check reset_control_get(
  					struct device *dev, const char *id)
  {
-	return ERR_PTR(-ENOTSUPP);
+#ifndef CONFIG_RESET_CONTROLLER
+	WARN_ON(1);
+#endif
+	return __of_reset_control_get(dev ? dev->of_node : NULL, id, 0);
Even though we are device tree only at this point, I'd prefer to keep an
exported function that takes a struct device argument, for example:

	return __reset_control_get(dev, id, 0);
I don't really see a reason to do this, this is not userspace abi or some-such
we can always later re-introduce an exported function which takes a device
argument. But if you insist, you're the boss :)  Let me know if you really
want me to make this change for the next version, and I'll add it to v4 of this
set.

Regards,

Hans
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help