• David Brownell's avatar
    rtc-cmos: export nvram in sysfs · e07e232c
    David Brownell authored
    This makes rtc-cmos export its NVRAM, like several other RTC drivers.
    
    It still works within the limits of the current CMOS_READ/CMOS_WRITE calls,
    which don't understand how to access multiple register banks.  The primary
    impact of that limitation is that Linux can't access the uppermost 128
    bytes of NVRAM on many systems.
    
    Note that this isn't aiming to be a drop-in replacement for the legacy
    /dev/nvram support.  (Presumably that has real users, and isn't just
    getting carried forward automatically?) Userspace handles more work:
    
     - When userspace code updates NVRAM, that will need to include
       updating any platform-specific checksums that may apply.
    
     - No /proc/driver/nvram file will parse and display NVRAM data
       according to whichever boot firmware your board expects.
    
    Also minor pnp-related updates: update a comment, remove dead code.
    Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
    Signed-off-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
    Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e07e232c
rtc-cmos.c 22.5 KB