sunxi: pmic_bus: Decrease boot time by not writing duplicate data
authorOlliver Schinagl <oliver@schinagl.nl>
Wed, 21 Nov 2018 18:05:26 +0000 (20:05 +0200)
committerJagan Teki <jagan@amarulasolutions.com>
Fri, 7 Dec 2018 16:54:33 +0000 (22:24 +0530)
commitc970e8954f084b543d241fd96c0377988d8d4971
tree7c3d032c79fabde59020fc1733da7a97f21a8b45
parenta8011eb84dfac5187cebf00ed8bc981bdb5c1fa1
sunxi: pmic_bus: Decrease boot time by not writing duplicate data

When we clear a pmic_bus bit, we do a read-modify-write operation.
We waste some time however, by writing back the exact samea value
that was already set in the chip. Let us thus only do the write
in case data was changed.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Priit Laes <plaes@plaes.org>
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
arch/arm/mach-sunxi/pmic_bus.c