• Linus Walleij's avatar
    regulator: max8952: Convert to use GPIO descriptors · fd742eaa
    Linus Walleij authored
    This finalizes the descriptor conversion of the MAX8952 driver
    by letting the VID0 and VID1 GPIOs be fetched from descriptors.
    
    Both VID0 and VID1 must be supplied for the VID selection to work,
    I add some code to preserve the semantics that if only one of
    the two VID gpios is supplied, it will be initialized to low.
    This might be a bit overzealous, but I want to preserve any
    implicit semantics.
    
    This is currently only used by device tree in-kernel but it is
    still also possible to supply the same GPIOs using a machine
    descriptor table if a board file is used.
    
    Ideally this should be phased over to using gpio-regulator.c
    that does the same thing, but it might require some refactoring
    and needs testing on real hardware.
    
    Cc: Tomasz Figa <tfiga@chromium.org>
    Cc: MyungJoo Ham <myungjoo.ham@samsung.com>
    Cc: Marek Szyprowski <m.szyprowski@samsung.com>
    Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    fd742eaa
max8952.c 9.45 KB