
21 Apr
2016
21 Apr
'16
10:06 a.m.
On Thu, Apr 21, 2016 at 2:19 PM, Stefan Roese sr@denx.de wrote:
dw_i2c_enable() is used to dis-/en-able the I2C controller. It makes sense to add such a function, as the controller is dis-/en-abled multiple times in the code. Additionally, this function now checks, if the controller is really dis-/en-abled. This code is copied from the Linux I2C driver version.
Signed-off-by: Stefan Roese sr@denx.de Cc: Simon Glass sjg@chromium.org Cc: Bin Meng bmeng.cn@gmail.com Cc: Marek Vasut marex@denx.de Cc: Heiko Schocher hs@denx.de
v4:
- Rebased on latest mainline
v3:
- Rework dw_i2c_enable() as suggested by Marek
v2:
- Use true / false for binary values as suggested by Bin
drivers/i2c/designware_i2c.c | 47 +++++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 20 deletions(-)
Reviewed-by: Bin Meng bmeng.cn@gmail.com