Skip to content
Snippets Groups Projects
Commit 10bfe7cc authored by Jeremy Fertic's avatar Jeremy Fertic Committed by Jonathan Cameron
Browse files

staging: iio: adt7316: allow adt751x to use internal vref for all dacs


With adt7516/7/9, internal vref is available for dacs a and b, dacs c and
d, or all dacs. The driver doesn't currently support internal vref for all
dacs. Change the else if to an if so both bits are checked rather than
just one or the other.

Signed-off-by: default avatarJeremy Fertic <jeremyfertic@gmail.com>
Fixes: 35f6b6b8 ("staging: iio: new ADT7316/7/8 and ADT7516/7/9 driver")
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5107d16e
No related branches found
No related tags found
No related merge requests found
......@@ -1086,7 +1086,7 @@ static ssize_t adt7316_store_DAC_internal_Vref(struct device *dev,
ldac_config = chip->ldac_config & (~ADT7516_DAC_IN_VREF_MASK);
if (data & 0x1)
ldac_config |= ADT7516_DAC_AB_IN_VREF;
else if (data & 0x2)
if (data & 0x2)
ldac_config |= ADT7516_DAC_CD_IN_VREF;
} else {
ret = kstrtou8(buf, 16, &data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment