From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org, Jonathan Cameron <jic23@cam.ac.uk>
Subject: Re: [PATCH 4/4] staging:iio: Proof of concept input driver.
Date: Fri, 02 Nov 2012 11:02:21 +0000 [thread overview]
Message-ID: <5093A83D.3040409@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.01.1210311513050.10186@pmeerw.net>
I actually forgot to say in this posting - I'm not really intending to
merge this driver just yet. It needs a fair bit of blugeoning then a bit
of time to be hammered by the input list before it's ready. For now its
just acting as an example user (and a means of testing the other patches).
Still the review is obviously most welcome!
Jonathan
>
>> +config IIO_ST_INPUT
>> + tristate "Input driver that uses channels specified via iio maps"
>> + depends on INPUT
>> + depends on IIO_BUFFER
>> + select IIO_BUFFER_CB
>> + help
>> + Client driver for IIO via the push interfaces. Used to provide
>> + and input interface for IIO devices that can feed a buffer on
>
> an input interface
good catch.
>
>> + * Copyright (c) 2011 Jonathan Cameron
>
> 2012 is almost over
I've not changed much in here since 2011 though so will leave it be.
Did this whilst still in accademia. Been doing a real job for a year
and this patch is still kicking around... hohum. It's been a busy year.
>
>> + case 32:
>> + switch (chan->scan_type.endianness) {
>> + case IIO_CPU:
>> + value = *(s32 *)(data);
>> + break;
>> + case IIO_BE:
>> + value = be32_to_cpu(*(__be32 *)data);
>> + break;
>> + case IIO_LE:
>> + value = le32_to_cpu(*(__le32 *)data);
>> + break;
>
> here's an extra space between le32 and *
eagle eyes :)
>
>> +static struct platform_driver iio_input_driver = {
>> + .driver = {
>> + .name = "iio_input_bridge",
>> + .owner = THIS_MODULE,
>> + },
>> + .probe = iio_input_probe,
>> + .remove = __devexit_p(iio_input_remove),
>> +};
>> +
>> +module_platform_driver(iio_input_driver);
>> +
>> +MODULE_AUTHOR("Jonathan Cameron <jic23@cam.ac.uk>");
>> +MODULE_DESCRIPTION("IIO input buffer driver");
>> +MODULE_LICENSE("GPL v2");
>> diff --git a/drivers/staging/iio/iio_input.h b/drivers/staging/iio/iio_input.h
>> new file mode 100644
>> index 0000000..cfd1d34
>> --- /dev/null
>> +++ b/drivers/staging/iio/iio_input.h
>> @@ -0,0 +1,23 @@
>> +/*
>> + * The industrial I/O input client driver
>
> this thing is called
> iio_input_bridge,
> IIO input buffer_driver,
> instrustrial I/O input client driver
> within a few lines of code -- now is the time to christen the driver :)
Fair point.
iio client driver for the input subsystem
(iio_to_input for driver name)
>
>> + *
>> + * Copyright (c) 2011 Jonathan Cameron
>> + *
>> + * This program is free software; you can redistribute it and/or modify it
>> + * under the terms of the GNU General Public License version 2 as published by
>> + * the Free Software Foundation.
>> + */
>> +
>> +/**
>> + * iio_input_channel_data - description of the channel for input subsystem
>> + * @code: Absolute axis.
>> + * @min: Minimum value.
>> + * @max: Maximum value.
>> + * @fuzz: Used to filter noise from the event stream.
>> + * @flat: Values within this value will be discarded by joydev
>> + * and reported as 0 instead.
>
> @flat: Values within the range [-flat, flat] will be discarded ...
>
> this is at least what I would guess it does; input.h is equally vague
>
I'll be honest - I'm not all that sure what it does either... Gone with your
description. We'll see what Dmitry et al say when I post it to linux-input.
>> + */
>> +struct iio_input_channel_data {
>> + unsigned int code;
>> + int min, max, fuzz, flat;
>> +};
>>
>
next prev parent reply other threads:[~2012-11-02 11:02 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-31 10:30 [PATCH 0/4 V6] staging:iio: Add support for multiple buffers (testing required!) Jonathan Cameron
2012-10-31 10:30 ` [PATCH 1/4] staging:iio: Add support for multiple buffers Jonathan Cameron
2012-10-31 10:30 ` [PATCH 2/4] staging:iio:in kernel users: Add a data field for channel specific info Jonathan Cameron
2012-10-31 10:30 ` [PATCH 3/4] staging:iio: add a callback buffer for in kernel push interface Jonathan Cameron
2012-10-31 14:10 ` Peter Meerwald
2012-11-02 10:53 ` Jonathan Cameron
2012-10-31 10:30 ` [PATCH 4/4] staging:iio: Proof of concept input driver Jonathan Cameron
2012-10-31 14:40 ` Peter Meerwald
2012-11-02 11:02 ` Jonathan Cameron [this message]
2012-11-02 11:06 ` [PATCH 0/4 V6] staging:iio: Add support for multiple buffers (testing required!) Jonathan Cameron
2012-11-10 10:26 ` Jonathan Cameron
-- strict thread matches above, loose matches on Subject: below --
2012-10-13 9:24 [PATCH 0/4 V5] " Jonathan Cameron
2012-10-13 9:24 ` [PATCH 4/4] staging:iio: Proof of concept input driver Jonathan Cameron
2012-10-13 9:57 ` Jonathan Cameron
2012-06-30 19:06 [PATCH 0/4 V3] staging:iio: Add support for multiple buffers Jonathan Cameron
2012-06-30 19:06 ` [PATCH 4/4] staging:iio: Proof of concept input driver Jonathan Cameron
2012-05-30 19:36 [PATCH 0/4 V2] staging:iio: Add support for multiple buffers Jonathan Cameron
2012-05-30 19:36 ` [PATCH 4/4] staging:iio: Proof of concept input driver Jonathan Cameron
2012-06-08 15:27 ` Lars-Peter Clausen
2012-06-09 17:56 ` Jonathan Cameron
2012-04-10 20:38 [RFC PATCH 0/4 V2] Add push based interface for non userspace iio users Jonathan Cameron
2012-04-10 20:38 ` [PATCH 4/4] staging:iio: Proof of concept input driver 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=5093A83D.3040409@kernel.org \
--to=jic23@kernel.org \
--cc=jic23@cam.ac.uk \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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).