summaryrefslogtreecommitdiff
path: root/drivers/power
AgeCommit message (Collapse)Author
2014-06-23power: extcon: fix charging icon during bootupRakesh Bodla
If device is booted with charger cable, in probe y-cable extcon dev reports no cable is connected and cable connection status is getting corrupted. Fixing this by adding suitable condition. Bug 1522950 Change-Id: I5cee5953665338c500bf484ebc38cc5ce42c9ae0 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/425967 (cherry picked from commit 1e3be7bc384c4bd834729b216f137c7962e6dc36) Reviewed-on: http://git-master/r/426949 GVS: Gerrit_Virtual_Submit Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-06-13thermal: remove all unsigned type use for temperatureDiwakar Tundlam
Bug 1516918 Change-Id: I5615b0657d255d9134415d92d372771baa4271e1 Signed-off-by: Diwakar Tundlam <dtundlam@nvidia.com> Reviewed-on: http://git-master/r/420818 GVS: Gerrit_Virtual_Submit Reviewed-by: Josh Kuo <joshk@nvidia.com> Reviewed-by: Jinyoung Park <jinyoungp@nvidia.com>
2014-06-11power: extcon:convert extcon lock to spinlock from mutexVenkat Reddy Talla
use spinlock instread of mutex to avoid kernel warning "sleeping function called from invalid context" if CONFIG_DEBUG_ATOMIC_SLEEP (sleep inside atomic section checking config) enabled and usb cable plugged/unplugged. Bug 1522398 Change-Id: I813f959dc5cb3ce666794a8d57152b6f562046a6 Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/421988 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-06-06power: extcon: register for y-cable extcon devRakesh Bodla
Register to otg extcon dev for y-cable notification. Bug 200004368 Bug 1456628 Change-Id: Ie63e29b90885ef713b96d30d05fedbbb89d3cd30 Signed-off-by: Rakesh Bodla <rbodla@nvidia.com> Reviewed-on: http://git-master/r/416656 (cherry picked from commit 350fe59088ec3016cff15b1627ca26dcaa659919) Reviewed-on: http://git-master/r/418864 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-06-04power: lc70903f: return old temp of device read failedLaxman Dewangan
It is observed that device read failed once in while when reading temp from device. The next read success. To resolve the temp read fail from device, return last temperature read from device. bug 200006331 Change-Id: Ic305dbc013a44e71490b9c4defe752319cb22b44 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/413137 Reviewed-on: http://git-master/r/417766
2014-06-03power: extcon: Add Maxim Charger SupportPhilip Rakity
bug 1321188 bug 1456402 (cherry picked from commit bd925233df3b6aeeb457260ff59dccb2febb2266) Change-Id: Ic8a4b1c35ff12c10fd8930b745186c5b2027034c Reviewed-on: http://git-master/r/400493 Signed-off-by: Philip Rakity <prakity@nvidia.com> Reviewed-on: http://git-master/r/417038 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Rakesh Babu Bodla <rbodla@nvidia.com> Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-05-28power: extcon:add mutex lock to avoid race condition on usb eventsVenkat Reddy Talla
adding mutex lock to avoid race condition while notifying charger cable connected/removed events from USB module. Change-Id: I77708441dd8215533a165c688ba96cf9c10dc8a3 Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/412017 (cherry picked from commit 5e6c7197c2e984f8201b59043e714dfff5586df3) Reviewed-on: http://git-master/r/413311 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-05-28power: lc709203f:print battery votlage and soc level while bootingVenkat Reddy Talla
adding debug print to display battery voltage and soc level while booting in kernel logs. Change-Id: If34ca58cd1f4b96fe6f64b9b775f57b44949c111 Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/412023 (cherry picked from commit 6878c1c33215059600339ee5bc88491f8af79918) Reviewed-on: http://git-master/r/413309 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> GVS: Gerrit_Virtual_Submit
2014-05-12power: bq2419x: configure resume and power-ON time on suspend/shutdownLaxman Dewangan
Based on the chargign status and type of cable connected, configure resume and auto power on of system on suspend and shutdown respectively. bug 1440235 bug 1509880 Change-Id: Idd1c731b2852c26132272c35a78e1c5ec5101031 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/406364 Reviewed-on: http://git-master/r/408096
2014-05-12power: bq2419x: read fault status register two timesLaxman Dewangan
The fault status register should be read two times to get correct status of fault and clearing it. So read this register two times and ORed the status to get correct fault status on current interrupt cycle. Change-Id: I2c392d9473952a126ffe5d739a54ebf200e3181f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/404995 Reviewed-on: http://git-master/r/406973 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
2014-05-07power: bq2419x: correctly check for thermal profile dataLaxman Dewangan
The number of entry for temp range on DT node is counted using of calls. If there is no entry then it returns -ve error. Taking care of -ve returns on the entry count. This will avoid the wrong error message as: bq2419x 1-006b: voltage thermal profile is not correct Change-Id: I573d392123c15241c521c3c3d80f988b8b1f25f7 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/401497 Reviewed-on: http://git-master/r/405641 GVS: Gerrit_Virtual_Submit
2014-05-07power: bq2419x: reconfigure BQ on the safety timer expireLaxman Dewangan
When safety timer expire, it need to reconfigure all BQ parameter as safety timer expiry reset all values to default. bug 1503606 Change-Id: I17f5a51be99ab7bde28acb18944dec110eee684a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/398769 Reviewed-on: http://git-master/r/405640 GVS: Gerrit_Virtual_Submit
2014-05-07power: bq2419x: toggle CE bit when safety timer expireLaxman Dewangan
When safety timer expire then it is required to toggle the CE bit from 1 to 0 and then 0 to 1 to restart the timer again. Just setting 0 to 1 will not rstart the timer. bug 1503606 Change-Id: Ic842da3cdaaaea0cfc99f9441b6aa31ef2110e67 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/398768 Reviewed-on: http://git-master/r/405639 GVS: Gerrit_Virtual_Submit
2014-05-07power: bq2419x: rewrite suspend callback as per flow diagramLaxman Dewangan
Rewrite suspend callback to easily map with flow diagram and understand the code path. This rewrite removes the complexity from codes. Change-Id: Ia8747f2f40aec9e5515849a904f08ef018f04b97 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/395810 Reviewed-on: http://git-master/r/405638 GVS: Gerrit_Virtual_Submit
2014-05-07power: bq2419x: remove duplication of code for safty timer handlingLaxman Dewangan
There is duplication of codes for handling the safety timer expire. Move this code to function and use this function from different location. Change-Id: I8a11055bf0dfbe5b40b487a403e806b6d221c354 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/395809 Reviewed-on: http://git-master/r/405637 GVS: Gerrit_Virtual_Submit
2014-05-06power: lc709203f: report voltage/current in uV/uALaxman Dewangan
As per unit details for power supply, all voltage and current should be in uV and uA respectively until specified. Hence changing the voltage_now to uV and current_now to uA. bug 1499795 Change-Id: I20b2d1b81ff4be7652a41d84fdd7a79efbb0f5e5 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/396752 Reviewed-on: http://git-master/r/405644 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit
2014-05-06power: lc709203f: prints voltage and SOC level at shutdownLaxman Dewangan
Prints the voltage and soc level at shutdown stage to help on analysing the log. Change-Id: I13f612473c155a1b7409454ea49ce55d645c7d6f Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/396750 Reviewed-on: http://git-master/r/405643 GVS: Gerrit_Virtual_Submit
2014-05-06power: lc709203: synchronize different context with lockingLaxman Dewangan
Synchronize the battery work queue, charger update and power supply get_status() context with mutex. Avoid register access after shutdown. Change-Id: Id18ef28eac512cb08eafec5cfed6f8d575de0bb5 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/387022 Reviewed-on: http://git-master/r/405642 GVS: Gerrit_Virtual_Submit
2014-05-06power: bq2419x: configure PWR ON REG when safety timer expiresVenkat Reddy Talla
enable safety timer and configure power on register from ISR and resume path when safety timer expired. set rtc alarm timer based on parameter value passed through dt file only when battery in CHARING done state and high charging current cable connected to wake up device from LP0. Bug 1440235 Change-Id: I2fb8121c6183a8367c8bd869f43373062fdbb630 Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/392334 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: Iff93242bdc368f711d06eec1b4ec4ff844df5978 Reviewed-on: http://git-master/r/404465 Reviewed-by: Mandar Padmawar <mpadmawar@nvidia.com> Tested-by: Mandar Padmawar <mpadmawar@nvidia.com>
2014-05-06power: bq2419x: move wdt print to dev_dbgRay Poudrier
Quiet print that happens quite frequently Change-Id: Ie33544366a6aff150692e9f2e26c1cd1c04b34be Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com> Reviewed-on: http://git-master/r/390961 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: I2439d0a37c7cdd8a46ced8806fbda147aa17cd98 Reviewed-on: http://git-master/r/404462 Reviewed-by: Automatic_Commit_Validation_User
2014-05-05power: bq2419x: do not configure power-on from USB if no battery on shutdownLaxman Dewangan
If there is no battery presence on system and if is it getting power off then do not configure the system for power on when USB cable inserted/removed. Change-Id: I244d570f5a6d79c7120497fd40cb52f80cac0ae9 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/396909 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: If1112196790164b7b98da31f25a0b71a4e94d86b Reviewed-on: http://git-master/r/404469 Reviewed-by: Riham Haidar <rhaidar@nvidia.com> Tested-by: Riham Haidar <rhaidar@nvidia.com>
2014-05-05power: bq2419x: rewrite shutdown callback as per flow diagramLaxman Dewangan
Rewrite shutdown callback to easily map with flow diagram and understand the code path. This rewrite removes the complexity from codes. Change-Id: Ifc3f4e8838a952641d3c0488353fe984dd1018b0 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/395808 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: If036ac36e9c37b5c8af27280f6a581dfda82ec8b Reviewed-on: http://git-master/r/404466 Reviewed-by: Riham Haidar <rhaidar@nvidia.com> Tested-by: Riham Haidar <rhaidar@nvidia.com>
2014-05-05power: bq2419x: add different time for power on after charge complete shutdownsiddardha naraharisetti
If high charging source is connected and system goes to shutdown after full charging of battery then system can be stay on power off for longer time. Add different auto recharge time for power off state. Bug 1489717 Change-Id: Iaf1c8721eef70b7c51c2b5bf0ba3c1a082995456 Signed-off-by: siddardha naraharisetti <siddardhan@nvidia.com> Reviewed-on: http://git-master/r/393183 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: I9a7d42737dfc748cbc79efc1abc5bca03e3e8a80 Reviewed-on: http://git-master/r/404464 Reviewed-by: Riham Haidar <rhaidar@nvidia.com> Tested-by: Riham Haidar <rhaidar@nvidia.com>
2014-05-05power: bq2419x: handle charge termination on powerupsiddardha naraharisetti
check for charge termination on powerup and set the status accordingly. donot acquire wakelock if charged fully. Bug 1489717 Bug 1448255 Change-Id: I6e1bfd937f1ab0441e7b5d9d1998defb23d6c2fc Signed-off-by: siddardha naraharisetti <siddardhan@nvidia.com> Reviewed-on: http://git-master/r/394312 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: I31adb7d0e4d5bca4c3e73abe4d97885b1a8980db Reviewed-on: http://git-master/r/404463 Reviewed-by: Riham Haidar <rhaidar@nvidia.com> Tested-by: Riham Haidar <rhaidar@nvidia.com>
2014-05-05power: battery-charger-gauge: battery temp monitoring by gauge if tz providedLaxman Dewangan
If tz_name is provided by gauge driver then only register thermal zone for battery temperature monitor. Change-Id: I89af50b96c9c9ffd00e5da1397e9616599af9a9b Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/395807 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: I0c2784880f98b2ea4f0683c367483782c24cc5f6 Reviewed-on: http://git-master/r/404461 GVS: Gerrit_Virtual_Submit
2014-05-05Batt: t124-tn8: add sysfs to read battery capacitywahsu
bug 1433349 Change-Id: I93d71ee6ae0f76f1a78ea272fb2d7b4210464e81 Signed-off-by: wahsu <wahsu@nvidia.com> Reviewed-on: http://git-master/r/384366 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Change-Id: Ic87db2d5d7e07297eb111d11d1a6ead3c6c7fd39 Reviewed-on: http://git-master/r/404460 Reviewed-by: Wayne Hsu <wahsu@nvidia.com>
2014-04-23power: reset: palmas: configure system for reset before issuing resetwahsu
Configure the Palmas for SW cold reset before issuing the COLDRST_SW. bug 1483874 Change-Id: Ic375e5225f7c88982fbaed33dfd3c3b4f24208e7 Signed-off-by: wahsu <wahsu@nvidia.com> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/398999 (cherry picked from commit 11ed317a31f17ab28c8f3f72eb463f12cbbcbb4a) Reviewed-on: http://git-master/r/400007
2014-04-13power: lc709203f: add support for CURRENT_NOW propertyLaxman Dewangan
Add support for measuring battery current now if the device node has required properties to read the battery current. bug 1413219 Change-Id: Ie0e1cf61306ce0f5fdd7611a54781fc003c8156e Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/395552
2014-04-13power: batter-charger-gauge: add API for reading battery currentLaxman Dewangan
Add API for reading battery current throuch IIO channels. IIO channel information is read from battery gauge device node. bug 1413219 Change-Id: I87094acbd15796a16acb520ba52c2351439e4bbb Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/395550
2014-04-11power: lc709203f: read FG status before registering power supplyLaxman Dewangan
Read the SOC and voltage level from fuel gauge before registering power supply so that framework can get the required information even before workqueue get scheduled. This will avoid incorrect value to be pass to the client if there is any race occur. Change-Id: Id8696607bf5ec7d434aaf2af3f9e662f677759b5 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-04-11power: bq2419x: add support to emulate charger disconnectLaxman Dewangan
Add support to emulate the charger disconnected through sysfs interface although charger connected physically. This will make the system to load from battery instead of input source. This helps on stress test to drain battery even if charger cable connected and enable/disable charging without physically doing this. cd /sys/bus/i2c/devices/1-006b For emulating it as disconnect say echo D > input_cable_state For disabling emulation of cable state say echo C > input_cable_state bug 1491052 Change-Id: I0f6edd0ce17a906447c0e455da15a388a4958215 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-31power: extcon: add Apple 500ma and QC2 chargersPhilip Rakity
Add apple charger and Quick Charge 2 (QC2) cables to power suply cable types to update cable type to framework layer when charger is attached. QC2 charger prints as Fast Charger... Will do the same for maxim charger when code integrated Change-Id: I490b9f16b6d775ce962c03752dd01993138789b6 Signed-off-by: Philip Rakity <prakity@nvidia.com> Reviewed-on: http://git-master/r/389786 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-26power: power_supply_extcon: add dt supportLaxman Dewangan
Add DT support for the power_supply-extcon driver Added DT binding documents also. Change-Id: Id7d612032cac82eecadae6c24a3c1e0c82b60a27 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/387063
2014-03-25power: lc709203f: do not override initial RSOC valueVenkat Reddy Talla
do not program lc709203 register 0x07 if initial rsoc value provided in dts file is 0. fuel gauge will be automatically initialzed 10 ms after battery connected to the device and will track the RSOC thereafter. Bug 1470891 Change-Id: I79c9860c03416bd3287d8011493b351fc006b925 Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/386100 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-21power: lc709203f:implement interrupt featureVenkat Reddy Talla
implement interrupt support to generate low voltage/soc events when battery voltage measured below threshold value. update binding doc with lc709203f parameters. Bug 1474634 Change-Id: I89f3b009548132d1e00bc28fb202e1f6babdfab1 Signed-off-by: Venkat Reddy Talla <vreddytalla@nvidia.com> Reviewed-on: http://git-master/r/383844 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-19power: bq2477x: Add adapter detection through GPIOChaitanya Bandi
Added support for AC adapter detection through GPIO in bq2477x charger. Bug 1457299 Change-Id: I344d264312142121342403194aa5adeaec66d47d Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/380285 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-19power: bq2477x: Add device tree supportChaitanya Bandi
Added device tree support for bq2477x. Change-Id: I5dc928c609c8b4d6d9e8d09f46382307315f4f1c Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/381886 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-19power: bq2477x: Remove inappropriate GPIO initializationChaitanya Bandi
Removed inappropriate GPIO initialization in bq2477x driver. The GPIO initialization being done is actually a GPIO required to enable a level translator and is out of the scope of this driver. Hence, doesn't make sense to have it in this driver. Change-Id: I48aadb2d1c9a0d3fbfd29e701e848f378b30818a Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/381884 Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-19power: bq2477x: Use module_init for loadingChaitanya Bandi
Move to module_init. Not required to initialize the driver so early using subsys_initcall. Change-Id: Idd39038e51f7a613dc309dcd25628d5872c15ecd Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Reviewed-on: http://git-master/r/381883 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-03-14power: battery-charger-gauge: Request thermal zone only if tz name validLaxman Dewangan
Request for the thermal zone only if tz name is provided from gauge driver. Change-Id: Ie2480eca92f7b10e8bbb0c8ac2ae1a7a81306194 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/381912 GVS: Gerrit_Virtual_Submit
2014-03-13Merge branch 'linux-3.10.33' into dev-kernel-3.10Deepak Nibade
Bug 1456092 Change-Id: Ic563f451abb08754fea0e2bbf0ce065ca2e6e770 Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
2014-03-13Merge branch 'linux-3.10.33' into dev-kernel-3.10Deepak Nibade
Bug 1456092 Change-Id: I3021247ec68a3c2dddd9e98cde13d70a45191d53 Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
2014-03-10power: bq2419x: add thermal support for charging voltageLaxman Dewangan
The maximum charging voltage depends on the battery temperature. Add DT porperty and mechanims to set different charging voltage for different temperature. bug 1472161 Change-Id: Ia6fa3ee84cfd1f9ad8359e8249ffb268330f90cf Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/379575 GVS: Gerrit_Virtual_Submit
2014-03-05battery-charger-gauge-comm: Reduce the snapshot intervalDarbha Sriharsha
Reduce the time interval after which capacity and voltage snapshots are captured as such a large interval is not necessary and large intervals cause delay in system boot time Bug 1472698 Change-Id: Ia67c24b949e647872fcb05375b5461d05b84c3b4 Signed-off-by: Darbha Sriharsha <dsriharsha@nvidia.com> Reviewed-on: http://git-master/r/376450 Reviewed-by: Venu Byravarasu <vbyravarasu@nvidia.com>
2014-03-04power: bq27441: Fix checksum calculation in initChaitanya Bandi
Fixed checksum calculation in bq27441 initalization sequence. Also added 1 msec delay before reading block registers. Unseal fuel gauge first and read the block registers before deciding whether to update or not. Bug 1344962 Change-Id: I45765bbdfb38bf01316bed347606501fd42427fb Signed-off-by: Chaitanya Bandi <bandik@nvidia.com> Signed-off-by: siddardha naraharisetti <siddardhan@nvidia.com> Reviewed-on: http://git-master/r/374497 (cherry picked from commit 2b463db152c39b79dc26e704aef58285088056ce) Reviewed-on: http://git-master/r/374335 Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
2014-02-25power: bq2419x: release wakelock on cable disconnectLaxman Dewangan
When high-charging current charger connected then system does not enter into suspend. When charger disconnected then allow system to enter into suspend. bug 1464193 Change-Id: I60b71650c50a432e4f0213461811b32204a1f978 Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/374166
2014-02-22power: max17040: Fix NULL pointer dereference when there is no platform_dataKrzysztof Kozlowski
commit ac323d8d807060f7c95a685a9fe861e7b6300993 upstream. Fix NULL pointer dereference of "chip->pdata" if platform_data was not supplied to the driver. The driver during probe stored the pointer to the platform_data: chip->pdata = client->dev.platform_data; Later it was dereferenced in max17040_get_online() and max17040_get_status(). If platform_data was not supplied, the NULL pointer exception would happen: [ 6.626094] Unable to handle kernel of a at virtual address 00000000 [ 6.628557] pgd = c0004000 [ 6.632868] [00000000] *pgd=66262564 [ 6.634636] Unable to handle kernel paging request at virtual address e6262000 [ 6.642014] pgd = de468000 [ 6.644700] [e6262000] *pgd=00000000 [ 6.648265] Internal error: Oops: 5 [#1] PREEMPT SMP ARM [ 6.653552] Modules linked in: [ 6.656598] CPU: 0 PID: 31 Comm: kworker/0:1 Not tainted 3.10.14-02717-gc58b4b4 #505 [ 6.664334] Workqueue: events max17040_work [ 6.668488] task: dfa11b80 ti: df9f6000 task.ti: df9f6000 [ 6.673873] PC is at show_pte+0x80/0xb8 [ 6.677687] LR is at show_pte+0x3c/0xb8 [ 6.681503] pc : [<c001b7b8>] lr : [<c001b774>] psr: 600f0113 [ 6.681503] sp : df9f7d58 ip : 600f0113 fp : 00000009 [ 6.692965] r10: 00000000 r9 : 00000000 r8 : dfa11b80 [ 6.698171] r7 : df9f7ea0 r6 : e6262000 r5 : 00000000 r4 : 00000000 [ 6.704680] r3 : 00000000 r2 : e6262000 r1 : 600f0193 r0 : c05b3750 [ 6.711194] Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel [ 6.718485] Control: 10c53c7d Table: 5e46806a DAC: 00000015 [ 6.724218] Process kworker/0:1 (pid: 31, stack limit = 0xdf9f6238) [ 6.730465] Stack: (0xdf9f7d58 to 0xdf9f8000) [ 6.914325] [<c001b7b8>] (show_pte+0x80/0xb8) from [<c047107c>] (__do_kernel_fault.part.9+0x44/0x74) [ 6.923425] [<c047107c>] (__do_kernel_fault.part.9+0x44/0x74) from [<c001bb7c>] (do_page_fault+0x2c4/0x360) [ 6.933144] [<c001bb7c>] (do_page_fault+0x2c4/0x360) from [<c0008400>] (do_DataAbort+0x34/0x9c) [ 6.941825] [<c0008400>] (do_DataAbort+0x34/0x9c) from [<c000e5d8>] (__dabt_svc+0x38/0x60) [ 6.950058] Exception stack(0xdf9f7ea0 to 0xdf9f7ee8) [ 6.955099] 7ea0: df0c1790 00000000 00000002 00000000 df0c1794 df0c1790 df0c1790 00000042 [ 6.963271] 7ec0: df0c1794 00000001 00000000 00000009 00000000 df9f7ee8 c0306268 c0306270 [ 6.971419] 7ee0: a00f0113 ffffffff [ 6.974902] [<c000e5d8>] (__dabt_svc+0x38/0x60) from [<c0306270>] (max17040_work+0x8c/0x144) [ 6.983317] [<c0306270>] (max17040_work+0x8c/0x144) from [<c003f364>] (process_one_work+0x138/0x440) [ 6.992429] [<c003f364>] (process_one_work+0x138/0x440) from [<c003fa64>] (worker_thread+0x134/0x3b8) [ 7.001628] [<c003fa64>] (worker_thread+0x134/0x3b8) from [<c00454bc>] (kthread+0xa4/0xb0) [ 7.009875] [<c00454bc>] (kthread+0xa4/0xb0) from [<c000eb28>] (ret_from_fork+0x14/0x2c) [ 7.017943] Code: e1a03005 e2422480 e0826104 e59f002c (e7922104) [ 7.024017] ---[ end trace 73bc7006b9cc5c79 ]--- Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Fixes: c6f4a42de60b981dd210de01cd3e575835e3158e Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-18power: bq2471x: fix setting WATCHDOG TimerDane Liu
Need to shift the value in calling regmap_update_bits() bug 1448568 Change-Id: I246fbb97674c9f4a9e5f135139fd8b0118f3e56b Reviewed-on: http://git-master/r/366924 (cherry picked from commit a5e3df4a61d7f58181f92e1aac7e4221dea24d46) Signed-off-by: Dane Liu <danel@nvidia.com> Reviewed-on: http://git-master/r/367560 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-02-18power: bq2471x: fix a NULL pointerDane Liu
Remove a redundant memory allocation, which makes bq2471x->dev a NULL pointer bug 1448568 Change-Id: Ia8c5b92b39eff2c918aa6f618abb010cc08c44da Reviewed-on: http://git-master/r/366467 (cherry picked from commit 04cb5431b6f01b859c0ce536fde41a22c4e49964) Signed-off-by: Dane Liu <danel@nvidia.com> Reviewed-on: http://git-master/r/367559 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
2014-02-18power: bq2477x: fix setting WATCHDOG TimerDane Liu
Need to shift the value in calling regmap_update_bits() bug 1448568 Change-Id: Ib040ff80bc13fa349594699bfcdc5d6073d7da7e Reviewed-on: http://git-master/r/364762 (cherry picked from commit bda0579f427c28e7b8c6caca09d7c23f88d4a738) Signed-off-by: Dane Liu <danel@nvidia.com> Reviewed-on: http://git-master/r/367558 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com> Tested-by: Laxman Dewangan <ldewangan@nvidia.com>