diff options
-rw-r--r-- | drivers/power/ab8500_btemp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c index 4a570b6c9e47..adebf6c6d146 100644 --- a/drivers/power/ab8500_btemp.c +++ b/drivers/power/ab8500_btemp.c | |||
@@ -746,22 +746,22 @@ static int ab8500_btemp_get_temp(struct ab8500_btemp *di) | |||
746 | } else { | 746 | } else { |
747 | if (di->events.btemp_low) { | 747 | if (di->events.btemp_low) { |
748 | if (temp > di->btemp_ranges.btemp_low_limit) | 748 | if (temp > di->btemp_ranges.btemp_low_limit) |
749 | temp = di->btemp_ranges.btemp_low_limit; | 749 | temp = di->btemp_ranges.btemp_low_limit * 10; |
750 | else | 750 | else |
751 | temp = di->bat_temp * 10; | 751 | temp = di->bat_temp * 10; |
752 | } else if (di->events.btemp_high) { | 752 | } else if (di->events.btemp_high) { |
753 | if (temp < di->btemp_ranges.btemp_high_limit) | 753 | if (temp < di->btemp_ranges.btemp_high_limit) |
754 | temp = di->btemp_ranges.btemp_high_limit; | 754 | temp = di->btemp_ranges.btemp_high_limit * 10; |
755 | else | 755 | else |
756 | temp = di->bat_temp * 10; | 756 | temp = di->bat_temp * 10; |
757 | } else if (di->events.btemp_lowmed) { | 757 | } else if (di->events.btemp_lowmed) { |
758 | if (temp > di->btemp_ranges.btemp_med_limit) | 758 | if (temp > di->btemp_ranges.btemp_med_limit) |
759 | temp = di->btemp_ranges.btemp_med_limit; | 759 | temp = di->btemp_ranges.btemp_med_limit * 10; |
760 | else | 760 | else |
761 | temp = di->bat_temp * 10; | 761 | temp = di->bat_temp * 10; |
762 | } else if (di->events.btemp_medhigh) { | 762 | } else if (di->events.btemp_medhigh) { |
763 | if (temp < di->btemp_ranges.btemp_med_limit) | 763 | if (temp < di->btemp_ranges.btemp_med_limit) |
764 | temp = di->btemp_ranges.btemp_med_limit; | 764 | temp = di->btemp_ranges.btemp_med_limit * 10; |
765 | else | 765 | else |
766 | temp = di->bat_temp * 10; | 766 | temp = di->bat_temp * 10; |
767 | } else | 767 | } else |
@@ -1030,8 +1030,8 @@ static int ab8500_btemp_probe(struct platform_device *pdev) | |||
1030 | ab8500_btemp_periodic_work); | 1030 | ab8500_btemp_periodic_work); |
1031 | 1031 | ||
1032 | /* Set BTEMP thermal limits. Low and Med are fixed */ | 1032 | /* Set BTEMP thermal limits. Low and Med are fixed */ |
1033 | di->btemp_ranges.btemp_low_limit = BTEMP_THERMAL_LOW_LIMIT; | 1033 | di->btemp_ranges.btemp_low_limit = BTEMP_THERMAL_LOW_LIMIT * 10; |
1034 | di->btemp_ranges.btemp_med_limit = BTEMP_THERMAL_MED_LIMIT; | 1034 | di->btemp_ranges.btemp_med_limit = BTEMP_THERMAL_MED_LIMIT * 10; |
1035 | 1035 | ||
1036 | ret = abx500_get_register_interruptible(di->dev, AB8500_CHARGER, | 1036 | ret = abx500_get_register_interruptible(di->dev, AB8500_CHARGER, |
1037 | AB8500_BTEMP_HIGH_TH, &val); | 1037 | AB8500_BTEMP_HIGH_TH, &val); |