Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350618
b: refs/heads/master
c: d36e3e6
h: refs/heads/master
v: v3
  • Loading branch information
Hakan Berg authored and Anton Vorontsov committed Jan 16, 2013
1 parent ac94c29 commit 3f85448
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5b41aa9f2b3a4e44ca4f68cd3076856bd3d93462
refs/heads/master: d36e3e6d50ccdb5cdef6da0a01dedddd317f23fc
8 changes: 4 additions & 4 deletions trunk/drivers/power/ab8500_btemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
if (is_ab8500_3p3_or_earlier(di->parent)) {
dev_dbg(di->dev, "Ignore false btemp low irq"
" for ABB cut 1.0, 1.1 and 2.0\n");
" 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");

Expand Down Expand Up @@ -738,10 +738,10 @@ 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) {
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/mfd/abx500/ab8500.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,11 @@ static inline int is_ab8500_2p0_or_earlier(struct ab8500 *ab)
return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT2P0));
}

static inline int is_ab8500_3p3_or_earlier(struct ab8500 *ab)
{
return (is_ab8500(ab) && (ab->chip_id <= AB8500_CUT3P3));
}

/* exclude also ab8505, ab9540... */
static inline int is_ab8500_2p0(struct ab8500 *ab)
{
Expand Down

0 comments on commit 3f85448

Please sign in to comment.