summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorHakan Berg <hakan.berg@stericsson.com>2012-04-12 15:16:52 +0200
committerMathieu J. Poirier <mathieu.poirier@linaro.org>2012-09-25 09:37:05 -0600
commitb55d0305995604127a0d7307b08aaa27d99469b9 (patch)
treed820eceefd1a11f02061d7ff7dd8b19e6dbaee11 /drivers/power
parentad7e88d9d0bab14fdd0c5691b77f3e305f5f4edf (diff)
power: ab8500_bm: Ignore false btemp low interrupt
Ignore the low btemp interrupts for ab8500 3.0 and 3.3 Signed-off-by: Hakan Berg <hakan.berg@stericsson.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/ab8500_btemp.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c
index 45b10ad721e1..04f9decfb90e 100644
--- a/drivers/power/ab8500_btemp.c
+++ b/drivers/power/ab8500_btemp.c
@@ -622,9 +622,9 @@ static irqreturn_t ab8500_btemp_templow_handler(int irq, void *_di)
{
struct ab8500_btemp *di = _di;
- if (is_ab8500_2p0_or_earlier(di->parent)) {
- dev_dbg(di->dev, "Ignore false btemp low irq"
- " for ABB cut 1.0, 1.1 and 2.0\n");
+ if (is_ab8500_3p3_or_earlier(di->parent)) {
+ dev_dbg(di->dev, "Ignore false btemp low irq");
+ dev_dbg(di->dev, " for ABB cut 1.0, 1.1, 2.0 and 3.3\n");
} else {
dev_crit(di->dev, "Battery temperature lower than -10deg c\n");
@@ -738,30 +738,30 @@ static int ab8500_btemp_get_temp(struct ab8500_btemp *di)
int temp = 0;
/*
- * The BTEMP events are not reliabe on AB8500 cut2.0
+ * The BTEMP events are not reliabe on AB8500 cut3.3
* and prior versions
*/
- if (is_ab8500_2p0_or_earlier(di->parent)) {
+ if (is_ab8500_3p3_or_earlier(di->parent)) {
temp = di->bat_temp * 10;
} else {
if (di->events.btemp_low) {
if (temp > di->btemp_ranges.btemp_low_limit)
- temp = di->btemp_ranges.btemp_low_limit;
+ temp = di->btemp_ranges.btemp_low_limit * 10;
else
temp = di->bat_temp * 10;
} else if (di->events.btemp_high) {
if (temp < di->btemp_ranges.btemp_high_limit)
- temp = di->btemp_ranges.btemp_high_limit;
+ temp = di->btemp_ranges.btemp_high_limit * 10;
else
temp = di->bat_temp * 10;
} else if (di->events.btemp_lowmed) {
if (temp > di->btemp_ranges.btemp_med_limit)
- temp = di->btemp_ranges.btemp_med_limit;
+ temp = di->btemp_ranges.btemp_med_limit * 10;
else
temp = di->bat_temp * 10;
} else if (di->events.btemp_medhigh) {
if (temp < di->btemp_ranges.btemp_med_limit)
- temp = di->btemp_ranges.btemp_med_limit;
+ temp = di->btemp_ranges.btemp_med_limit * 10;
else
temp = di->bat_temp * 10;
} else
@@ -1026,8 +1026,8 @@ static int __devinit ab8500_btemp_probe(struct platform_device *pdev)
ab8500_btemp_periodic_work);
/* Set BTEMP thermal limits. Low and Med are fixed */
- di->btemp_ranges.btemp_low_limit = BTEMP_THERMAL_LOW_LIMIT;
- di->btemp_ranges.btemp_med_limit = BTEMP_THERMAL_MED_LIMIT;
+ di->btemp_ranges.btemp_low_limit = BTEMP_THERMAL_LOW_LIMIT * 10;
+ di->btemp_ranges.btemp_med_limit = BTEMP_THERMAL_MED_LIMIT * 10;
ret = abx500_get_register_interruptible(di->dev, AB8500_CHARGER,
AB8500_BTEMP_HIGH_TH, &val);