| /* |
| * ./kernel_modules/qcom-adc/ads7924-regdefs.h |
| * |
| * ads7924-regdefs.h - Register definitions for TI ADS7924 4-channel A/D |
| * converter |
| * |
| * Author: Cradlepoint Technology, Inc. <source@cradlepoint.com> |
| * Kyle Swenson <kswenson@cradlepoint.com> |
| * Copied from the ADS7924 Datasheet, publicly available from TI |
| * |
| * This program is free software; you can redistribute it and/or modify it |
| * under the terms of the GNU General Public License as published by the Free |
| * Software Foundation; either version 2 of the License, or (at your option) |
| * any later version. |
| * |
| * This program is distributed in the hope that it will be useful, but WITHOUT |
| * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for |
| * more details. |
| * |
| */ |
| |
| #ifndef __ADS7924_H__ |
| #define __ADS7924_H__ |
| |
| |
| /*Register definitions */ |
| enum { |
| ADS7924_REG_MODECNTRL = 0, |
| ADS7924_REG_INTCNTRL, |
| ADS7924_REG_DATA0_U, |
| ADS7924_REG_DATA0_L, |
| ADS7924_REG_DATA1_U, |
| ADS7924_REG_DATA1_L, |
| ADS7924_REG_DATA2_U, |
| ADS7924_REG_DATA2_L, |
| ADS7924_REG_DATA3_U, |
| ADS7924_REG_DATA3_L, |
| ADS7924_REG_ULR0, |
| ADS7924_REG_LLR0, |
| ADS7924_REG_ULR1, |
| ADS7924_REG_LLR1, |
| ADS7924_REG_ULR2, |
| ADS7924_REG_LLR2, |
| ADS7924_REG_ULR3, |
| ADS7924_REG_LLR3, |
| ADS7924_REG_INTCONFIG, |
| ADS7924_REG_SLPCONFIG, |
| ADS7924_REG_ACQCONFIG, |
| ADS7924_REG_PWRCONFIG, |
| ADS7924_REG_RESET |
| }; |
| |
| #define ADS7924_MODE_IDLE 0x0 |
| #define ADS7924_MODE_AWAKE 0x20 |
| #define ADS7924_MODE_MANUAL_SINGLE 0x30 |
| #define ADS7924_MODE_MANUAL_SCAN 0x32 |
| #define ADS7924_MODE_AUTO_SINGLE 0x31 |
| #define ADS7924_MODE_AUTO_SCAN 0x33 |
| #define ADS7924_MODE_AUTO_SINGLE_WITH_SLEEP 0x39 |
| #define ADS7924_MODE_AUTO_SCAN_WITH_SLEEP 0x3B |
| #define ADS7924_MODE_AUTO_BURST_WITH_SLEEP 0x3F |
| |
| enum { |
| ADS7924_CH_0 = 0, |
| ADS7924_CH_1, |
| ADS7924_CH_2, |
| ADS7924_CH_3, |
| ADS7924_CH_INVALID |
| }; |
| #endif |