aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-tps65910.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-tps65910.c')
-rw-r--r--drivers/rtc/rtc-tps65910.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 7a82337e4dee..e5fef141a0e2 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -222,7 +222,7 @@ static const struct rtc_class_ops tps65910_rtc_ops = {
222 .alarm_irq_enable = tps65910_rtc_alarm_irq_enable, 222 .alarm_irq_enable = tps65910_rtc_alarm_irq_enable,
223}; 223};
224 224
225static int __devinit tps65910_rtc_probe(struct platform_device *pdev) 225static int tps65910_rtc_probe(struct platform_device *pdev)
226{ 226{
227 struct tps65910 *tps65910 = NULL; 227 struct tps65910 *tps65910 = NULL;
228 struct tps65910_rtc *tps_rtc = NULL; 228 struct tps65910_rtc *tps_rtc = NULL;
@@ -247,6 +247,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
247 return ret; 247 return ret;
248 248
249 dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n"); 249 dev_dbg(&pdev->dev, "Enabling rtc-tps65910.\n");
250
251 /* Enable RTC digital power domain */
252 ret = regmap_update_bits(tps65910->regmap, TPS65910_DEVCTRL,
253 DEVCTRL_RTC_PWDN_MASK, 0 << DEVCTRL_RTC_PWDN_SHIFT);
254 if (ret < 0)
255 return ret;
256
250 rtc_reg = TPS65910_RTC_CTRL_STOP_RTC; 257 rtc_reg = TPS65910_RTC_CTRL_STOP_RTC;
251 ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg); 258 ret = regmap_write(tps65910->regmap, TPS65910_RTC_CTRL, rtc_reg);
252 if (ret < 0) 259 if (ret < 0)
@@ -261,7 +268,7 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
261 268
262 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, 269 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
263 tps65910_rtc_interrupt, IRQF_TRIGGER_LOW, 270 tps65910_rtc_interrupt, IRQF_TRIGGER_LOW,
264 "rtc-tps65910", &pdev->dev); 271 dev_name(&pdev->dev), &pdev->dev);
265 if (ret < 0) { 272 if (ret < 0) {
266 dev_err(&pdev->dev, "IRQ is not free.\n"); 273 dev_err(&pdev->dev, "IRQ is not free.\n");
267 return ret; 274 return ret;
@@ -285,14 +292,14 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
285 * Disable tps65910 RTC interrupts. 292 * Disable tps65910 RTC interrupts.
286 * Sets status flag to free. 293 * Sets status flag to free.
287 */ 294 */
288static int __devexit tps65910_rtc_remove(struct platform_device *pdev) 295static int tps65910_rtc_remove(struct platform_device *pdev)
289{ 296{
290 /* leave rtc running, but disable irqs */ 297 /* leave rtc running, but disable irqs */
291 struct rtc_device *rtc = platform_get_drvdata(pdev); 298 struct tps65910_rtc *tps_rtc = platform_get_drvdata(pdev);
292 299
293 tps65910_rtc_alarm_irq_enable(&rtc->dev, 0); 300 tps65910_rtc_alarm_irq_enable(&pdev->dev, 0);
294 301
295 rtc_device_unregister(rtc); 302 rtc_device_unregister(tps_rtc->rtc);
296 return 0; 303 return 0;
297} 304}
298 305
@@ -335,7 +342,7 @@ static const struct dev_pm_ops tps65910_rtc_pm_ops = {
335 342
336static struct platform_driver tps65910_rtc_driver = { 343static struct platform_driver tps65910_rtc_driver = {
337 .probe = tps65910_rtc_probe, 344 .probe = tps65910_rtc_probe,
338 .remove = __devexit_p(tps65910_rtc_remove), 345 .remove = tps65910_rtc_remove,
339 .driver = { 346 .driver = {
340 .owner = THIS_MODULE, 347 .owner = THIS_MODULE,
341 .name = "tps65910-rtc", 348 .name = "tps65910-rtc",