max17042_battery: Fix rempcap calculation and another bug

Fix rempcap calculation to follow the implimentation guide from Maxim.
Set empty_tempco and kempty0 values in max17042 part only. Previously, these
settings were programmed in any part but max17042 which was wrong since
max17042 is the only part that uses these settings.

cherry picked from minnow line.

Signed-off-by: Dmitriy Gruzman <dgruzman@motorola.com>
Reviewed-by: Jason Knopsnyder <gerritmailarchive@motorola.com>
power: max17042: Default to EG30 Data

In case the the Device tree config does not exist
default back to the EG30 LG Data.

Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-by: Jason Knopsnyder <gerritmailarchive@motorola.com>
Revert "msm: kgsl: Add uintptr_t cast for gpuaddr"

This change depends on a commit shown below which is being reverted and
replaced with a more secure solution that doesn't require world read
access to the debugfs file kgsl/proc/#/mem.

cff6fde msm: kgsl: use %pK to restrict printing GPU / memory addresses

This reverts commit 01869c349a24358a6524a37a841f789309440337.

Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
Revert "msm: kgsl: use %pK to restrict printing GPU / memory addresses"

This change will be replaced with a more secure solution that doesn't
require world read access to the debugfs file kgsl/proc/#/mem.

This reverts commit cff6fde10fdd1155186bb61cc141ff288bb2dc36.

Change-Id: I445eaaf05c4039b40260742242675d0f3fa849d9
Signed-off-by: Fred Fettinger <fred.fettinger@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
msm: kgsl: inherit owner from kgsl/proc debug directory

Make all entries under kgsl/proc inherit its owner's uid/gid.

[ccross]
Reapplid after it was overwritten by another patch.

Bug: 10550827
Signed-off-by: Rom Lemarchand <romlem@google.com>
Signed-off-by: Colin Cross <ccross@google.com>
(cherry picked from commit 26fb82228b127212627d24050db243e7d6e54ef8)
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
input: atmel_mxt_ts_mmi: reflash in edge triggered irq mode

Level triggered IRQ was not properly handling touch firmware upgrade
when every IRQ line move depicts a state change. Although IRQF_ONESHOT
option should have ensured only single interrupt is firing, MSM does
not seem to handle it properly. Thus driver switches to edge triggered
IRQ for the duration of firmware reflash.

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
input: atmel_mxt_ts_mmi: remove unused lable

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-by: Ravi Chebolu <arc095@motorola.com>
Reviewed-by: Yi-Wei Zhao <gbjc64@motorola.com>
msm: camera: extend flash intf for factory

Factory production requires direct i2c access to camera flash HW.

Signed-off-by: Sergii Kovalchuk <kjr678@motorola.com>
Reviewed-by: Dave Schmidt <d.schmidt@motorola.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
arm: defconfig: Enable QCOM ESD detection.

Enable QCOM ESD detection/recovery feature

Signed-off-by: Bang Nguyen <bnguyen1@motorola.com>
Reviewed-by: Zachary Crosby <zac@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
msm: mdss: Make ESD check interval configurable

Export mdss_dsi_status ESD checking interval interface to change
at run-time.

Signed-off-by: Bang Nguyen <bnguyen1@motorola.com>
Reviewed-by: Zachary Crosby <zac@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
msm: mdss: fix race condition of ESD status check

Add a mutex to serialize the FB blank/unblank and ESD check_status to
prevent the ESD check_status runs while Display is off.

Change-Id: Ie8b79b5ea62a013b842aaf0c72e8319992368a6c
Signed-off-by: Bang Nguyen <bnguyen1@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Reviewed-by: Zachary Crosby <zac@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
msm: mdss: Change ESD check_status interval to 8s

Change ESD check_status intervel to 8 seconds to match with
ESD detecyion and recovery requirement

Signed-off-by: Bang Nguyen <bnguyen1@motorola.com>
Reviewed-by: Zachary Crosby <zac@motorola.com>
Reviewed-by: Stephen Rossbach <rossbach@motorola.com>
arm: bootinfo: gracefully handle the case that BOOTINFO is disabled

Return a bogus powerup reason if the function is called with BOOTINFO
disabled.

Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
(cherry picked from commit ca2d6b171bdc3f5537239cb030043e4f09ce818e)
bootinfo: clean up bootinfo cruft

  * atags are no longer used now that we have fully switched to the
    device tree, so we can remove all of the atag handling code.

  * CID, MBM loader version, and battery status were unused, so they are
    removed

  * doesn't appear to be a usecase for the setter functions, so they
    are removed

Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
(cherry picked from commit 8080942e6b9947e1cbddb4ba6e1b23b1003e92cc)
bootinfo: fix compilation issue when bootinfo is not enabled

The powerup reason flags are only defined when CONFIG_BOOTINFO is
enabled, so the flag for an invalid reason wasn't being defined for the
stub function.

Signed-off-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
(cherry picked from commit af240dc10b533fd9dab4981c992bb5a3d36c0548)
bootinfo: add standardized bootreason

Google requires the new bootreason for standardization purposes.

Signed-off-by: Alexander Filonenko <vtp684@motorola.com>
Reviewed-by: Check Patch <CHEKPACH@motorola.com>
Reviewed-by: Klocwork kwcheck <klocwork-kwcheck@sourceforge.mot.com>
Reviewed-by: Jason Hrycay <jason.hrycay@motorola.com>
(cherry picked from commit baa858c92081b25336fce28e42b42fc67154e1a9)
bootinfo: Remove unnecessary conditional

Remove the conditional compilation logic around the #defines
in this header file so components can still compile when the
feature is disabled.

Signed-off-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Jayachandran Chinnakkannu <jayc@motorola.com>
Reviewed-by: Grace Chen <w30234@motorola.com>
(cherry picked from commit 967d084980037daf65293a369af40b4e289abfe0)
input: atmel_mxt_ts_mmi: create common baseline

Bring driver's code to common baseline with exception of functions
that prototypes are different in 3.6 and 3.10 kernels.

Signed-off-by: Konstantin Makariev <hcv867@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
media: dw9719: Add support for non-trivial actuators

DW9719 actuator requires direct i2c control from the user driver

Signed-off-by: Denis Shchepetov <rjtk48@motorola.com>
Reviewed-by: Elena Satraitis <w04888@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
make: compile DTSs during kernel compile

Build the dtbs target during normal kernel compilation to generate
all of the .dtb.  These can then be used to generate a combined
device tree binary and appended to the boot images.

Signed-off-by: Jason Hrycay <jason.hrycay@motorola.com>
Reviewed-by: Jason Hrycay <e50276@motorola.com>
(cherry picked from commit 1a086b9f345f63a066c9b62254f4893c3014537d)
(cherry picked from commit 73120ad6be45c6ff2518b27c9e007ac927f7f25a)
(cherry picked from commit a2dbad5b933e82102aaaa86210f1c4a79c997bfb)