diff options
author | Balaji T K <balajitk@ti.com> | 2010-10-04 12:08:44 +0530 |
---|---|---|
committer | Ricardo Perez Olivares <x0081762@ti.com> | 2010-10-04 15:59:19 -0500 |
commit | 3c5e915a546bea6b23e6acde9ee5e61c37ec938f (patch) | |
tree | 713abd07dc2319c881b9fdfb260567754aafa775 /include | |
parent | 9a9420a253ecbe08dd042059bd09be9ba4b56ccf (diff) |
mfd: twl6030 gpadc calibration
add support for gpadc calibration
add support to read/modify gain error and offset error via sysfs
include channel specific scaler in gpadc driver
Signed-off-by: Balaji T K <balajitk@ti.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/i2c/twl6030-gpadc.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/i2c/twl6030-gpadc.h b/include/linux/i2c/twl6030-gpadc.h index 0f94d476666f..6200246f86d1 100644 --- a/include/linux/i2c/twl6030-gpadc.h +++ b/include/linux/i2c/twl6030-gpadc.h @@ -38,6 +38,17 @@ struct twl6030_gpadc_conversion_method { #define TWL6030_GPADC_MAX_CHANNELS 17 +/* + * raw_code - raw adc value + * raw_channel_value - adc * channel gain + * code - calibrated adc value + */ +struct twl6030_value { + int raw_code; + int raw_channel_value; + int code; +}; + struct twl6030_gpadc_request { u16 channels; u16 do_avg; @@ -47,6 +58,7 @@ struct twl6030_gpadc_request { int result_pending; int rbuf[TWL6030_GPADC_MAX_CHANNELS]; void (*func_cb)(int len, int channels, int *buf); + struct twl6030_value buf[TWL6030_GPADC_MAX_CHANNELS]; }; enum conversion_methods { |