#include <linux/mfd/syscon.h>
#include <linux/regmap.h>
-#include <linux/platform_data/touchscreen-s3c2410.h>
+#include <soc/samsung/exynos-powermode.h>
/* S3C/EXYNOS4412/5250 ADC_V1 registers definitions */
#define ADC_V1_CON(x) ((x) + 0x00)
u32 value;
unsigned int version;
-
- bool read_ts;
- u32 ts_x;
- u32 ts_y;
+ int idle_ip_index;
};
struct exynos_adc_data {
{
int ret;
+ exynos_update_ip_idle_status(info->idle_ip_index, 0);
if (info->needs_adc_phy)
regmap_write(info->pmu_map, info->data->phy_offset, 1);
if (info->vdd) {
ret = regulator_enable(info->vdd);
if (ret)
- return ret;
+ goto err;
}
ret = exynos_adc_prepare_clk(info);
err_disable_reg:
if (info->vdd)
regulator_disable(info->vdd);
+err:
+ if (info->needs_adc_phy)
+ regmap_write(info->pmu_map, info->data->phy_offset, 0);
+ exynos_update_ip_idle_status(info->idle_ip_index, 1);
return ret;
}
if (info->needs_adc_phy)
regmap_write(info->pmu_map, info->data->phy_offset, 0);
+ exynos_update_ip_idle_status(info->idle_ip_index, 1);
}
static void exynos_adc_v1_init_hw(struct exynos_adc *info)
ret = IIO_VAL_INT;
}
+ if (info->data->exit_hw)
+ info->data->exit_hw(info);
+
disable_irq(info->irq);
exynos_adc_disable_access(info);
err_unlock:
info->tsirq = irq;
info->dev = &pdev->dev;
+ info->idle_ip_index = exynos_get_idle_ip_index(dev_name(&pdev->dev));
init_completion(&info->completion);