• David Brownell's avatar
    rtc-ds1307 cleanups · 045e0e85
    David Brownell authored
    This updates the rtc-ds1307 driver so that converting it to a "new style"
    driver (driver model, not legacy i2c model) will involve fewer changes.
    
     - Use pointer to i2c_client almost everywhere, so that it's easy
       to let the i2c core create that object;
    
     - Avoid using i2c_client.adapter, since that field is redundant and
       thus may go away (same object as i2c_client.dev.parent).
    
     - Extend type enum to include various RTCs this is expected to
       work with, and include register support for them.
    
    It also cleans up the support for multiple chip types, and fixes a
    glitch that could appear with an un-initialized RTC.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    045e0e85
rtc-ds1307.c 11.5 KB