#include <asm/irq.h>
#include <linux/platform_data/i2c-s3c2410.h>
+#include <soc/samsung/exynos-powermode.h>
#ifdef CONFIG_CPU_IDLE
#include <soc/samsung/exynos-pm.h>
struct s3c2410_platform_i2c *pdata;
int gpios[2];
struct pinctrl *pctrl;
+ int idle_ip_index;
};
static const struct platform_device_id s3c24xx_driver_ids[] = {
int ret;
pm_runtime_get_sync(&adap->dev);
+ exynos_update_ip_idle_status(i2c->idle_ip_index, 0);
ret = clk_enable(i2c->clk);
if (ret)
return ret;
if (ret != -EAGAIN) {
clk_disable(i2c->clk);
+ exynos_update_ip_idle_status(i2c->idle_ip_index, 1);
pm_runtime_put(&adap->dev);
return ret;
}
}
clk_disable(i2c->clk);
+ exynos_update_ip_idle_status(i2c->idle_ip_index, 1);
pm_runtime_put(&adap->dev);
return -EREMOTEIO;
}
i2c->adap.class = I2C_CLASS_DEPRECATED;
i2c->tx_setup = 50;
+ i2c->idle_ip_index = exynos_get_idle_ip_index(dev_name(&pdev->dev));
+
init_waitqueue_head(&i2c->wait);
/* find the clock and enable it */