linux/drivers/iio
Lars-Peter Clausen 7985e7c100 iio: Introduce a new fractional value type
Currently IIO uses a decimal fixed point representations for real type numbers.
This patch introduces a new representation for rational type numbers. The number
will be expressed by specifying a numerator and denominator. For converting a
raw value to a processed value multiply it by the numerator and divide it by the
denominator.

The reasoning for introducing this new type is that for a lot of devices the
scale can be represented easily by a fractional number, but it is not possible
to represent it as fixed point number without rounding.  E.g. for a simple DAC
the scale is often the reference voltage divided by the number of possible
values (Usually 2**n_bits - 1). Each driver currently implements the conversion
of this fraction to a fixed point number on its own.

Also when it comes to the in-kernel interface this allows to directly use the
fractional factors to convert a raw value to a processed value. This should on
one hand require less instructions and on the other hand increase the
precision.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
2012-09-15 10:12:22 +01:00
..
accel iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
adc iio:ad7476: Add support for ad7273/ad7274/ad7276/ad7277/ad7278 2012-09-15 10:02:16 +01:00
amplifiers iio: amplifiers: New driver for AD8366 Dual-Digital Variable Gain Amplifier 2012-05-14 13:15:39 -07:00
common iio: hid-sensors: Common attribute and trigger 2012-09-06 19:20:11 +01:00
dac iio:ad5446: Add device ids for ad5301/ad5311/ad5321 2012-09-08 10:14:46 +01:00
frequency iio: frequency: ADF4350: Fix potential reference div factor overflow. 2012-08-16 20:24:33 +01:00
gyro iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
light iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
magnetometer iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
industrialio-core.c iio: Introduce a new fractional value type 2012-09-15 10:12:22 +01:00
industrialio-event.c iio: Fix unitialized use of list 2012-07-08 20:02:24 +01:00
industrialio-trigger.c iio:trigger: Register sysfs file statically 2012-07-08 10:39:58 +01:00
industrialio-triggered-buffer.c iio: Add helper function for initializing triggered buffers 2012-06-18 17:26:09 -07:00
inkern.c iio: use IIO_CHAN_INFO_RAW rather than 0 2012-08-27 18:24:45 +01:00
Kconfig iio: hid-sensors: Added ALS 2012-09-06 19:24:15 +01:00
kfifo_buf.c iio: Drop timestamp parameter from buffer store_to callback 2012-09-08 10:14:34 +01:00
Makefile iio: hid-sensors: Added ALS 2012-09-06 19:24:15 +01:00