Re: [rtc-linux] Re: [PATCH/RFC 0/5] Generic RTC class driver

From: Geert Uytterhoeven
Date: Tue Feb 24 2009 - 12:56:30 EST


On Mon, 23 Feb 2009, Alessandro Zummo wrote:
> On Mon, 23 Feb 2009 13:34:49 +0100 (CET)
> Geert Uytterhoeven <Geert.Uytterhoeven@xxxxxxxxxxx> wrote:
> > > my opinion on this kind of stuff is that I want to avoid the layering
> > > of implementations under the rtc subsystem. I'd rather prefer that each
> > > rtc device had its own driver.
> > >
> > > I've made error in the past, by accepting such kind of drivers, and
> > > would like to avoid that it happens again.
> >
> > So you want us to kill the ppc_md.[gs]et_rtc_time() [ppc], mach_hwclk() [m68k],
> > mach_gettod() [m68knommu] (and probably a few other) abstractions, and move all
> > RTC code out of arch/ into seperate drivers under drivers/rtc/ instead?
>
> not all at once :)
>
> I'd start writing a working driver and then see how we should eventually
> adapt the rtc subsystem to cope with your needs.

OK, so here's a first example: rtc-ps3.

Note that this single patch adds 100+ lines of code, while my previous patch
series removed 500+ lines of code, while solving the autoloading problem for
several ppc and m68k platforms.

Converting all (ca. 20?) ppc and m68k RTC support code into individual RTC
class drivers would add ca. 100+ lines of code for each individual driver.