• David Brownell's avatar
    twl4030: improve rtc device setup · 74fcfe9c
    David Brownell authored
    Make the twl4030 RTC initialization follow the driver model better.
    The platform device is created (if needed) as part of twl4030 setup
    instead of as a board-specific thing, and fits properly into the
    driver model tree.
    
    The only minor glitch here is on boards using platform_data to pass
    MSECURE initialization hooks to the RTC driver.  The right solution
    probably just removes that platform_data, and might even make Linux
    follow the principle of "least privilege" (at the hardware level!)
    instead of always holding this signal high.
    
    Pending better handling of MSECURE, this patch just does what the
    RTC init does, but earlier:  MSECURE is always high, so the RTC time
    and calendar registers can be updated (and presumably a bunch of
    non-RTC privileged operations will be allowed too).
    
    Yet to be done:  set up the IRQ resource; make the rtc driver use
    that IRQ resource; and properly issue wakeup alarms.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
    74fcfe9c
twl4030-core.c 27.8 KB