Re: [PATCH 4/4] staging:iio: Proof of concept input driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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

> + * Copyright (c) 2011 Jonathan Cameron

2012 is almost over

> +		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 *

> +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 :)

> + *
> + * 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

> + */
> +struct iio_input_channel_data {
> +	unsigned int code;
> +	int min, max, fuzz, flat;
> +};
> 

-- 

Peter Meerwald
+43-664-2444418 (mobile)
--
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


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux