aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-12-07 19:02:01 -0500
committerTom Rini <trini@konsulko.com>2018-12-07 19:02:01 -0500
commitc49aff3e66b930aa06936afee401cf5e19377958 (patch)
tree836506695f3a38370108ec2060f23ef2954da0f9 /arch
parent10d3e90f46feace58f4141b696d91644e594e3ed (diff)
parent8a6121ea078347de017c833e131eb4a806cf0c51 (diff)
downloadu-boot-c49aff3e66b930aa06936afee401cf5e19377958.zip
u-boot-c49aff3e66b930aa06936afee401cf5e19377958.tar.gz
u-boot-c49aff3e66b930aa06936afee401cf5e19377958.tar.bz2
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
- Various axp209 fixes - Fixes for OLinuXino-A20-Lime2 / OLinuXino-A20-Lime2-eMMC
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-sunxi/pmic_bus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/mach-sunxi/pmic_bus.c b/arch/arm/mach-sunxi/pmic_bus.c
index 5d91d7e..dea42de 100644
--- a/arch/arm/mach-sunxi/pmic_bus.c
+++ b/arch/arm/mach-sunxi/pmic_bus.c
@@ -101,6 +101,9 @@ int pmic_bus_setbits(u8 reg, u8 bits)
if (ret)
return ret;
+ if ((val & bits) == bits)
+ return 0;
+
val |= bits;
return pmic_bus_write(reg, val);
}
@@ -114,6 +117,9 @@ int pmic_bus_clrbits(u8 reg, u8 bits)
if (ret)
return ret;
+ if (!(val & bits))
+ return 0;
+
val &= ~bits;
return pmic_bus_write(reg, val);
}