diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-07 19:02:01 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-07 19:02:01 -0500 |
commit | c49aff3e66b930aa06936afee401cf5e19377958 (patch) | |
tree | 836506695f3a38370108ec2060f23ef2954da0f9 /arch/arm | |
parent | 10d3e90f46feace58f4141b696d91644e594e3ed (diff) | |
parent | 8a6121ea078347de017c833e131eb4a806cf0c51 (diff) |
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/arm')
-rw-r--r-- | arch/arm/mach-sunxi/pmic_bus.c | 6 |
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 5d91d7e2c1..dea42de833 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); } |