Hi, On Sat, Jun 1, 2019 at 9:59 AM Linus Walleij <linus.walleij@xxxxxxxxxx> wrote: > > Instead of complex code picking GPIOs out of the device tree > and keeping track of polarity for each GPIO line, use descriptors > and pull polarity handling into the gpiolib. > > We look for "our-claim" and "their-claim" since the gpiolib > code will try e.g. "our-claim-gpios" and "our-claim-gpio" in > turn to locate these GPIO lines from the device tree. > > Cc: Krzysztof Kozlowski <krzk@xxxxxxxxxx> > Cc: Marek Szyprowski <m.szyprowski@xxxxxxxxxxx> > Cc: Doug Anderson <dianders@xxxxxxxxxxxx> > Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> > --- > ChangeLog v1->v2: > - Print some errors if we fail to obtain GPIOs. > - Switch to devm_gpiod_get_index() and !IS_ERR() on the result > to check for an unsupported multimaster set-up. > - Especially handle if the second master returns -EPROBE_DEFER > even in the case of the optional GPIO that we explicitly bail > out on if found, as it may be a sign that the GPIO controllers > are not yet up. > --- > drivers/i2c/muxes/i2c-arb-gpio-challenge.c | 79 ++++++++-------------- > 1 file changed, 27 insertions(+), 52 deletions(-) Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>