Re: [PATCH v6 2/3] gpio: add a reusable generic gpio_chip using regmap

2020-05-28 Thread Pierre-Louis Bossart
+    /* if we have a direction register we need both input and output */ +    if ((config->reg_dir_out_base || config->reg_dir_in_base) && +    (!config->reg_dat_base || !config->reg_set_base)) +    return ERR_PTR(-EINVAL);  This failed for me since I didn't have the 'dat' base assign

Re: [PATCH v6 2/3] gpio: add a reusable generic gpio_chip using regmap

2020-05-28 Thread Michael Walle
Am 2020-05-28 17:55, schrieb Pierre-Louis Bossart: +/* if we have a direction register we need both input and output */ +if ((config->reg_dir_out_base || config->reg_dir_in_base) && +(!config->reg_dat_base || !config->reg_set_base)) +return ERR_PTR(-EINVAL); This failed

[PATCH v6 2/3] gpio: add a reusable generic gpio_chip using regmap

2020-05-28 Thread Michael Walle
There are quite a lot simple GPIO controller which are using regmap to access the hardware. This driver tries to be a base to unify existing code into one place. This won't cover everything but it should be a good starting point. It does not implement its own irq_chip because there is already a ge