17 #include <linux/module.h>
18 #include <linux/rtc.h>
19 #include <linux/slab.h>
24 #define DRV_VERSION "1.0"
38 #define M48T35_RTC_SET 0x80
39 #define M48T35_RTC_READ 0x40
60 spin_lock_irq(&priv->
lock);
61 control =
readb(&priv->
reg->control);
70 spin_unlock_irq(&priv->
lock);
125 spin_lock_irq(&priv->
lock);
126 control =
readb(&priv->
reg->control);
135 spin_unlock_irq(&priv->
lock);
140 .read_time = m48t35_read_time,
141 .set_time = m48t35_set_time,
157 priv->
size = resource_size(res);
162 #ifndef CONFIG_SGI_IP27
177 platform_set_drvdata(pdev, priv);
181 if (IS_ERR(priv->
rtc)) {
182 ret = PTR_ERR(priv->
rtc);
199 struct m48t35_priv *priv = platform_get_drvdata(pdev);
203 #ifndef CONFIG_SGI_IP27
212 .name =
"rtc-m48t35",
215 .probe = m48t35_probe,