X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Frtc.h;h=6d5e4a46781ef1ca6dff692b6685e2e645c42153;hb=2e27afb300b56d83bb03fbfa68852b9c1e2920c6;hp=5e22d4510d11107eb67ffdb3c82f378ef1f9eccc;hpb=9cdf083f981b8d37b3212400a359368661385099;p=linux-2.6-omap-h63xx.git diff --git a/include/linux/rtc.h b/include/linux/rtc.h index 5e22d4510d1..6d5e4a46781 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -4,7 +4,7 @@ * service. It is used with both the legacy mc146818 and also EFI * Struct rtc_time and first 12 ioctl by Paul Gortmaker, 1996 - separated out * from to this file for 2.4 kernels. - * + * * Copyright (C) 1999 Hewlett-Packard Co. * Copyright (C) 1999 Stephane Eranian */ @@ -13,7 +13,7 @@ /* * The struct used to pass data via the following ioctl. Similar to the - * struct tm in , but it needs to be here so that the kernel + * struct tm in , but it needs to be here so that the kernel * source is self contained, allowing cross-compiles, etc. etc. */ @@ -50,7 +50,7 @@ struct rtc_wkalrm { * pll_value*pll_posmult/pll_clock * -ve pll_value means clock will run slower by * pll_value*pll_negmult/pll_clock - */ + */ struct rtc_pll_info { int pll_ctrl; /* placeholder for fancier control */ @@ -106,7 +106,6 @@ extern int rtc_year_days(unsigned int day, unsigned int month, unsigned int year extern int rtc_valid_tm(struct rtc_time *tm); extern int rtc_tm_to_time(struct rtc_time *tm, unsigned long *time); extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm); -extern void rtc_merge_alarm(struct rtc_time *now, struct rtc_time *alarm); #include #include @@ -136,7 +135,7 @@ struct rtc_task; struct rtc_device { - struct class_device class_dev; + struct device dev; struct module *owner; int id; @@ -145,7 +144,6 @@ struct rtc_device const struct rtc_class_ops *ops; struct mutex ops_lock; - struct class_device *rtc_dev; struct cdev char_dev; struct mutex char_lock; @@ -169,35 +167,34 @@ struct rtc_device unsigned int uie_timer_active:1; #endif }; -#define to_rtc_device(d) container_of(d, struct rtc_device, class_dev) +#define to_rtc_device(d) container_of(d, struct rtc_device, dev) extern struct rtc_device *rtc_device_register(const char *name, struct device *dev, const struct rtc_class_ops *ops, struct module *owner); -extern void rtc_device_unregister(struct rtc_device *rdev); -extern int rtc_interface_register(struct class_interface *intf); +extern void rtc_device_unregister(struct rtc_device *rtc); -extern int rtc_read_time(struct class_device *class_dev, struct rtc_time *tm); -extern int rtc_set_time(struct class_device *class_dev, struct rtc_time *tm); -extern int rtc_set_mmss(struct class_device *class_dev, unsigned long secs); -extern int rtc_read_alarm(struct class_device *class_dev, +extern int rtc_read_time(struct rtc_device *rtc, struct rtc_time *tm); +extern int rtc_set_time(struct rtc_device *rtc, struct rtc_time *tm); +extern int rtc_set_mmss(struct rtc_device *rtc, unsigned long secs); +extern int rtc_read_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alrm); -extern int rtc_set_alarm(struct class_device *class_dev, +extern int rtc_set_alarm(struct rtc_device *rtc, struct rtc_wkalrm *alrm); -extern void rtc_update_irq(struct class_device *class_dev, +extern void rtc_update_irq(struct rtc_device *rtc, unsigned long num, unsigned long events); -extern struct class_device *rtc_class_open(char *name); -extern void rtc_class_close(struct class_device *class_dev); +extern struct rtc_device *rtc_class_open(char *name); +extern void rtc_class_close(struct rtc_device *rtc); -extern int rtc_irq_register(struct class_device *class_dev, +extern int rtc_irq_register(struct rtc_device *rtc, struct rtc_task *task); -extern void rtc_irq_unregister(struct class_device *class_dev, +extern void rtc_irq_unregister(struct rtc_device *rtc, struct rtc_task *task); -extern int rtc_irq_set_state(struct class_device *class_dev, +extern int rtc_irq_set_state(struct rtc_device *rtc, struct rtc_task *task, int enabled); -extern int rtc_irq_set_freq(struct class_device *class_dev, +extern int rtc_irq_set_freq(struct rtc_device *rtc, struct rtc_task *task, int freq); typedef struct rtc_task {