power: core: add set_voltage_limit API

Add the power_supply_set_voltage_limit API which
allows the POWER_SUPPLY_PROP_VOLTAGE_MAX property
to be configured for a given power supply.

CRs-Fixed: 637169
Change-Id: Ib525366ff742ad31d81ffee75920c19a6f9e8de8
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
power: qpnp-charger: take into account charge path priority

On the SMBB peripheral there is a possibility of having
both the USB and DC input being connected at the same time.
In this situation there is a requirement to be able to communicate
to userspace services that the higher priority input was
inserted so appropriate action can be taken.

This is achieved as follows:

1. If DC has the higher priority, the USB input
current limit will be reduced to 100 mA to avoid
charging from the USB path.

2. If USB has priority the DC input current
limit will be reduced to 100 mA to avoid charging
from the DC path.

3. Upon the removal of the priority charge path
the secondary charge path input current limit
will be restored to allow charging.

CRs-Fixed: 637169
Change-Id: Id5b61103b9f1d8f32ffd707d2512972c1a310108
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
mdss: Add newline to VSYNC timestamp for mdp3 driver

This makes sure that the userspace correctly interprets the end
of the vsync timestamp.

CRs-Fixed: 639039
Change-Id: I8a0810283a42a9c39a3c8fe36b862bbfd3ecdbea
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
rtc:alarm: remove alarm_shutdown hook in alarm driver

Putting alarm_shutdown into set_power_on_alarm is to set rtc alarm
time immediately after an alarm being set. It can avoid shutting
down unexpectedly before calling alarm_shutdown hook like removing
battery.Then power_on_alarm will be set to rtc twice when an alarm
is created and the device performs shutdown for a power off alarm.
The set process during shutting down is duplicated to the set
process when an alarm is created. So the alarm_shutdown hook become
unnecessary.

CRs-Fixed: 639119
Change-Id: Ie46bcf6f568f04650d94ba40ad6d4521d31a2f96
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
alarm : Fix the race conditions in alarm-dev.c

There will be race conditions between alarm set and alarm clear if
set_power_on_alarm is out of the lock.But set_power_on_alarm can't
be put into spin_lock. So add it into mutex_lock.

CRs-Fixed: 639115
Change-Id: I1db4836f67174b756c7f9d231f7a39cf0377d2c2
Signed-off-by: Xiaocheng Li <lix@codeaurora.org>
Merge "power: core: add set_voltage_limit API"
Merge "power: qpnp-charger: take into account charge path priority"
Merge "rtc:alarm: remove alarm_shutdown hook in alarm driver"
Merge "alarm : Fix the race conditions in alarm-dev.c"
ASoC: msm: Fix for wma playback after SSR

After SSR apr session doesn't get destroyed as
the callback from apr driver doesn't come.Fix
this by not doing NULL allocation in q6asm callback.

Change-Id: Idfec89dfd06075fec4199869354bdcb9e01a3dc9
Signed-off-by: Anish Kumar <kanish@codeaurora.org>
slim_msm: ngd: Return success for channel removal during ADSP SSR

Slimbus master component resides on ADSP when this driver is used.
Wehn ADSP restarts, slimbus component goes down and bus is not
operational until it comes back up. During restart, slimbus clients
are notified since their device goes down, and the clients remove
channels and/or disconnect ports. Since bus is not operational,
return success for channel removal/port disconnection calls so that
the channel, port state is consistent with HW (not active, removed)

Change-Id: Ia2707ed9f3fc3573b5746c8e42fa7f229e0dea4f
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Merge "ASoC: msm: Fix for wma playback after SSR"
Merge "slim_msm: ngd: Return success for channel removal during ADSP SSR"
Slim_ngd: Don't create the device node per SSR

Observe the device crash due to the device node
gets created per ADSP SSR when the logical address
query succeeds at the first attempt.
This patch makes sure that the device node creation
happened only once  by declaring another variable to
track the logical address retry.

CRs-Fixed: 640381
Change-Id: I3d947fcbc575af7cb431255772aa9cb64d2df6b6
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Merge "Merge "alarm : Fix the race conditions in alarm-dev.c""
Merge "Merge "Merge "alarm : Fix the race conditions in alarm-dev.c"""
Merge "Merge "slim_msm: ngd: Return success for channel removal during ADSP SSR""
Merge "Merge "Merge "slim_msm: ngd: Return success for channel removal during ADSP SSR"""
Merge "Merge "slim_msm: ngd: Return success for channel removal during ADSP SSR""
Merge "Merge "Merge "slim_msm: ngd: Return success for channel removal during ADSP SSR"""