The datasheet was a bit vague, but after consultation with HW designers,
we came to the conclusion that we should set the SCP bit always when
dealing only with the ICE bit. A set SCP bit is ignored, and thus fine,
a cleared one may trigger STOP on the bus.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
if (do_init) {
/* Initialize channel registers */
- iic_wr(pd, ICCR, 0);
+ iic_wr(pd, ICCR, ICCR_SCP);
/* Enable channel and configure rx ack */
- iic_wr(pd, ICCR, ICCR_ICE);
+ iic_wr(pd, ICCR, ICCR_ICE | ICCR_SCP);
/* Set the clock */
iic_wr(pd, ICCL, pd->iccl & 0xff);
}
/* Disable channel */
- iic_wr(pd, ICCR, 0);
+ iic_wr(pd, ICCR, ICCR_SCP);
/* Disable clock and mark device as idle */
pm_runtime_put_sync(pd->dev);