11 #include <linux/kernel.h>
13 #include <linux/rtc.h>
17 #include <linux/module.h>
52 if (tries && time.
bytes[0] == status)
59 if (tries && time.
bytes[1] == status)
66 if (tries && time.
bytes[2] == status)
73 if (tries && time.
bytes[3] == status)
77 }
while (++tries < 5);
85 static int dm355evm_rtc_set_time(
struct device *dev,
struct rtc_time *tm)
120 .read_time = dm355evm_rtc_read_time,
121 .set_time = dm355evm_rtc_set_time,
133 dev_err(&pdev->
dev,
"can't register RTC device, err %ld\n",
137 platform_set_drvdata(pdev, rtc);
144 struct rtc_device *rtc = platform_get_drvdata(pdev);
147 platform_set_drvdata(pdev,
NULL);
156 .probe = dm355evm_rtc_probe,
160 .name =
"rtc-dm355evm",