Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions drivers/rtc/rtc-loongson.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@ static irqreturn_t loongson_rtc_isr(int irq, void *id)
struct loongson_rtc_priv *priv = (struct loongson_rtc_priv *)id;

rtc_update_irq(priv->rtcdev, 1, RTC_AF | RTC_IRQF);

/*
* The TOY_MATCH0_REG should be cleared 0 here,
* otherwise the interrupt cannot be cleared.
*/
regmap_write(priv->regmap, TOY_MATCH0_REG, 0);

return IRQ_HANDLED;
}

Expand All @@ -131,11 +138,7 @@ static u32 loongson_rtc_handler(void *id)
writel(RTC_STS, priv->pm_base + PM1_STS_REG);
spin_unlock(&priv->lock);

/*
* The TOY_MATCH0_REG should be cleared 0 here,
* otherwise the interrupt cannot be cleared.
*/
return regmap_write(priv->regmap, TOY_MATCH0_REG, 0);
return ACPI_INTERRUPT_HANDLED;
}

static int loongson_rtc_set_enabled(struct device *dev)
Expand Down
Loading