Am 26.08.2017 um 12:44 schrieb Alexandre Belloni: > On 26/08/2017 at 12:16:53 +0200, Heiner Kallweit wrote: >> That's exactly my point. The driver is too big already. >> >> The patches so far increase size of the driver a little, only subsequent >> patches start to reduce it. >> >> More things like even exporting clocks work the same on all chips >> supporting this feature. Just the layout of the alarm registers usually is >> quite different. Therefore it's my plan to create such a ds1307_lib with all >> the generic code. >> >> If it helps I can provide the full patch set (as far as I came so far) via >> Github, then you can check whether it's the right direction also from your >> point of view (w/o having to review each single patch in detail already). >> > > Yes, please do that. > I rebased the patch set on top of your latest ds1307 changes and published it here: https://github.com/hkallweit/linux_rtc_ds1307/tree/rtc-ds1307 Most code went into a new rtc-ds1307-lib library in a generic form, the driver contains mainly chip configuration info now plus chip-specific routines for reading / setting alarm. Now it would require very little effort to e.g. make ds3231 a separate driver because the hwmon code is needed for this chip only. Regards, Heiner >> By the way: This current patch set with the 5 patches I have to change, >> so there will be a v2. No need for you to spend reviewing effort on it now. >> > > Ok, thanks. >