rtc: qpnp-rtc: Add module parameter to control power-on alarm

Power-on alarm feature can be enabled/disabled by writing 1/0
to the module parameter exported by driver.

CRs-Fixed: 432312
Change-Id: I2a2337adb2ddc186ec312648b11b6a35ea698856
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
regulator: qpnp-regulator: Don't print errors during probe deferral

Make the error printing statements after the qpnp-regulator
drivers calls regulator_register() conditional upon the error
code not being -EPROBE_DEFER.  This removes some unnecessary
kernel log messages that take place when a qpnp-regulator device
attempts to probe before its parent regulator.

Change-Id: I92d4ed61a238d384bae43458e3ca86c0079380c0
Signed-off-by: David Collins <collinsd@codeaurora.org>
power: qpnp-bms: Fix SoC smoothing upon resume

Currently the BMS driver tries to smooth out SoC jumps by limiting
the percent SoC change by the time since the last SoC change.
However, this can lead to an issue where report_state_of_charge is
called before SoC can be unbound. This will increment SoC by 1, but
create a situation where SoC is stuck when the time elapsed gets
reset.

Fix this by resetting the time elapsed only when doing an unbound
SoC report.

Change-Id: I6bdcc8d40b79653b003cc372570091f8adb30164
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: detect constant voltage charging more accurately

Raise the CV charging threshold now that vddmax adjustments have been
implemented. Before, the BMS driver had to keep a 20 millivolt margin
because there was no guarantee that the charger will hit the set
max voltage. Now that the charger driver guarantees hitting within 5
millivolts of the max voltage, increase the CV detection threshold in
order to detect CV charging more accurately.

This change will smooth out the charging curve when the charger
transitions from CC to CV charging.

Change-Id: I0e399d9964866cc4cf2e7965f0d7d7be9bfab2ff
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: Prevent SoC from being stuck after EoC

Currently, there is a race condition in the BMS driver that may cause
the State of Charge reported to be stuck after hitting end of charge.
This is because calculated SoC could change from 99 to 100 after
report state of charge checks the SoC value, but before it uses it.

Fix this by locking the calculated SoC update with a mutex

Change-Id: I3894dd8d3cd0d9b457955357e68c1daed00b5f9e
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: Check for initialization of bms_psy

There is currently a bug in the BMS driver that can cause a kernel
panic. The if an ADC notification arrives before the BMS power supply
is registered, the BMS driver can cause a spin lock bad magic because
the bms_psy is not yet registered.

Fix this by checking if the power supply is registered before calling
power_supply_changed.

Change-Id: I48a46996f189ad9c71caa910486198cfba09db29
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Signed-off-by: Shashank Babu Chinta Venkata <sbchin@codeaurora.org>
Sensors: Add Avago APDS9930 driver

Add Avago APDS9930 driver for proximity/Light sensor

Change-Id: Ifd2a6a37356e48cdc68a38c55e555222d7339c99
Signed-off-by: chohee.park <chohee.park@lge.com>
Signed-off-by: Devin Kim <dojip.kim@lge.com>
arm/dt: msm8974-leds: Increase flash LED current

By increasing LED flash current, camera gets better
image quality.

Signed-off-by: Sushmitha Gummalla <sgumma@codeaurora.org>
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
msm: audio: initialize the structure before sending to user space

If uninitialzied structure is passed from kernel to user space, it
may contain sensitive information that will be leaked.

Change-Id: Ie7c4568c78df8cbd1efeff559848058c2163b0b8
Signed-off-by: Fred Oh <fred@codeaurora.org>
Signed-off-by: Ajay Dudani <adudani@codeaurora.org>