Commit graph

1266 commits

Author SHA1 Message Date
Ashay Jaiswal
3ad71a8681 power: smb135x-charger: report icl status in parallel mode
Report the input current limited status via the power supply in
parallel mode in order to better optimize for HVDCP usecases.

Change-Id: Ibd3865828ccbfa44b36839f5d11e7a60b7ada77d
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2016-03-25 16:02:44 -07:00
Harry Yang
fe96617b87 power: qpnp-smbcharger: return UNKNOWN in case of no charger present
POWER_SUPPLY_TYPE_USB_DCP type is returned in read_usb_type() if no
charger is connected, which might cause APSD to unnecessarily rerun.
To fix it, POWER_SUPPLY_TYPE_UNKNOWN should be returned instead.

A bug is also fixed by returning right after IDEV_STS register
read error in this function .

CRs-fixed: 963745
Change-Id: Ia399e05fe8d0ad13c2f1f272c6737e8798177174
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-03-25 16:02:32 -07:00
Harry Yang
4f80702272 power: qpnp-smbcharger: Enabling input missing poller
ARB occurs upon DCP removal due to bit INPUT_MISSING_POLLER_EN_BIT
cleared in kernel charger driver. Enable input missing poller bit
to avoid ARB.

CRs-Fixed: 965458
Change-Id: I3597327d8607b61582d124318e06da701758e34b
Signed-off-by: Harry Yang <harryy@codeaurora.org>
2016-03-25 16:02:21 -07:00
Jack Pham
b12e0db7bb power: qpnp-smbcharger: Replace DPF_DMF/DPR_DMR calls with regulator
The USB PHY no longer exports DP/DM control via power_supply.
Instead, use the regulator it exposes to replace the DPF_DMF
with regulator_enable() and DPR_DMR with regulator_disable().
All other operations (e.g. pulsing) are no-ops for now until
suitable replacements are available.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-03-23 21:25:51 -07:00
Jack Pham
f0a4dfdccc power: qpnp-smbcharger: Become the owner of usb_psy
The USB power_supply object should be maintained by the
charger driver. Since it is now removed from the USB
controller driver, create and register it here. Many
of the calls to set/get_property can be simplified since
there are equivalent state variables we have access to.
PROP_OTG can be removed entirely since that is now handled
by emitting an EXTCON_USB_HOST notification.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-03-23 21:25:50 -07:00
Jack Pham
ee53d51499 power: qpnp-smbcharger: Add extcon notifiers for USB
Allow charger to expose an extcon device which can emit
notification for USB and USB-HOST cable connection states.
The driver can correspondingly register interest in being
notified of these cable connection statuses.

This is intended to replace the power_supply_set_present()
and power_supply_set_usb_otg() mechanisms currently used.

Change-Id: I6c7cf971f59ac3f3075f5c8f13786306729f25a8
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-03-23 21:25:49 -07:00
Mahesh Sivasubramanian
de19c1b1b4 drivers: power: qcom: Snapshot of debug_core
Snapshot of debug_core module from 3.18(as of
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1)

Change-Id: Ie7a4c1ba59c3fb2d3745b4582dd14f0147593935
2016-03-23 21:24:36 -07:00
Mahesh Sivasubramanian
05cb6f5290 power: soc: qcom: Fix sensor APIs signatures
The sensor APIs have changed from using long to int for temperatures. Update
the variables types from long to int.

Change-Id: Id183b83339ceaacb6d340cca138845dd5ac6fbdf
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-23 21:24:36 -07:00
David Collins
3146495f81 power: qcom: apm: add support for msm8996pro
Mutual exclusion between APM switching and LMH register accesses
is only required for HMSS version 1.2 and below on MSM8996.  It
is not required for HMSS version 1.2 on MSM8996-Pro.  Add support
for MSM8996-Pro so that the LMH mutex is not locked during APM
switching on MSM8996-Pro parts.

Change-Id: If09454827ed12c4d436c2fc792f5adcd45ef4312
Signed-off-by: David Collins <collinsd@codeaurora.org>
2016-03-23 21:23:18 -07:00
Subbaraman Narayanamurthy
3c3c947e71 power: qpnp-fg: read rslow configuration during hw_init
Currently, rslow compensation active settings are applied and
cleared based on certain conditions. However, if the device goes
for a reset, the flag used by FG driver to save the setting done
will vanish. For e.g. if an active setting is applied and the
device goes for a reset, even if there is a condition present to
clear the active setting, it will not be applied. This is due to
the fact that the flag (rslow_comp.active) is not set in first
place even though FG HW has that setting applied. Fix this by
reading rslow configuration during hw_init and set the flag.

CRs-Fixed: 977626
Change-Id: Ib6d9f7d79335b027f7ed7ee24dfd5c9bb303228d
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:23:06 -07:00
Anirudh Ghayal
4997136235 power: smb135x-charger: Add fast-charge configuration table for SMB1358
Update the fast-charge configuration for SMB1358 used to
index into the battery charge-current.

CRs-Fixed: 978046
Change-Id: I31ffc03d083c955ac1fdcf79ba5287a0107d3524
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-23 21:23:05 -07:00
Anirudh Ghayal
80ff934189 power: smb135x-charger: Add a DT property for enable-pin polarity
Add ability to configure the polarity of enable-pin in
parallel-charger configuration.

CRs-Fixed: 978046
Change-Id: Ied82dff7afeaa58ea0815f555791c9a0d15e926a
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-23 21:23:04 -07:00
Chunmei Cai
98433ecb46 power: qpnp-smbcharger: Hold wake lock for HVDCP detection
If insert HVDCP charger when device in sleep, kernel wakes up by the
interrupt and after DCP being detected, there is a chance that kernel
going to sleep again and hvdcp_det_work won't be run. This causes the
HVDCP detection failure and stay at 5V to be acting as normal DCP.
Hold a wake lock before schedule the hvdcp_det_work, and release the
wakelock after it being detected.

CRs-Fixed: 966430
Change-Id: I7ca503a5656ab9031d409079421a24710f2996e6
Signed-off-by: Chunmei Cai <ccai@codeaurora.org>
2016-03-23 21:23:03 -07:00
Subbaraman Narayanamurthy
467ced45c8 power: qpnp-fg: add support for ESR pulse tuning feature
Currently, ESR is being under-estimated when the battery state of
charge (SOC) is less than 2%. Add a change which can do tuning to
use default ESR values when SOC is less than 2% and switch back
to ESR extraction when SOC goes above 2%. When the SOC is greater
than 2% and less than 5%, apply slow settings for ESR pulse. When
the SOC crosses 5%, apply the default settings.

This will allow the SOC to increase more accurately when the FG
starts with a better ESR value. This feature is supported via
device tree property "qcom,esr-pulse-tuning-en".

CRs-Fixed: 953448
Change-Id: I37da8d2a9d795dc3d4daffeaf80a72d188243bfd
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:23:02 -07:00
Subbaraman Narayanamurthy
3ad8f9a878 power: qpnp-fg: disable charging during battery profile loading
Currently, a battery profile is loaded when the profile integrity
bit is not present, a new battery is inserted, or battery voltage
is not in range across reboot. When the battery profile loading
happens after the device has booted up, the charger driver is
notified to disable battery charging.

However, in cases like offline mode charging, the device can boot
up again with charging enabled causing battery parameters to be
modified even before the charger driver can probe. This causes
a jump in state of charge (SOC) across reboot and causes the FG
to restart. To help with this scenario, make sure the charger
driver is ready, and charging is kept disabled before the battery
profile loading process start. Enable charging back when there is
no need to reload the battery profile, or the FG has restarted
and the first SOC estimate is done.

CRs-Fixed: 953448
Change-Id: I90b1c81ce502c0f6e96feab3b23cff61054422cb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:23:02 -07:00
Subbaraman Narayanamurthy
473c773d54 power: qpnp-fg: update SRAM data when batt_profile_init is rescheduled
When the charger driver haven't been probed yet and batt_psy is
unavailable, batt_profile_init is rescheduled as it depends on
the charger to disable charging while loading profile. However,
this adds a constraint that SRAM parameters needs to be updated
every time just before batt_profile_init is called again. Else,
stale SRAM parameters will be used to decide whether the battery
profile can be loaded or not.

Hence, cancel and schedule the update_sram_data work whenever
battery profile loading is rescheduled again.

CRs-Fixed: 953448
Change-Id: I6e1108601baf744014227155b7b09e0ec4a0a9bb
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2016-03-23 21:23:01 -07:00
Anirudh Ghayal
038d3f7c39 power: qpnp-smbcharger: Fix the BMD algo. disable logic
The battery missing detection (BMD) is incorrectly
being enabled. Fix it.

CRs-Fixed: 943881
Change-Id: I58407f0b6ca376bc4809073144429cd4cc3483c9
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-23 21:23:00 -07:00
Subbaraman Narayanamurthy
5cd9c9057b Revert "power: move QTI charger drivers to a new sub-directory qcom-charger"
This reverts commit e4d364b91cf5fabcca10ff8fee31af1ca25b3d1b.
2016-03-23 21:22:55 -07:00
Archana Sathyakumar
8804d58937 lpm-stats: Optimize stats path
Stats for cpu and cluster exit path query the ktime for every level and
this increases the overall idle exit latency. Get the timestamp only
once and use the same information to populate into different level.

Change-Id: Iece36015910fcb16bd04a25dae1bf0396ab463e2
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>

Conflicts:
	drivers/cpuidle/lpm-levels.c
	drivers/power/qcom/lpm-stats.c
2016-03-23 21:22:08 -07:00
Archana Sathyakumar
40fe32a315 lpm: Add sysfs node to display total sleep time
Add sysfs node to query the total sleep time of a cpu since debugfs node
is not exposed to the userspace service.

Command:
cat /sys/module/lpm_stats/cpu0/total_sleep_time_secs
cat /sys/module/lpm_stats/cpu1/total_sleep_time_secs
cat /sys/module/lpm_stats/cpu2/total_sleep_time_secs
cat /sys/module/lpm_stats/cpu3/total_sleep_time_secs

CRs-fixed: 935207
Change-Id: I45be0a8be29932816aa42e097657a2a60933b986
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-23 21:18:05 -07:00
Rohit Vaswani
e95affa994 power_supply: smbcharger: use psy pointers to check init
The current driver uses a boolean flag psy_registered to track
whether the power supplies are initialized. Instead check if the
psy pointers are non null to ensure they are initialized.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-23 19:58:16 -07:00
Anirudh Ghayal
137e882039 power: qpnp-smbcharger: Read the hi-power property
Read the hi-power power-supply property in the
get_property callback to avoid warnings from the
power-supply framework.

Change-Id: I5a9bb9b625ceb308afab915db9ac784a567ffbfb
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-22 11:10:27 -07:00
Nicholas Troast
8e10bff713 power: move QTI charger drivers to a new sub-directory qcom-charger
QTI charger drivers have outgrown thier home in power and deserve their
own sub-directory. Move all QTI charger drivers and their depedencies to
a new sub-directory of power called qcom-charger.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:23 -07:00
Nicholas Troast
a40a7640f2 power: pmic-voter: fix compilation issue
Compilation fails when required by more than one goal due to a missing
header guard. Add it.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:22 -07:00
Nicholas Troast
c039b2275c power: cleanup and remove duplicates from Kconfig
Many of the older SMB charger drivers are no longer present therefore
remove the config entries for them.

Duplicate config entries are present. Remove them.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:21 -07:00
Jack Pham
72e0641e1b power: Ensure power_supply_config is zero-initialized
Since the config object is created on the stack, ensure that
it is initialized to zero. Otherwise an invalid pointer access
may occur when trying to dereference the cfg->of_node pointer
that's typically left unset.

Signed-off-by: Jack Pham <jackp@codeaurora.org>
2016-03-22 11:08:31 -07:00
Mahesh Sivasubramanian
75765be3fe cpuidle: lpm-levels: Fix compilation issues
Compile drivers/power/qcom based on CONFIG_ARCH_QCOM instead of
CONFIG_ARCH_MSM
Fix use of __get_cpu_var and convert to this__cpu_ptr

Change-Id: I7152d74f9d495f9ab7af0cfd2f3695c9461469fb
2016-03-22 11:07:24 -07:00
Mahesh Sivasubramanian
406f370aba power: soc: qcom: Remove non-PSCI related drivers
Only PSCI compatible targets are supported moving forward. Remove drivers
that are used in legacy power collapse support.

Change-Id: I022bef78433c9693d3cb8752091c2c0ed2e4e994
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2016-03-22 11:07:23 -07:00
Mahesh Sivasubramanian
c184ee865f soc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18
This is a snapshot of the Sleep driver and realted functionality as of
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch

Change-Id: I98fec26849898c5c66abbb1b094439780c23964d
2016-03-22 11:07:18 -07:00
David Ng
b38d1c71b0 power: reset: msm: Handle dm-verity and keys reset reasons
Write magic cookies/PON reset reason to indicate reasons
of dm-verity corruption, re-enable enforcing mode, and
(unrelated) keys clear.

Change-Id: I49904c79940515863d794b23fa7ac84e472b2466
Signed-off-by: David Ng <dave@codeaurora.org>
2016-03-22 11:02:23 -07:00
Matt Wagantall
69c5effef6 power: reset: use hard resets by default for all restart commands
Present, hard resets are used only when rebooting for "recovery",
"rtc", or "bootload" reboot commands or when the reboot command
is an empty string. Perform hard resets for invalid reboot commands
also, to avoid accidental warm resets if an invalid reboot command
is mistakenly used.

Continue to use warm resets for entry into download mode. This is
required for collection of ramdumps.

Change-Id: I71f657e9c8c20abcbbda86d789c843060c8ffce7
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
2016-03-22 11:02:22 -07:00
Lijuan Gao
64efabe747 power: reset: fix bug on warm reset or hard reset selection
Rebooting to recovery, bootloader and rtc should be treated as
hard reset if PMIC sparse regs are used to store reset reason.
Otherwise it should be set as warm reset to keep compatible with
legacy design. So correct logic of need_warm_reset here.

Change-Id: Ica173cc379df16a28f11bf5da87cb928e73ecdfb
Signed-off-by: Lijuan Gao <lijuang@codeaurora.org>
2016-03-22 11:02:21 -07:00
Stepan Moskovchenko
30787dfc1c power: reset: msm: Defer set_dload_mode to end of probe
The set_dload_mode() call in msm_restart_probe() may depend
on the TCSR base address, which is initialized later in the
probe function. Move this call to the end of
msm_restart_probe() to avoid potentially trying to use an
uninitialized resource.

Change-Id: I65c408f065cc7c68a929ec43d50b0a493942a189
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:20 -07:00
Stepan Moskovchenko
e731442230 power: reset: msm: Define reg-names for the qcom,pshold device
Since the qcom,pshold device now supports up to two
distinct register definitions, add the 'reg-names' property
to assign names to the memory resources, rather than
relying on resource numbering.

Change-Id: Ie0bc5eae0119901239efae05357ae107a112b87a
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:19 -07:00
Stepan Moskovchenko
0a8080c060 power: reset: msm: Allow configuring reset type via secure I/O
Some targets require that the Download Mode / EDL
configuration be performed by means of a Secure I/O write
to the TCSR_BOOT_MISC_DETECT register rather than through a
generic SCM operation. Provide a mechanism for specifying
the address of this register in the device tree, to use as
a fallback method if the generic SCM call to set the
download mode configuration is unavailable.

This is necessary to comply with atomicity requirements of the
secure environment.

Change-Id: I5d3fcb48b0b47815d4839a3b722b0462a1bca087
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:18 -07:00
Stepan Moskovchenko
6c3bc79a39 power: reset: msm: Deassert PS_HOLD via SCM if possible
Support a new SCM call which disables the PMIC arbiter and
deasserts PS_HOLD in a single operation. Fall back on the
legacy behavior of disabling the PMIC abriter and directly
deasserting PS_HOLD if this call is not available.

This is necessary comply with atomicity requirements of the
secure environment.

Change-Id: Ia3b13d469932edf94d3249fa3e7234a1c12eee1b
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
2016-03-22 11:02:17 -07:00
Kumar Gala
4a5aa46b78 power: reset: Fix build with !CONFIG_MSM_DLOAD_MODE
We only define in_panic when CONFIG_MSM_DLOAD_MODE is enabled.  Otherwise
we get the following compile error:

drivers/power/reset/msm-poweroff.c: In function ‘do_msm_restart’:
drivers/power/reset/msm-poweroff.c:276:28: error: ‘in_panic’
	undeclared (first use in this function)
  if (WDOG_BITE_ON_PANIC && in_panic)
                            ^
drivers/power/reset/msm-poweroff.c:276:28: note: each undeclared identifier
is reported only once for each function it appears in

Just add simple #ifdef CONFIG_MSM_DLOAD_MODE around the code to fix.

Change-Id: I01f8641e90dd000813127a5b8ce730529f3485cc
Signed-off-by: Kumar Gala <galak@codeaurora.org>
2016-03-22 11:02:16 -07:00
Subbaraman Narayanamurthy
aff6914761 soc: qcom: watchdog_v2: Add support to trigger watchdog bite on panic
In certain cases during a kernel panic,the interrupts on non-panicking
CPUs are disabled. Since CPU context cannot be collected by sending IPI
to those CPUs, we're limited to debug the problem. Forcing a watchdog
bite during kernel panic will ensure us getting the proper CPU context.
Hence adding support for the same.

Change-Id: Id06030d9bc46d94209da7f0ef8c47bfd3477baf6
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:02:15 -07:00
Vikram Mulukutla
96864fd7ed power: reset: Add support for the new scm_call2 API
The SCM library now provides a new API that implements
a secure world syscall interface that is more aligned
with the ARMv8 SMC calling convention. Add support for
this new API.

Change-Id: Ia76309de556e97e43c1e8ab782f89c4115d5fac6
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
2016-03-22 11:02:15 -07:00
Josh Cartwright
b47b146f86 power: reset: replace upstream msm-poweroff driver
This is a snapshot of the msm-poweroff driver as of msm-3.10 commit

acdce027751d5a7488b283f0ce3111f873a5816d (Merge "defconfig: arm64: Enable
ONESHOT_SYNC for msm8994")

In addition, make this driver selectable when ARCH_MSM || ARCH_QCOM.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>

Change-Id: Ifca5e017ad67cd78cbd507864fd3a0ee37d8713e
2016-03-22 11:02:14 -07:00
Abhijeet Dharmapurikar
8ee0110ce3 power: qpnp-fg: check for null return from revid getters
The get_revid_data() could return NULL. Check for this condition
in addition to checking for error conditions.

Change-Id: I3ddbb6645dae0fcfe4f667b8d7b09b2143fe5e2d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:44 -08:00
Abhijeet Dharmapurikar
4680135ddc msm: fix compiler errors/warnings in some drivers
fix compiler warnings/errors in some drivers.

Change-Id: Ibc47729b5c5b7c4277bd4666ec56fe8995548b88
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:41 -08:00
Abhijeet Dharmapurikar
a6fceb4732 power: qpnp-fg: skip return from alarm_start_relative
The 4.4 kernel changes alarm_start_relative() to return void.
Update the qpnp-fg driver to skip checking the return value.

Change-Id: I607d341875a73ce326244d6864a4f3f3e32099ed
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:40 -08:00
Abhijeet Dharmapurikar
d0f6370950 power: smb135x: smb1351: avail of simpler regulator registration api
Change,
a0c7b16 regulator: of: Provide simplified DT parsing method
enables to register a regulator without constructing an regulator_init_data
structure. The regulator_init_data is instantiated within the
registration api and is filled with information by parsing the regualtor
device node.

Avail of this convenience while registering OTG regulators in the
smb135x and smb1351 drivers.

Change-Id: I2eb2866f9941db797ede1676e92bb87b4a23c925
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:40 -08:00
Abhijeet Dharmapurikar
89b8a21c57 power: qpnp-smbcharger: avail of simpler regulator registration api
Change,
a0c7b16 regulator: of: Provide simplified DT parsing method
enables to register a regulator without constructing an regulator_init_data
structure. The regulator_init_data is instantiated within the
registration api and is filled with information by parsing the regualtor
device node.

Avail of this convenience while registering OTG regulators in the
qpnp-smbcharger driver.

Change-Id: I2ba14d3bea7d839f8055401d69d7461d2f54aa8e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:40 -08:00
Abhijeet Dharmapurikar
8b5cc3d711 power_supply: update to the new registration scheme
The power_supply class in 4.4 kernel changes power_supply
registration to pass in a descriptor and a configuration
structure. Update msm power_supply registering drivers with
the new scheme.

Change-Id: Iaf63a96ab01f9d4676681ee4e6cf61ac2e8d3f4d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:39 -08:00
Abhijeet Dharmapurikar
2a65148ba7 power_supply: use power_supply_set_property in lieu of internal apis
API's like
power_supply_set_supply_type
power_supply_set_online,
power_supply_set_present
power_supply_set_current_limit
power_supply_set_health_state
power_supply_set_supply_type
power_supply_set_dp_dm
can be replaced by using
power_supply_set_property introduced in the 4.4 kernel.

Update all such callsites to use power_supply_set_property.

Change-Id: I10df60c8012358b6773a8bd1802a26d9540ade9b
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>

Conflicts:
	drivers/power/qpnp-smbcharger.c
2016-03-01 12:22:39 -08:00
Abhijeet Dharmapurikar
3cb222ef93 power_supply: change getting and setting power supply properties
Replace all call sites which invoke the get/set_property apis on the
power_supply object with power_supply_get/set_property() api call.

Change-Id: Ibd4c5db6a50734f827878589df1f3e48a0062a06
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:39 -08:00
Abhijeet Dharmapurikar
0c98f90e2e spmi_devices: change to platform_devices
Change to using upstream spmi bus architecture. All the spmi devices,
marked by spmi-dev-container, become platform devices.
spmi-slave-container devices become spmi_devices each representing
a slave. The read/write functions use regmap api's instead of calls to
spmi_ext_register_read/write() implemented by the spmi bus. This
regmap is instantiated per slave.
The spmi bus helper functions like spmi_get_irq get changed to their
platform bus equivalents.

Change Kconfig files include
* Remove dependence on OF_SPMI, MSM_QPNP_INT
* There were few places where an earlier commit
 dcc2aedc80746acee589e4b47d3e6adf5d3ec253
missed adding dependence on SPMI along with MSM_SPMI.
Fix them.
* Add depends on ARCH_MSM. ARCH_MSM is used for internal builds.

Change the nodes in DTSI files to confirm to the modified drivers.
Update their binding docs to drop spmi-dev-container and
spmi-slave-container;

Finally update defconfig to use upstream SPMI.

Change-Id: Ic85bff27c09c84b152cb38acbc3cadd05c0ec57a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:33 -08:00
Abhijeet Dharmapurikar
065fd87ad3 power: bcl_peripheral: remove the unnecessary memset ZERO of the chip.
The bcl_perph is allocated by devm_kzalloc, this ensures that the
allocation is zeroed. There is no need to zero it out again.

Change-Id: Ia808f2a93e4610677f40c87892063e0497213ae1
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-03-01 12:22:32 -08:00