From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars-Peter Clausen Subject: Re: [PATCH] iio: inkern: Add of_xlate function to struct iio_dev Date: Thu, 02 Oct 2014 15:30:31 +0200 Message-ID: <542D5377.90201@metafoo.de> References: <1412253128-32165-1-git-send-email-iivanov@mm-sol.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1412253128-32165-1-git-send-email-iivanov@mm-sol.com> Sender: linux-kernel-owner@vger.kernel.org To: "Ivan T. Ivanov" , Jonathan Cameron Cc: Sachin Kamat , Srinivas Pandruvada , John Stultz , linux-iio@vger.kernel.org, svarbanov@mm-sol.com, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org On 10/02/2014 02:32 PM, Ivan T. Ivanov wrote: > When #iio-cells is greater than '0', the driver could provide > a custom of_xlate function that reads the *args* and returns > the appropriate index in registered IIO channels array. Do you have an example of a device that doesn't want to use the default mapping? If yes please include it in the commit message, otherwise it is fairly hard to say whether this makes sense or not. > > Add simple translation function, suitable for the most 1:1 > mapped channels in IIO chips, and use it when driver did not > provide custom implementation. > > Signed-off-by: Ivan T. Ivanov