From: Jonathan Cameron <jic23@cam.ac.uk>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
zdevai@gmail.com, linus.walleij@linaro.org
Subject: Re: [PATCH] staging:iio:proof of concept in kernel interface.
Date: Thu, 13 Oct 2011 15:46:04 +0100 [thread overview]
Message-ID: <4E96F9AC.9000001@cam.ac.uk> (raw)
In-Reply-To: <20111013143224.GO1098@sirena.org.uk>
On 10/13/11 15:32, Mark Brown wrote:
> On Tue, Oct 11, 2011 at 12:43:03PM +0100, Jonathan Cameron wrote:
>
>> +struct iio_dev *iio_find_dev(const char *name);
>> +void iio_release_dev(struct iio_dev *indio_dev);
>
> This looks like it should really be clk style with a struct device and a
> back end interface that deals with mapping the provider to consumers at
> runtime.
Agreed. That definitely looks like the best discovery interface
out there at the moment. Will reroll with the equivalent.
We'll have to play a few games in the drivers to map back to the underlying
bus names so that we have consistent naming. (simple callback).
>
>> + /* read from channel 1 and exit */
>> + ret = indio_dev->info->read_raw(indio_dev, &indio_dev->channels[0], &val, &val2, 0);
>
> I guess an actual implementation would have wrappers for doing the
> indirections rather than having users peer into the ops table directly?
>
Yup, for some reason the cover letter seems to have detached from this.
It suggested exactly that. There may be weird cases where peering this
deep into the ops makes sense, but not for something like this one.
next prev parent reply other threads:[~2011-10-13 14:46 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-11 11:43 [PATCH RFC] IIO: Proof of concept in kernel interface Jonathan Cameron
2011-10-11 11:43 ` [PATCH] staging:iio:proof " Jonathan Cameron
2011-10-13 14:32 ` Mark Brown
2011-10-13 14:46 ` Jonathan Cameron [this message]
2011-10-13 20:44 ` Mark Brown
2011-10-14 15:59 ` Jonathan Cameron
2011-10-14 19:33 ` Mark Brown
2011-10-16 18:45 ` Linus Walleij
2011-10-17 9:39 ` Mark Brown
2011-10-17 9:44 ` Jonathan Cameron
2011-10-17 9:43 ` Jonathan Cameron
2011-10-17 10:19 ` Mark Brown
2011-10-17 10:32 ` Jonathan Cameron
2011-10-17 10:46 ` Mark Brown
2011-10-17 11:13 ` Jonathan Cameron
2011-10-17 11:18 ` Mark Brown
2011-10-17 11:32 ` Jonathan Cameron
2011-10-17 12:08 ` Mark Brown
2011-10-17 12:31 ` Jonathan Cameron
2011-10-17 12:48 ` Mark Brown
2011-10-17 13:03 ` Jonathan Cameron
2011-10-17 13:55 ` Mark Brown
2011-10-17 14:05 ` Jonathan Cameron
2011-10-17 13:55 ` Linus Walleij
2011-10-17 14:01 ` Jonathan Cameron
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=4E96F9AC.9000001@cam.ac.uk \
--to=jic23@cam.ac.uk \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zdevai@gmail.com \
/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).