Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367466
b: refs/heads/master
c: da9e83d
h: refs/heads/master
v: v3
  • Loading branch information
Rupesh Kumar authored and Lee Jones committed Mar 7, 2013
1 parent 8666654 commit dde3290
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 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: f7470b5d246294761892f4bafc0eeedaa4369d92
refs/heads/master: da9e83d496039458fe9863540cf52b3f9b450675
22 changes: 21 additions & 1 deletion trunk/drivers/power/pm2301_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,27 @@ static void pm2xxx_charger_check_hw_failure_work(struct work_struct *work)
static void pm2xxx_charger_check_main_thermal_prot_work(
struct work_struct *work)
{
};
int ret;
u8 val;

struct pm2xxx_charger *pm2 = container_of(work, struct pm2xxx_charger,
check_main_thermal_prot_work);

/* Check if die temp warning is still active */
ret = pm2xxx_reg_read(pm2, PM2XXX_SRCE_REG_INT5, &val);
if (ret < 0) {
dev_err(pm2->dev, "%s pm2xxx read failed\n", __func__);
return;
}
if (val & (PM2XXX_INT5_S_ITTHERMALWARNINGRISE
| PM2XXX_INT5_S_ITTHERMALSHUTDOWNRISE))
pm2->flags.main_thermal_prot = true;
else if (val & (PM2XXX_INT5_S_ITTHERMALWARNINGFALL
| PM2XXX_INT5_S_ITTHERMALSHUTDOWNFALL))
pm2->flags.main_thermal_prot = false;

power_supply_changed(&pm2->ac_chg.psy);
}

static struct pm2xxx_interrupts pm2xxx_int = {
.handler[0] = pm2_int_reg0,
Expand Down

0 comments on commit dde3290

Please sign in to comment.