diff options
| author | Tom Rini <trini@kernel.crashing.org> | 2002-08-12 18:22:03 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-08-12 18:22:03 -0700 |
| commit | a7734ead1659591ee218ec4ed0c64cfb9e33293e (patch) | |
| tree | bc21984bbe5cc573bfa6200a71d42bd832b0f44c /include/linux | |
| parent | 67fbc2cd2e984352ed833d9af8e30931e30ae4b1 (diff) | |
[PATCH] A generic RTC driver [1/3]
This is the current version of the genrtc driver from the m68k
community. This is slightly different than the version I have sent
previously in that it has been switched to C99-style initializers,
which was done in the current m68k CVS tree by Geert Uytterhoeven, and
the needed changes to select/compile it in general. I had previously
asked the m68k community if anyone objected to this being submitted by me,
and I got Richard Zidlicky's (who's at the top of the file) approval, as
well as Geert Uytterhoeven's approval.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/rtc.h | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/include/linux/rtc.h b/include/linux/rtc.h index e99a2357ab28..33edafbe6000 100644 --- a/include/linux/rtc.h +++ b/include/linux/rtc.h @@ -39,10 +39,32 @@ struct rtc_wkalrm { struct rtc_time time; /* time the alarm is set to */ }; +/* + * Data structure to control PLL correction some better RTC feature + * pll_value is used to get or set current value of correction, + * the rest of the struct is used to query HW capabilities. + * This is modeled after the RTC used in Q40/Q60 computers but + * should be sufficiently flexible for other devices + * + * +ve pll_value means clock will run faster by + * 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 */ + int pll_value; /* get/set correction value */ + int pll_max; /* max +ve (faster) adjustment value */ + int pll_min; /* max -ve (slower) adjustment value */ + int pll_posmult; /* factor for +ve corection */ + int pll_negmult; /* factor for -ve corection */ + long pll_clock; /* base PLL frequency */ +}; /* * ioctl calls that are permitted to the /dev/rtc interface, if - * CONFIG_RTC/CONFIG_EFI_RTC was enabled. + * any of the RTC drivers are enabled. */ #define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */ @@ -65,6 +87,8 @@ struct rtc_wkalrm { #define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/ #define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/ +#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */ +#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */ #ifdef __KERNEL__ |
