Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-11-03 Thread Ivan T. Ivanov
On Mon, 2014-11-03 at 11:31 +0100, Lars-Peter Clausen wrote: > On 11/03/2014 11:07 AM, Ivan T. Ivanov wrote: > > On Sat, 2014-10-25 at 11:04 +0100, Jonathan Cameron wrote: > > > On 22/10/14 16:32, Lars-Peter Clausen wrote: > > > > On 10/22/2014 05:29 PM, Ivan T. Ivanov wrote: > > > > > When #iio-c

Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-11-03 Thread Ivan T. Ivanov
On Mon, 2014-11-03 at 02:36 -0800, Srinivas Pandruvada wrote: > On Mon, 2014-11-03 at 12:07 +0200, Ivan T. Ivanov wrote: > > On Sat, 2014-10-25 at 11:04 +0100, Jonathan Cameron wrote: > > > On 22/10/14 16:32, Lars-Peter Clausen wrote: > > > > On 10/22/2014 05:29 PM, Ivan T. Ivanov wrote: > > > > >

Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-11-03 Thread Srinivas Pandruvada
On Mon, 2014-11-03 at 12:07 +0200, Ivan T. Ivanov wrote: > On Sat, 2014-10-25 at 11:04 +0100, Jonathan Cameron wrote: > > On 22/10/14 16:32, Lars-Peter Clausen wrote: > > > On 10/22/2014 05:29 PM, Ivan T. Ivanov wrote: > > > > When #iio-cells is greater than '0', the driver could provide > > > > a

Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-11-03 Thread Lars-Peter Clausen
On 11/03/2014 11:07 AM, Ivan T. Ivanov wrote: On Sat, 2014-10-25 at 11:04 +0100, Jonathan Cameron wrote: On 22/10/14 16:32, Lars-Peter Clausen wrote: On 10/22/2014 05:29 PM, Ivan T. Ivanov wrote: When #iio-cells is greater than '0', the driver could provide a custom of_xlate function that rea

Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-11-03 Thread Ivan T. Ivanov
On Sat, 2014-10-25 at 11:04 +0100, Jonathan Cameron wrote: > On 22/10/14 16:32, Lars-Peter Clausen wrote: > > On 10/22/2014 05:29 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 > > > t

Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-10-25 Thread Jonathan Cameron
On 22/10/14 16:32, Lars-Peter Clausen wrote: > On 10/22/2014 05:29 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. >> >> Add simple t

Re: [PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-10-22 Thread Lars-Peter Clausen
On 10/22/2014 05:29 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. Add simple translation function, suitable for the most 1:1 mapped chann

[PATCH v2] iio: inkern: Add of_xlate function to struct iio_info

2014-10-22 Thread Ivan T. Ivanov
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. Add simple translation function, suitable for the most 1:1 mapped channels in IIO chips, and use it when driver did not