From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934038Ab3BMODw (ORCPT ); Wed, 13 Feb 2013 09:03:52 -0500 Received: from smtp-out-084.synserver.de ([212.40.185.84]:1137 "EHLO smtp-out-083.synserver.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757353Ab3BMODu (ORCPT ); Wed, 13 Feb 2013 09:03:50 -0500 X-SynServer-TrustedSrc: 1 X-SynServer-AuthUser: lars@metafoo.de X-SynServer-PPID: 16015 Message-ID: <511B9D95.2030803@metafoo.de> Date: Wed, 13 Feb 2013 15:05:09 +0100 From: Lars-Peter Clausen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Naveen Krishna Ch CC: Guenter Roeck , Naveen Krishna Chatradhi , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, "linux-samsung-soc@vger.kernel.org" , dianders@chromium.org, gregkh@linuxfoundation.org Subject: Re: iio: adc: add exynos5 adc driver under iio framwork References: <1358917086-4148-1-git-send-email-ch.naveen@samsung.com> <20130212210732.GA8634@roeck-us.net> <511B9575.1050506@metafoo.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/13/2013 02:53 PM, Naveen Krishna Ch wrote: [...] >>> ADC driver will use of_platform_populate() to populate the child nodes >>> (ntc thermistors in my case) >>> >>> I've modified the NTC driver to support DT. in probe >>> chan = iio_channel_get(&pdev->dev, "adcX"); >>> and using "id" field to use respective ADC channel to do the raw_read() >> >> The beauty of the interface is that the consumer doesn't need to know the >> number of the channel it is using. This is already fully described in the >> io-channels property. Since you only have one channel per consumer just use >> >> iio_chanel_get(&pdev->dev, NULL) > Right this helped me get the channels properly. > > I've a doubt in the driver posted at https://lkml.org/lkml/2013/1/24/2 > i don't need to use this anymore right use iio_map_array_register() Right. > > Thats so simple then.. Thanks Yes, if you are using devicetree you don't need to use iio_map_array_register() anymore :) - Lars