On Mon, Feb 04, 2013 at 12:26:06PM -0800, Guenter Roeck wrote:
Provide bindings and parse OF data during initialization.
Signed-off-by: Guenter Roeck <redacted>
---
One open question is how to assign of_node to the iio device. We can either do it
in each driver (which turns out to be a huge patchset), or add something like the
following to iio_device_register.
if (!indio_dev->dev.of_node && indio_dev->dev.parent)
indio_dev->dev.of_node = indio_dev->dev.parent->of_node;
[ ... ]
+
+#else /* CONFIG_OF */
+
+static inline struct iio_channel *
+of_iio_channel_get_by_name(struct device *dev, const char *name)
+{
+ return ERR_PTR(-ENOENT);
+}
+
The above should be
static inline struct iio_channel *
of_iio_channel_get_by_name(struct device_node *np, const char *name)
{
return NULL;
}
Will be fixed in the next version.
Guenter