From: Jonathan Cameron <jic23-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>,
"Ivan T. Ivanov"
<iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
Cc: Sachin Kamat
<sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Srinivas Pandruvada
<srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
John Stultz <john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] iio: inkern: Add of_xlate function to struct iio_dev
Date: Sat, 18 Oct 2014 13:14:16 +0100 [thread overview]
Message-ID: <54425998.7060808@kernel.org> (raw)
In-Reply-To: <544253F3.9060002-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
On 18/10/14 12:50, Lars-Peter Clausen wrote:
> On 10/18/2014 01:42 PM, Jonathan Cameron wrote:
>> On 02/10/14 13:32, 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 channels in IIO chips, and use it when driver did not
>>> provide custom implementation.
>>>
>>> Signed-off-by: Ivan T. Ivanov <iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org>
>> Any more comments on this? Been sat a while and the discussions seems
>> to have died out.
>>
>> As Ivan has pointed out, very similar approaches are used
>> elsewhere (gpio for example).
>
> Looks good to me:
>
> Reviewed-by: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
>
> When we initially added the DT support to IIO I was hoping that we can get away
> with just using the simple and generic xlate function for all devices. But it
> looks as if some more complex devices need to overwrite it. We should be careful
> about adding new driver specific xlate implementations and make sure that it is
> actually needed.
>
> One thing we might want to consider though is instead of adding the xlate
> callback to the iio_dev struct add it to the iio_info struct since it should be
> the same for different device instances of the same driver. And this is also
> where all the other callbacks are.
Good point - would definitely prefer that.
J
>
> - Lars
next prev parent reply other threads:[~2014-10-18 12:14 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-02 12:32 [PATCH] iio: inkern: Add of_xlate function to struct iio_dev Ivan T. Ivanov
2014-10-02 13:30 ` Lars-Peter Clausen
2014-10-02 13:49 ` Ivan T. Ivanov
2014-10-03 14:31 ` Srinivas Pandruvada
2014-10-03 15:08 ` Ivan T. Ivanov
2014-10-18 11:42 ` Jonathan Cameron
[not found] ` <5442522D.40203-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-10-18 11:50 ` Lars-Peter Clausen
[not found] ` <544253F3.9060002-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2014-10-18 12:14 ` Jonathan Cameron [this message]
[not found] ` <54425998.7060808-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-10-20 11:22 ` Ivan T. Ivanov
2014-10-18 17:13 ` Srinivas Pandruvada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54425998.7060808@kernel.org \
--to=jic23-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=iivanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org \
--cc=john.stultz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=linux-arm-msm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-iio-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=sachin.kamat-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=svarbanov-NEYub+7Iv8PQT0dZR+AlfA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).