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@xxxxxxxxx>"); >> +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; >> +}; >> > -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html