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>
This commit is contained in:
Dirk Eibach 2011-03-21 17:59:37 +01:00 committed by Jean Delvare
parent fdf241a8ed
commit c0046867f3
4 changed files with 207 additions and 81 deletions

View file

@ -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 */