mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-24 23:52:40 +00:00
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:
parent
fdf241a8ed
commit
c0046867f3
4 changed files with 207 additions and 81 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue