On Fri, Feb 4, 2022 at 2:02 PM Niklas Cassel <Niklas.Cassel@xxxxxxx> wrote: > From: Niklas Cassel <niklas.cassel@xxxxxxx> Hi Niklas, long time no C! > Setting the output of a GPIO to 1 using gpiod_set_value(), followed by > reading the same GPIO using gpiod_get_value(), will currently yield an > incorrect result. > > This is because the SiFive GPIO device stores the output values in reg_set, > not reg_dat. > > Supply the flag BGPIOF_READ_OUTPUT_REG_SET to bgpio_init() so that the > generic driver reads the correct register. > > Signed-off-by: Niklas Cassel <niklas.cassel@xxxxxxx> Looks like a straight-forward fix so: Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Yours, Linus Walleij