diff --git a/drivers/hwmon/sfctemp.c b/drivers/hwmon/sfctemp.c index 1a6ad39909aa55..4c783a5e05c9a1 100644 --- a/drivers/hwmon/sfctemp.c +++ b/drivers/hwmon/sfctemp.c @@ -76,36 +76,34 @@ static irqreturn_t sfctemp_isr(int irq, void *data) struct sfctemp *sfctemp = data; sfctemp->dout = readl(sfctemp->regs); - writel(SFCTEMP_RSTN, sfctemp->regs); + writel(0, sfctemp->regs); complete(&sfctemp->conversion_done); return IRQ_HANDLED; } static void sfctemp_power_up(struct sfctemp *sfctemp) { + /* make sure we're powered down first */ writel(SFCTEMP_PD, sfctemp->regs); udelay(1); writel(0, sfctemp->regs); /* wait t_pu(50us) + t_rst(100ns) */ usleep_range(60, 200); - - writel(SFCTEMP_RSTN, sfctemp->regs); - /* wait t_su(500ps) */ - udelay(1); } static void sfctemp_power_down(struct sfctemp *sfctemp) { - writel(SFCTEMP_RSTN, sfctemp->regs); - udelay(1); - writel(SFCTEMP_PD, sfctemp->regs); - udelay(1); } static void sfctemp_run(struct sfctemp *sfctemp) { + /* de-assert reset */ + writel(SFCTEMP_RSTN, sfctemp->regs); + udelay(1); /* wait t_su(500ps) */ + + /* start conversion */ writel(SFCTEMP_RSTN | SFCTEMP_RUN, sfctemp->regs); }