• Darren Hart's avatar
    mfd: lpc_sch: Accomodate partial population of the MFD devices · 5829e9b6
    Darren Hart authored
    The current probe aborts if any of the 3 base address registers are
    disabled. On a TunnelCreek system I am working on, this resulted in the
    SMBIOS and GPIO devices being removed when it couldn't read the base
    address for the watchdog timer.
    
    This patch accommodates partial population of the lpc_sch_cells array and
    only aborts if all the base address registers are disabled. A max size
    array is allocated and the individual device cells are added to it after
    their base addresses are successfully determined. This simplifies the
    code a bit by removing the need for the separate tunnelcreek cells array
    and combining some of the add/remove logic.
    
    Cc: Grant Likely <grant.likely@secretlab.ca>,
    Cc: Denis Turischev <denis@compulab.co.il>,
    Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
    Cc: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarDarren Hart <dvhart@linux.intel.com>
    Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
    5829e9b6
lpc_sch.c 4.82 KB