Skip to content
  • Stefan Roese's avatar
    i2c: designware_i2c: Add dw_i2c_enable() helper function · 1c8b089b
    Stefan Roese authored
    
    
    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: default avatarStefan 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>
    Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
    1c8b089b