Commit 10ecb80e8cb450f5b10c9aff168842c9a3c949ef

Authored by Laxman Dewangan
Committed by Samuel Ortiz
1 parent 7aae79fd88

mfd: tps65910: Initialize mfd devices after all initialization done

Add sub devices of tps65910 after all initialization like interrupt,
clock etc. is done. This will make sure that require data gets
initialized properly before sub devices probe's get called.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

Showing 1 changed file with 8 additions and 8 deletions Side-by-side Diff

drivers/mfd/tps65910.c
... ... @@ -279,14 +279,6 @@
279 279 return ret;
280 280 }
281 281  
282   - ret = mfd_add_devices(tps65910->dev, -1,
283   - tps65910s, ARRAY_SIZE(tps65910s),
284   - NULL, 0, NULL);
285   - if (ret < 0) {
286   - dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
287   - return ret;
288   - }
289   -
290 282 init_data->irq = pmic_plat_data->irq;
291 283 init_data->irq_base = pmic_plat_data->irq_base;
292 284  
... ... @@ -297,6 +289,14 @@
297 289 if (pmic_plat_data->pm_off && !pm_power_off) {
298 290 tps65910_i2c_client = i2c;
299 291 pm_power_off = tps65910_power_off;
  292 + }
  293 +
  294 + ret = mfd_add_devices(tps65910->dev, -1,
  295 + tps65910s, ARRAY_SIZE(tps65910s),
  296 + NULL, 0, NULL);
  297 + if (ret < 0) {
  298 + dev_err(&i2c->dev, "mfd_add_devices failed: %d\n", ret);
  299 + return ret;
300 300 }
301 301  
302 302 return ret;