From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH v3 2/2] iio: Add OF support Date: Tue, 5 Feb 2013 07:22:19 -0800 Message-ID: <20130205152219.GA15057@roeck-us.net> References: <1360009566-26347-1-git-send-email-linux@roeck-us.net> <1360009566-26347-3-git-send-email-linux@roeck-us.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1360009566-26347-3-git-send-email-linux-0h96xk9xTtrk1uMJSBkQmQ@public.gmane.org> Sender: linux-iio-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Jonathan Cameron Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, Naveen Krishna Chatradhi , Lars-Peter Clausen , Doug Anderson , Tomasz Figa , Grant Likely , Rob Herring , MyungJoo Ham , Chanwoo Choi , Anton Vorontsov , David Woodhouse List-Id: devicetree@vger.kernel.org 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 > --- > 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