summaryrefslogtreecommitdiff
path: root/drivers/power (follow)
Commit message (Collapse)AuthorAge
...
* | | power_supply: add INPUT_SUSPEND power supply propertyNicholas Troast2016-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | POWER_SUPPLY_PROP_CHARGING_ENABLED has been used to indicate enabling the charge path in some drivers and enabling the input path in others. This leads to confusion of what charging enabled really means. POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED was introduced to indicate enabling the charge path, and in this case POWER_SUPPLY_PROP_CHARGING_ENABLED is used to indicate enabling the input path. Since these are similarly named it leads to even more confusion. In an attempt to fix this confusion we introduce a new power supply property POWER_SUPPLY_PROP_INPUT_SUSPEND which indicates suspending the input path of the power supply. POWER_SUPPLY_PROP_CHARGING_ENABLED takes its original definition of enabling the charge path. Then POWER_SUPPLY_PROP_BATTERY_CHARGING_ENABLED will be retired from use. CRs-Fixed: 1005389 Change-Id: I1ca8f5748a56a9395caa8ed8ed18f70e69f0cbe8 Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
* | | power_supply: Add additional USB Type-C propertiesJack Pham2016-05-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce the power_supply_typec_mode enum definitions which will allow a charger to indicate the type of USB Type-C connection that is established. Also add additional properties for indicating CC pin orientation, changing source/sink power role (useful for dynamic power role swap), and a flag to allow the charger to expect VBUS changes during USB Power Delivery power negotiation. CRs-Fixed: 1005389 Change-Id: Iba9b652335fba4ee4f24a17eba8abdd5c85c21bb Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
* | | power: reset: Download mode is not supported in secure bootPrasad Sodagudi2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | Currently msmpower off driver is not checking whether device is in secure boot or not. So use generic API scm_is_secure_device() and take appropriate decision to enable download feature. Change-Id: Ic7bbe1f7c9b839ad5d1d07a6583f6a1b76bf8962 Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
* | | power: smb135x-charger: report icl status in parallel modeAshay Jaiswal2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: return UNKNOWN in case of no charger presentHarry Yang2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Enabling input missing pollerHarry Yang2016-03-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Replace DPF_DMF/DPR_DMR calls with regulatorJack Pham2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Become the owner of usb_psyJack Pham2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Add extcon notifiers for USBJack Pham2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | drivers: power: qcom: Snapshot of debug_coreMahesh Sivasubramanian2016-03-23
| | | | | | | | | | | | | | | | | | | | | Snapshot of debug_core module from 3.18(as of e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1) Change-Id: Ie7a4c1ba59c3fb2d3745b4582dd14f0147593935
* | | power: soc: qcom: Fix sensor APIs signaturesMahesh Sivasubramanian2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qcom: apm: add support for msm8996proDavid Collins2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-fg: read rslow configuration during hw_initSubbaraman Narayanamurthy2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: smb135x-charger: Add fast-charge configuration table for SMB1358Anirudh Ghayal2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: smb135x-charger: Add a DT property for enable-pin polarityAnirudh Ghayal2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Hold wake lock for HVDCP detectionChunmei Cai2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-fg: add support for ESR pulse tuning featureSubbaraman Narayanamurthy2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-fg: disable charging during battery profile loadingSubbaraman Narayanamurthy2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-fg: update SRAM data when batt_profile_init is rescheduledSubbaraman Narayanamurthy2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Fix the BMD algo. disable logicAnirudh Ghayal2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Revert "power: move QTI charger drivers to a new sub-directory qcom-charger"Subbaraman Narayanamurthy2016-03-23
| | | | | | | | | | | | This reverts commit e4d364b91cf5fabcca10ff8fee31af1ca25b3d1b.
* | | lpm-stats: Optimize stats pathArchana Sathyakumar2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | lpm: Add sysfs node to display total sleep timeArchana Sathyakumar2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power_supply: smbcharger: use psy pointers to check initRohit Vaswani2016-03-23
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: Read the hi-power propertyAnirudh Ghayal2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: move QTI charger drivers to a new sub-directory qcom-chargerNicholas Troast2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: pmic-voter: fix compilation issueNicholas Troast2016-03-22
| | | | | | | | | | | | | | | | | | | | | 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>
* | | power: cleanup and remove duplicates from KconfigNicholas Troast2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: Ensure power_supply_config is zero-initializedJack Pham2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | cpuidle: lpm-levels: Fix compilation issuesMahesh Sivasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | 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
* | | power: soc: qcom: Remove non-PSCI related driversMahesh Sivasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | soc: qcom: idle: Snapshot of idle/sleep driver as of msm-3.18Mahesh Sivasubramanian2016-03-22
| | | | | | | | | | | | | | | | | | | | | This is a snapshot of the Sleep driver and realted functionality as of e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1 on msm-3.18 branch Change-Id: I98fec26849898c5c66abbb1b094439780c23964d
* | | power: reset: msm: Handle dm-verity and keys reset reasonsDavid Ng2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: use hard resets by default for all restart commandsMatt Wagantall2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: fix bug on warm reset or hard reset selectionLijuan Gao2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: msm: Defer set_dload_mode to end of probeStepan Moskovchenko2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: msm: Define reg-names for the qcom,pshold deviceStepan Moskovchenko2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: msm: Allow configuring reset type via secure I/OStepan Moskovchenko2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: msm: Deassert PS_HOLD via SCM if possibleStepan Moskovchenko2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: Fix build with !CONFIG_MSM_DLOAD_MODEKumar Gala2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | soc: qcom: watchdog_v2: Add support to trigger watchdog bite on panicSubbaraman Narayanamurthy2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: Add support for the new scm_call2 APIVikram Mulukutla2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: reset: replace upstream msm-poweroff driverJosh Cartwright2016-03-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | power: qpnp-fg: check for null return from revid gettersAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | msm: fix compiler errors/warnings in some driversAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | fix compiler warnings/errors in some drivers. Change-Id: Ibc47729b5c5b7c4277bd4666ec56fe8995548b88 Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
* | | power: qpnp-fg: skip return from alarm_start_relativeAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: smb135x: smb1351: avail of simpler regulator registration apiAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power: qpnp-smbcharger: avail of simpler regulator registration apiAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power_supply: update to the new registration schemeAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | power_supply: use power_supply_set_property in lieu of internal apisAbhijeet Dharmapurikar2016-03-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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