diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2014-04-13 12:18:00 +0530 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2014-04-13 05:36:21 -0700 |
commit | f1d0c94ee899b600173bc504565c813936f5c92f (patch) | |
tree | 43bdf66d727964d03b6b591e1078745d4a2a9af8 /include/dt-bindings | |
parent | fa85b6c99e4f2f335bb20bab7a214c620a9d1b7a (diff) |
iio: meter: ina3221: add dt binding header for iio channel support
Update the INA3221x DT binding documents and add dt-binding header to use
the macro from DTS file.
The updates details how it can be instantiated as iio channels and client
driver use this from DT node for measuring different parameters of different
channels. It also details the index for different signal monitor which
is require for iio channel consumer interface.
bug 1413219
Change-Id: I1c31322d4d905983e16ef132c0bd75af29fd0583
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/395549
Diffstat (limited to 'include/dt-bindings')
-rw-r--r-- | include/dt-bindings/iio/meter/ina3221x.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/dt-bindings/iio/meter/ina3221x.h b/include/dt-bindings/iio/meter/ina3221x.h new file mode 100644 index 000000000000..5f2ea665d9ee --- /dev/null +++ b/include/dt-bindings/iio/meter/ina3221x.h @@ -0,0 +1,24 @@ +/* This header provides constants for binding ti,ina3221x */ + +#ifndef _DT_BINDINGS_IIO_METER_INA3221X_H +#define _DT_BINDINGS_IIO_METER_INA3221X_H + +/* Channel numbers */ +#define INA3221_CHANNEL0 0 +#define INA3221_CHANNEL1 1 +#define INA3221_CHANNEL2 2 + +/* Monitor type */ +#define INA3221_VOLTAGE 0 +#define INA3221_CURRENT 1 +#define INA3221_POWER 3 + +/* Measurement technique normal/trigger */ +#define INA3221_NORMAL 0 +#define INA3221_TRIGGER 1 + +/* To get the iio spec index */ +#define INA3221_CHAN_INDEX(chan, type, add) \ + (chan * 5 + INA3221_##type + INA3221_##add) + +#endif |