[PATCH] ds1337 driver works also with ds1339 chip

Russell King rmk+lkml at arm.linux.org.uk
Tue May 10 14:48:35 CEST 2005


On Tue, May 10, 2005 at 02:08:04PM +0200, Ladislav Michl wrote:
> On Wed, May 04, 2005 at 12:07:11PM +0200, Jean Delvare wrote:
> > > Chip is searched by bus number rather than its own proprietary id.
> > 
> > Yes, I think it makes much more sense (especially since the proprietary
> > id was not known by anyone outside of the ds1337 driver).
> > 
> > I think I understand that ds1337_do_command() will be called from some
> > other kernel driver. Why isn't it exported then? I'd expect:
> > EXPORT_SYMBOL(ds1337_do_command);
> 
> RTC is hooked early in boot process. It should be available even sooner
> than rootfs is mounted. Therefore RTC drivers are usualy compiled in
> kernel. Anyway, exporting that function shouldn't hurt :)

You don't have to set the kernel time during time_init(), and this
is especially true with I2C RTCs.  The only thing that time_init()
has to do is to start the kernel tick going.

There is no reason why it can't be initialised during the normal
driver initialisation - which is how we do it on a number of ARM
platforms.

There are some ARM platforms where we can only get the time via
ntpdate, and this is also satisfactory.

So please don't get hung up on the x86 way of doing things.  It's
both conceptually wrong and actually unnecessary.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core



More information about the lm-sensors mailing list