Re: [RFC+PATCH] RTC calibration

From: Clemens Koller
Date: Tue Sep 11 2007 - 10:33:46 EST


Dag-Erling Smørgrav schrieb:
> The STMicroelectronics M41T11 is an RTC chip which is similar in most
> ways to the Dallas/Maxim DS1307 or DS1337, except that it supports
> software calibration:
>
> http://www.st.com/stonline/books/pdf/docs/6103.pdf
>
> I want to use this calibration feature [...]
> [...]
> In order to access this from userland, I've added two ioctls,
> (RTC_SPEED_UP and RTC_SPEED_DOWN) with corresponding functions in
> drivers/rtc/interface.c (rtc_speed_up() and rtc_speed_down()) and
> corresponding slots in rtc_class_ops (speed_up and speed_down).

It looks odd to me to do only differential up and down adjustments.
I would prefer read_calibration_register and write_calibration_register
access and let the userspace decide how much it wants to
increment/decrement the register.

Or - do you adjust your date also after you changed your battery
with +1567days,7h,34m,12sec instead of telling it's 11th Sept. 2007, 4:33pm ?

Regards,

Clemens Koller
__________________________________
R&D Imaging Devices
Anagramm GmbH
Rupert-Mayer-Straße 45/1
Linhof Werksgelände
D-81379 München
Tel.089-741518-50
Fax 089-741518-19
http://www.anagramm-technology.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/