power: qpnp-bms: Improve logic for storing FCC learnt data

BMS module supports 16 (8-bit) battery backed-up registers.
Make sure that while backing-up the new data, always replace
the oldest stored data.

CRs-Fixed: 730047
Change-Id: I5fc406ec24ce242b722926cc1096f7dcaf561656
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>
qcom: rpm-smd: Mask the interrupt before sending the sleep set.

Sending a sleep set would cause an SMD interrupt to fire. If the
interrupt was previously affine to a different CPU, it could cause a
premature wakeup of that CPU. Prevent this by masking the interrupt
before sending the sleep set.

Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: Jake Weinstein <xboxlover360@gmail.com>