Commit d231d32c authored by Alexandre Belloni's avatar Alexandre Belloni

rtc: imxdi: use .set_time

Use .set_time instead of the deprecated .set_mmss.
Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 93059793
...@@ -561,7 +561,7 @@ static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm) ...@@ -561,7 +561,7 @@ static int dryice_rtc_read_time(struct device *dev, struct rtc_time *tm)
* set the seconds portion of dryice time counter and clear the * set the seconds portion of dryice time counter and clear the
* fractional part. * fractional part.
*/ */
static int dryice_rtc_set_mmss(struct device *dev, unsigned long secs) static int dryice_rtc_set_time(struct device *dev, struct rtc_time *tm)
{ {
struct imxdi_dev *imxdi = dev_get_drvdata(dev); struct imxdi_dev *imxdi = dev_get_drvdata(dev);
u32 dcr, dsr; u32 dcr, dsr;
...@@ -588,7 +588,7 @@ static int dryice_rtc_set_mmss(struct device *dev, unsigned long secs) ...@@ -588,7 +588,7 @@ static int dryice_rtc_set_mmss(struct device *dev, unsigned long secs)
if (rc != 0) if (rc != 0)
return rc; return rc;
rc = di_write_wait(imxdi, secs, DTCMR); rc = di_write_wait(imxdi, rtc_tm_to_time64(tm), DTCMR);
if (rc != 0) if (rc != 0)
return rc; return rc;
...@@ -666,7 +666,7 @@ static int dryice_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm) ...@@ -666,7 +666,7 @@ static int dryice_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *alarm)
static const struct rtc_class_ops dryice_rtc_ops = { static const struct rtc_class_ops dryice_rtc_ops = {
.read_time = dryice_rtc_read_time, .read_time = dryice_rtc_read_time,
.set_mmss = dryice_rtc_set_mmss, .set_time = dryice_rtc_set_time,
.alarm_irq_enable = dryice_rtc_alarm_irq_enable, .alarm_irq_enable = dryice_rtc_alarm_irq_enable,
.read_alarm = dryice_rtc_read_alarm, .read_alarm = dryice_rtc_read_alarm,
.set_alarm = dryice_rtc_set_alarm, .set_alarm = dryice_rtc_set_alarm,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment