aboutsummaryrefslogtreecommitdiff
path: root/include/linux/i2c
diff options
context:
space:
mode:
authorDirk Eibach2011-03-21 17:59:37 +0100
committerJean Delvare2011-03-21 17:59:37 +0100
commitc0046867f34bb81ec3f237ebbc5241ae678b8379 (patch)
treea5d9e95c3fcd09a53dac9ce88abb00f4bef4a4fc /include/linux/i2c
parentfdf241a8ed93236915c70717a4b6dfb856274496 (diff)
hwmon: (ads1015) Make gain and datarate configurable
Configuration for ads1015 gain and datarate is possible via devicetree or platform data. This is a followup patch to previous ads1015 patches on Jean Delvares tree. Signed-off-by: Dirk Eibach <eibach@gdsys.de> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'include/linux/i2c')
-rw-r--r--include/linux/i2c/ads1015.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/i2c/ads1015.h b/include/linux/i2c/ads1015.h
index 8541c6acfafd..d5aa2a045669 100644
--- a/include/linux/i2c/ads1015.h
+++ b/include/linux/i2c/ads1015.h
@@ -21,8 +21,16 @@
#ifndef LINUX_ADS1015_H
#define LINUX_ADS1015_H
+#define ADS1015_CHANNELS 8
+
+struct ads1015_channel_data {
+ bool enabled;
+ unsigned int pga;
+ unsigned int data_rate;
+};
+
struct ads1015_platform_data {
- unsigned int exported_channels;
+ struct ads1015_channel_data channel_data[ADS1015_CHANNELS];
};
#endif /* LINUX_ADS1015_H */