con = readl(ADC_V2_CON1(info->regs));
con &= ~ADC_CON_EN_START;
writel(con, ADC_V2_CON1(info->regs));
+
+ /* Disable interrupts */
+ writel(0, ADC_V2_INT_EN(info->regs));
}
static void exynos_adc_v2_clear_irq(struct exynos_adc *info)
if (ret)
goto err_unlock;
+ enable_irq(info->irq);
+ if (info->data->init_hw)
+ info->data->init_hw(info);
+
/* Select the channel to be used and Trigger conversion */
if (info->data->start_conv)
info->data->start_conv(info, chan->address);
EXYNOS_ADC_TIMEOUT);
if (timeout == 0) {
dev_warn(&indio_dev->dev, "Conversion timed out! Resetting\n");
- if (info->data->init_hw)
- info->data->init_hw(info);
ret = -ETIMEDOUT;
} else {
*val = info->value;
ret = IIO_VAL_INT;
}
+ disable_irq(info->irq);
exynos_adc_disable_access(info);
err_unlock:
mutex_unlock(&indio_dev->mlock);
goto err_disable_clk;
}
+ disable_irq(info->irq);
exynos_adc_disable_access(info);
ret = iio_device_register(indio_dev);
if (ret)