On Tue, Dec 05, 2017 at 09:39:48AM +0100, Linus Walleij wrote: > On Mon, Dec 4, 2017 at 1:36 PM, Wolfram Sang > wrote: > > > This will be needed when we want to create STOP conditions, too, later. > > Create the needed fields and populate them for the GPIO case if the GPIO > > is set to output. > > > > Cc: Phil Reid > > Cc: Andy Shevchenko > > Cc: Jarkko Nikula > > Cc: Claudio Foellmi > > Cc: Andrzej Hajda > > Signed-off-by: Wolfram Sang > > (...) > > #include > > +#include > > Please no. > > > + if (gpiod_get_direction(bri->sda_gpiod) == GPIOF_DIR_OUT) > > + bri->set_sda = set_sda_gpio_value; > > Just compare it to zero. if (!gpiod_get_direction()) Okay, for now, I'll do: /* FIXME: add proper flag once provided by GPIO core */ if (gpiod_get_direction(bri->sda_gpiod) == 0) Thanks! Wolfram