projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
91a5e63
)
i2c: sh_mobile: use direct writes when accessing ICE bit
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Thu, 2 Nov 2017 12:47:30 +0000
(13:47 +0100)
committer
Wolfram Sang
<wsa@the-dreams.de>
Mon, 27 Nov 2017 17:53:07 +0000
(18:53 +0100)
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>
drivers/i2c/busses/i2c-sh_mobile.c
patch
|
blob
|
history
diff --git
a/drivers/i2c/busses/i2c-sh_mobile.c
b/drivers/i2c/busses/i2c-sh_mobile.c
index 02c2912bebb4fe6512a124f59174bc3cf737a118..72c9483db769a52b37a90f75fbb997bcf8ddcb89 100644
(file)
--- 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);