iio: qcom-tadc: set all threshold comparators directions

The threshold comparators should be set to "<=". Set them.

Change-Id: I45cf6dd7f165d20e2f2dbc6fce7fd321b4ac145a
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
This commit is contained in:
Nicholas Troast 2017-02-03 15:57:36 -08:00
parent 8b06c790dd
commit 5836501ea4

View file

@ -957,6 +957,24 @@ static int tadc_init_hw(struct tadc_chip *chip)
chip->chans[TADC_DIE_TEMP].thr[2].addr_hi =
TADC_CMP_THR3_CH3_CMP_HI_REG(chip);
rc = tadc_write(chip, TADC_CMP_THR1_CMP_REG(chip), 0);
if (rc < 0) {
pr_err("Couldn't enable hardware triggers rc=%d\n", rc);
return rc;
}
rc = tadc_write(chip, TADC_CMP_THR2_CMP_REG(chip), 0);
if (rc < 0) {
pr_err("Couldn't enable hardware triggers rc=%d\n", rc);
return rc;
}
rc = tadc_write(chip, TADC_CMP_THR3_CMP_REG(chip), 0);
if (rc < 0) {
pr_err("Couldn't enable hardware triggers rc=%d\n", rc);
return rc;
}
/* enable all temperature hardware triggers */
rc = tadc_write(chip, TADC_HWTRIG_CONV_CH_EN_REG(chip),
BIT(TADC_THERM1) |