hwmon: qpnp-adc: Add PMIC QPNP IADC driver
The QPNP IADC driver supports the user bank
peripheral of the current ADC(IADC).
IADC is a 16 bit ADC used for measuring current.
The single measurement mode is supported to read
current from upto seven channel configuration.
Clients can read the internal/external Rsense,
CSP_EX, CSN_RX along with gain and offset
calibraton channels.
Change-Id: I7e5ae3fc70878d16827d33705853a36bb0aa04f6
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
diff --git a/drivers/hwmon/qpnp-adc-voltage.c b/drivers/hwmon/qpnp-adc-voltage.c
index 8b2cb97..8d6d411 100644
--- a/drivers/hwmon/qpnp-adc-voltage.c
+++ b/drivers/hwmon/qpnp-adc-voltage.c
@@ -92,8 +92,6 @@
#define QPNP_VADC_CONV_TIME_MIN 2000
#define QPNP_VADC_CONV_TIME_MAX 2100
-#define QPNP_ADC_HWMON_NAME_LENGTH 16
-
struct qpnp_vadc_drv {
struct qpnp_adc_drv *adc;
struct dentry *dent;
@@ -200,7 +198,7 @@
}
int32_t qpnp_vadc_configure(
- struct qpnp_vadc_amux_properties *chan_prop)
+ struct qpnp_adc_amux_properties *chan_prop)
{
u8 decimation = 0, conv_sequence = 0, conv_sequence_trig = 0;
int rc = 0;
@@ -374,7 +372,7 @@
static uint32_t qpnp_vadc_calib_device(void)
{
struct qpnp_vadc_drv *vadc = qpnp_vadc;
- struct qpnp_vadc_amux_properties conv;
+ struct qpnp_adc_amux_properties conv;
int rc, calib_read_1, calib_read_2;
u8 status1 = 0;