diff options
-rw-r--r-- | drivers/power/ab8500_btemp.c | 8 | ||||
-rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/power/ab8500_btemp.c b/drivers/power/ab8500_btemp.c index adebf6c6d146..b3f6467da7f3 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) | |||
622 | { | 622 | { |
623 | struct ab8500_btemp *di = _di; | 623 | struct ab8500_btemp *di = _di; |
624 | 624 | ||
625 | if (is_ab8500_2p0_or_earlier(di->parent)) { | 625 | if (is_ab8500_3p3_or_earlier(di->parent)) { |
626 | dev_dbg(di->dev, "Ignore false btemp low irq" | 626 | dev_dbg(di->dev, "Ignore false btemp low irq" |
627 | " for ABB cut 1.0, 1.1 and 2.0\n"); | 627 | " for ABB cut 1.0, 1.1, 2.0 and 3.3\n"); |
628 | } else { | 628 | } else { |
629 | dev_crit(di->dev, "Battery temperature lower than -10deg c\n"); | 629 | dev_crit(di->dev, "Battery temperature lower than -10deg c\n"); |
630 | 630 | ||
@@ -738,10 +738,10 @@ static int ab8500_btemp_get_temp(struct ab8500_btemp *di) | |||
738 | int temp = 0; | 738 | int temp = 0; |
739 | 739 | ||
740 | /* | 740 | /* |
741 | * The BTEMP events are not reliabe on AB8500 cut2.0 | 741 | * The BTEMP events are not reliabe on AB8500 cut3.3 |
742 | * and prior versions | 742 | * and prior versions |
743 | */ | 743 | */ |
744 | if (is_ab8500_2p0_or_earlier(di->parent)) { | 744 | if (is_ab8500_3p3_or_earlier(di->parent)) { |
745 | temp = di->bat_temp * 10; | 745 | temp = di->bat_temp * 10; |
746 | } else { | 746 | } else { |
747 | if (di->events.btemp_low) { | 747 | if (di->events.btemp_low) { |
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 1cb5698b4d76..9dd9b99099df 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h | |||
@@ -335,6 +335,11 @@ static inline int is_ab8500_2p0_or_earlier(struct ab8500 *ab) | |||
335 | return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT2P0)); | 335 | return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT2P0)); |
336 | } | 336 | } |
337 | 337 | ||
338 | static inline int is_ab8500_3p3_or_earlier(struct ab8500 *ab) | ||
339 | { | ||
340 | return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT3P3)); | ||
341 | } | ||
342 | |||
338 | /* exclude also ab8505, ab9540... */ | 343 | /* exclude also ab8505, ab9540... */ |
339 | static inline int is_ab8500_2p0(struct ab8500 *ab) | 344 | static inline int is_ab8500_2p0(struct ab8500 *ab) |
340 | { | 345 | { |