On Wed, Oct 9, 2019 at 12:17 PM Marco Felsch <m.felsch@xxxxxxxxxxxxxx> wrote: > > > > > +static int da9062_gpio_direction_input(struct gpio_chip *gc, > > > > > + unsigned int offset) > > > > > +{ > > > > > + struct da9062_gpio *gpio = gpiochip_get_data(gc); > > > > > + struct regmap *regmap = gpio->da9062->regmap; > > > > > + struct gpio_desc *desc = gpiochip_get_desc(gc, offset); > > > > This won't work anymore since I moved the driver to pinctrl and can't > > include the drivers/gpio/gpiolib.h anymore. What is the right way to > > get the same result within the pinctrl space? There are three possible > > ways: > > 1) Revert commit 1bd6b601fe196b6fbce2c93536ce0f3f53577cec which isn't > > the best due to safeness. > > 2) Set the gpio as active low hard as the other da90*-gpio drivers did > > 3) Introduce a dt-binding (seems wrong because the information is > > already there). > > 4) "Re-implement" the gpiochip_get_desc() functionality driver > > internally. > > 4) won't work didn't recognize that 'struct gpio_device' is an internal > struct. This is after all a gpiochip so it can use the internal structures. Go with #include <../gpio/gpiolib.h> Even if it is a bit ugly. One day I want to join the subsystems into one, and then this would go away, but until then we have to do this messy thing. Yours, Linus Walleij