LTSI-v4.14 Backport or I2C R-Car Fix

Base:
* v4.14.61
* Backports of components for Renesas SoCs to v4.18

Backport of post-v4.18 fix for i2c-rcar:
* implement STOP and REP_START according to docs

Dependency of above
* Refactor private flags of i2c-rcar driver
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEE4nzZofWswv9L/nKF189kaWo3T74FAluFNMUACgkQ189kaWo3
T74TPxAAhzg4KYbVFPaQIJE1sJWl7UjHUhGz6nFeiIOzQj0rpVsNRcoUEEzD9zIs
Ffg1L+wjMM0TF7b2uGRvKdoumzyp9W4UYbGhVq4Rx1zpZ7dcUALech/1wX3CCpyw
JXV7j6jNw1QRIdNZEqTGRoAfYMCDleKqTzkwQfdHHPQEPUg4QRmy5MFHN0MOvh4A
GO+0ZOOJZxWGtqoB4NHwz+EsNV/WP67PmB/zwqUkGzSoCJeEHppQciTLiFQM3rYS
Ov75nXhTFVvsWvjtyrQFXz9nNiMuptUnvOD3Yg4nUcvPodhZsOsQyEkG2ilBsKbf
sPsxTh8/T7Y76g2SpCT4AFUVc/MsFvg3ijztNscUUvW9eDGrY9GoKhlEW4StE6Rd
rkHVf+D+4M1IHMFIvchKMilMEuTE0hveAWX9yiHYsWtMWJ+1t9LsVkcl4IYacNd+
MnZ82odzhSdsiVgSuhmhUkbPuleNgpPAfzPuCNMOQur8dASnmidOMU6A375XG03/
RmOWbwWPLffi90TGA5UBi0FoyEIOQkEM4f/SNaI2P2fNxg380bOsNtSvLes8K1Bx
s1+bS4suTQ/hggWcJLknQF6UIxvXTgnfJScMcp7j/EdHMPzXgdTYo8mNUIRCBr9k
tukHmWqjb0GvgQ1PX6dQshaE/oWP6Ob4qWJbMH3QkI2knSZZ33k=
=RY43
-----END PGP SIGNATURE-----
i2c: rcar: implement STOP and REP_START according to docs

When doing a REP_START after a read message, the driver used to trigger
a STOP first which would then be overwritten by REP_START. This was the
only stable method found when doing the last refactoring. However, this
was not in accordance with the documentation.

After research from our BSP team and myself, we now can implement a
version which works and is according to the documentation. The new
approach ensures the ICMCR register is only changed when really needed.

Tested on a R-Car Gen2 (H2) and Gen3 with DMA (M3N).

Signed-off-by: Hiromitsu Yamasaki <hiromitsu.yamasaki.ym@renesas.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Ulrich Hecht <uli+renesas@fpond.eu>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
(cherry picked from commit 19358d4488db7e6a04e940730cc75909d7d1e0d8)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
1 file changed