| /* rtc-generic: RTC driver using the generic RTC abstraction |
| * Copyright (C) 2008 Kyle McMartin <kyle@mcmartin.ca> |
| #include <linux/kernel.h> |
| #include <linux/module.h> |
| #include <linux/platform_device.h> |
| static int __init generic_rtc_probe(struct platform_device *dev) |
| const struct rtc_class_ops *ops = dev_get_platdata(&dev->dev); |
| rtc = devm_rtc_device_register(&dev->dev, "rtc-generic", |
| platform_set_drvdata(dev, rtc); |
| static struct platform_driver generic_rtc_driver = { |
| module_platform_driver_probe(generic_rtc_driver, generic_rtc_probe); |
| MODULE_AUTHOR("Kyle McMartin <kyle@mcmartin.ca>"); |
| MODULE_DESCRIPTION("Generic RTC driver"); |
| MODULE_ALIAS("platform:rtc-generic"); |