Skip to content

Commit

Permalink
i2c: omap: Restore i2c context always
Browse files Browse the repository at this point in the history
Currently the restore is done based on the flag
OMAP_I2C_FLAG_RESET_REGS_POSTIDLE.

This helps the following
- The driver is always capable of restoring regardless
of the off mode support being there or not.

- While testing omap2430 it is found that in case of certain
error paths (timeout) a reset is done. However the restore
never happens as it is dependent on the POSTIDLE flag.
The other option would be to call a restore in the reset
case. As there are only a few registers to be restored
the penalty in the idle case should not be much.

Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
  • Loading branch information
Shubhrajyoti D authored and Wolfram Sang committed Nov 14, 2012
1 parent d6c842a commit 554c967
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/i2c/busses/i2c-omap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1327,8 +1327,7 @@ static int omap_i2c_runtime_resume(struct device *dev)
if (!_dev->regs)
return 0;

if (_dev->flags & OMAP_I2C_FLAG_RESET_REGS_POSTIDLE)
__omap_i2c_init(_dev);
__omap_i2c_init(_dev);

return 0;
}
Expand Down

0 comments on commit 554c967

Please sign in to comment.