aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/i2c.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/i2c.c')
-rw-r--r--arch/arm/mach-omap2/i2c.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/i2c.c b/arch/arm/mach-omap2/i2c.c
index fbb9b152cd5e..df6d6acbc9ed 100644
--- a/arch/arm/mach-omap2/i2c.c
+++ b/arch/arm/mach-omap2/i2c.c
@@ -120,6 +120,16 @@ static int __init omap_i2c_nr_ports(void)
120 return ports; 120 return ports;
121} 121}
122 122
123/*
124 * XXX This function is a temporary compatibility wrapper - only
125 * needed until the I2C driver can be converted to call
126 * omap_pm_set_max_dev_wakeup_lat() and handle a return code.
127 */
128static void omap_pm_set_max_mpu_wakeup_lat_compat(struct device *dev, long t)
129{
130 omap_pm_set_max_mpu_wakeup_lat(dev, t);
131}
132
123static const char name[] = "omap_i2c"; 133static const char name[] = "omap_i2c";
124 134
125int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata, 135int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
@@ -157,6 +167,15 @@ int __init omap_i2c_add_bus(struct omap_i2c_bus_platform_data *i2c_pdata,
157 dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr; 167 dev_attr = (struct omap_i2c_dev_attr *)oh->dev_attr;
158 pdata->flags = dev_attr->flags; 168 pdata->flags = dev_attr->flags;
159 169
170 /*
171 * When waiting for completion of a i2c transfer, we need to
172 * set a wake up latency constraint for the MPU. This is to
173 * ensure quick enough wakeup from idle, when transfer
174 * completes.
175 * Only omap3 has support for constraints
176 */
177 if (cpu_is_omap34xx())
178 pdata->set_mpu_wkup_lat = omap_pm_set_max_mpu_wakeup_lat_compat;
160 pdev = omap_device_build(name, bus_id, oh, pdata, 179 pdev = omap_device_build(name, bus_id, oh, pdata,
161 sizeof(struct omap_i2c_bus_platform_data), 180 sizeof(struct omap_i2c_bus_platform_data),
162 NULL, 0, 0); 181 NULL, 0, 0);