diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2017-11-02 13:47:30 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2017-11-27 18:53:07 +0100 |
commit | 832a522a3ef5e96b517163ee7d4c249545d88626 (patch) | |
tree | ebad3346e5a8e8e2dfc494631609e3b807f194c1 /drivers/i2c/busses/i2c-sh_mobile.c | |
parent | i2c: sh_mobile: manually "inline" two short functions (diff) | |
download | linux-832a522a3ef5e96b517163ee7d4c249545d88626.tar.xz linux-832a522a3ef5e96b517163ee7d4c249545d88626.zip |
i2c: sh_mobile: use direct writes when accessing ICE bit
ICE bit is for resetting the module. Other bits don't matter then, so we
don't need to use the iic_set_clr() function but can use iic_wr().
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-sh_mobile.c')
-rw-r--r-- | drivers/i2c/busses/i2c-sh_mobile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 02c2912bebb4..72c9483db769 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c @@ -620,10 +620,10 @@ static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg, if (do_init) { /* Initialize channel registers */ - iic_set_clr(pd, ICCR, 0, ICCR_ICE); + iic_wr(pd, ICCR, 0); /* Enable channel and configure rx ack */ - iic_set_clr(pd, ICCR, ICCR_ICE, 0); + iic_wr(pd, ICCR, ICCR_ICE); /* Set the clock */ iic_wr(pd, ICCL, pd->iccl & 0xff); @@ -740,7 +740,7 @@ static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter, } /* Disable channel */ - iic_set_clr(pd, ICCR, 0, ICCR_ICE); + iic_wr(pd, ICCR, 0); /* Disable clock and mark device as idle */ clk_disable_unprepare(pd->clk); |