qpnp: pwm: Amend the LPG enable sequence

The LPG enable control register needs to be written
first before we write to ramp control register. The driver
currently does it in the reverse order right now. Amend the
order.

CRs-Fixed: 484327
Change-Id: I4ea0627e3bdf2ce840f5ce60cc8c63f034f146af
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
power: qpnp-charger: Fix software end of charge conditions

When charging with a charger that cannot supply high currents, the
software EOC algorithm can run into situations where it prematurely
arrives at EOC because the charging current dips below the
termination current.

Fix this by checking the VDD_LOOP_IRQ to make sure we are in constant
voltage range, and making sure there has been three consecutive EOC
counts before declaring EOC.

Change-Id: Idcb31d4ae5bf29c887ab987667d6de205f177a89
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
Merge "power: qpnp-charger: Fix software end of charge conditions"
Merge "qpnp: pwm: Amend the LPG enable sequence"
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: I810985cd9fa92a32305c819514e5be622b370556
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
msm: vidc: Refactor packetization of NAL format packet

Code cleanup to avoid unnecessary switch{..} blocks. Also introduce
hfi_nal_stream_format_select to prevent confusion with
hfi_nal_stream_format_supported

Change-Id: I691700292a6e26561948f484741d10fef1e79cda
Signed-off-by: Deva Ramasubramanian <dramasub@codeaurora.org>
msm: camera: Clear Framebased enable bit

For non-framebased writemasters, the framebased
enable bit should not be set. This change will
ensure the register is cleared. Without this change
if the hardware is not reset during mode transition,
the bit will be set for non-framebased writemasters.

Change-Id: Id6d65fbf4aecb9fdafdf251595a9b785d1cee93d
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
ASoC: msm: Ignore unexpected events from dsp

If dsp responds with an expected event, audio driver
should ignore the response and continue. Change removes
the BUG_ON and handles the error gracefully.

CRs-fixed: 495205
Change-Id: I3051a90574b36061726c691672ec28fcc8976193
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
Merge "power: qpnp-bms: Check for initialization of bms_psy"
Merge "msm: vidc: Refactor packetization of NAL format packet"
Merge "msm: camera: Clear Framebased enable bit"
Merge "ASoC: msm: Ignore unexpected events from dsp"