|
|
@@ -824,7 +824,7 @@ static int mxs_lradc_read_single(struct iio_dev *iio_dev, int chan, int *val)
|
|
|
if (lradc->soc == IMX28_LRADC)
|
|
|
mxs_lradc_reg_clear(lradc, LRADC_CTRL1_LRADC_IRQ_EN(0),
|
|
|
LRADC_CTRL1);
|
|
|
- mxs_lradc_reg_clear(lradc, 0xff, LRADC_CTRL0);
|
|
|
+ mxs_lradc_reg_clear(lradc, 0x1, LRADC_CTRL0);
|
|
|
|
|
|
/* Enable / disable the divider per requirement */
|
|
|
if (test_bit(chan, &lradc->is_divided))
|
|
|
@@ -1272,7 +1272,7 @@ static int mxs_lradc_buffer_preenable(struct iio_dev *iio)
|
|
|
mxs_lradc_reg_clear(lradc,
|
|
|
lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET,
|
|
|
LRADC_CTRL1);
|
|
|
- mxs_lradc_reg_clear(lradc, 0xff, LRADC_CTRL0);
|
|
|
+ mxs_lradc_reg_clear(lradc, lradc->buffer_vchans, LRADC_CTRL0);
|
|
|
|
|
|
for_each_set_bit(chan, iio->active_scan_mask, LRADC_MAX_TOTAL_CHANS) {
|
|
|
ctrl4_set |= chan << LRADC_CTRL4_LRADCSELECT_OFFSET(ofs);
|
|
|
@@ -1305,7 +1305,7 @@ static int mxs_lradc_buffer_postdisable(struct iio_dev *iio)
|
|
|
mxs_lradc_reg_clear(lradc, LRADC_DELAY_TRIGGER_LRADCS_MASK |
|
|
|
LRADC_DELAY_KICK, LRADC_DELAY(0));
|
|
|
|
|
|
- mxs_lradc_reg_clear(lradc, 0xff, LRADC_CTRL0);
|
|
|
+ mxs_lradc_reg_clear(lradc, lradc->buffer_vchans, LRADC_CTRL0);
|
|
|
if (lradc->soc == IMX28_LRADC)
|
|
|
mxs_lradc_reg_clear(lradc,
|
|
|
lradc->buffer_vchans << LRADC_CTRL1_LRADC_IRQ_EN_OFFSET,
|