Hi "Álvaro,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on pinctrl/devel]
[also build test ERROR on robh/for-next gpio/for-next v5.12-rc3 next-20210319]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/lvaro-Fern-ndez-Rojas/pinctrl-ad...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl.git devel
config: xtensa-randconfig-r014-20210318 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://github.com/0day-ci/linux/commit/46aec6ed90edf467c2e19c6e91e17d6b7...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
lvaro-Fern-ndez-Rojas/pinctrl-add-BCM63XX-pincontrol-support/20210307-115258
git checkout 46aec6ed90edf467c2e19c6e91e17d6b7567967f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpio/gpio-regmap.c: In function 'gpio_regmap_register':
> drivers/gpio/gpio-regmap.c:253:7: error: 'struct
gpio_chip' has no member named 'of_node'
253 | chip->of_node =
to_of_node(config->fwnode);
| ^~
drivers/gpio/gpio-regmap.c:255:7: error: 'struct gpio_chip' has no member named
'of_node'
255 | chip->of_node = dev_of_node(config->parent);
| ^~
vim +253 drivers/gpio/gpio-regmap.c
192
193 /**
194 * gpio_regmap_register() - Register a generic regmap GPIO controller
195 * @config: configuration for gpio_regmap
196 *
197 * Return: A pointer to the registered gpio_regmap or ERR_PTR error value.
198 */
199 struct gpio_regmap *gpio_regmap_register(const struct gpio_regmap_config *config)
200 {
201 struct gpio_regmap *gpio;
202 struct gpio_chip *chip;
203 int ret;
204
205 if (!config->parent)
206 return ERR_PTR(-EINVAL);
207
208 if (!config->ngpio)
209 return ERR_PTR(-EINVAL);
210
211 /* we need at least one */
212 if (!config->reg_dat_base && !config->reg_set_base)
213 return ERR_PTR(-EINVAL);
214
215 /* if we have a direction register we need both input and output */
216 if ((config->reg_dir_out_base || config->reg_dir_in_base) &&
217 (!config->reg_dat_base || !config->reg_set_base))
218 return ERR_PTR(-EINVAL);
219
220 /* we don't support having both registers simultaneously for now */
221 if (config->reg_dir_out_base && config->reg_dir_in_base)
222 return ERR_PTR(-EINVAL);
223
224 gpio = kzalloc(sizeof(*gpio), GFP_KERNEL);
225 if (!gpio)
226 return ERR_PTR(-ENOMEM);
227
228 gpio->parent = config->parent;
229 gpio->regmap = config->regmap;
230 gpio->ngpio_per_reg = config->ngpio_per_reg;
231 gpio->reg_stride = config->reg_stride;
232 gpio->reg_mask_xlate = config->reg_mask_xlate;
233 gpio->reg_dat_base = config->reg_dat_base;
234 gpio->reg_set_base = config->reg_set_base;
235 gpio->reg_clr_base = config->reg_clr_base;
236 gpio->reg_dir_in_base = config->reg_dir_in_base;
237 gpio->reg_dir_out_base = config->reg_dir_out_base;
238
239 /* if not set, assume there is only one register */
240 if (!gpio->ngpio_per_reg)
241 gpio->ngpio_per_reg = config->ngpio;
242
243 /* if not set, assume they are consecutive */
244 if (!gpio->reg_stride)
245 gpio->reg_stride = 1;
246
247 if (!gpio->reg_mask_xlate)
248 gpio->reg_mask_xlate = gpio_regmap_simple_xlate;
249
250 chip = &gpio->gpio_chip;
251 chip->parent = config->parent;
252 if (config->fwnode)
253 chip->of_node = to_of_node(config->fwnode);
254 else
255 chip->of_node = dev_of_node(config->parent);
256 chip->base = -1;
257 chip->ngpio = config->ngpio;
258 chip->names = config->names;
259 chip->label = config->label ?: dev_name(config->parent);
260
261 /*
262 * If our regmap is fast_io we should probably set can_sleep to false.
263 * Right now, the regmap doesn't save this property, nor is there any
264 * access function for it.
265 * The only regmap type which uses fast_io is regmap-mmio. For now,
266 * assume a safe default of true here.
267 */
268 chip->can_sleep = true;
269
270 chip->get = gpio_regmap_get;
271 if (gpio->reg_set_base && gpio->reg_clr_base)
272 chip->set = gpio_regmap_set_with_clear;
273 else if (gpio->reg_set_base)
274 chip->set = gpio_regmap_set;
275
276 if (gpio->reg_dir_in_base || gpio->reg_dir_out_base) {
277 chip->get_direction = gpio_regmap_get_direction;
278 chip->direction_input = gpio_regmap_direction_input;
279 chip->direction_output = gpio_regmap_direction_output;
280 }
281
282 ret = gpiochip_add_data(chip, gpio);
283 if (ret < 0)
284 goto err_free_gpio;
285
286 if (config->irq_domain) {
287 ret = gpiochip_irqchip_add_domain(chip, config->irq_domain);
288 if (ret)
289 goto err_remove_gpiochip;
290 }
291
292 return gpio;
293
294 err_remove_gpiochip:
295 gpiochip_remove(chip);
296 err_free_gpio:
297 kfree(gpio);
298 return ERR_PTR(ret);
299 }
300 EXPORT_SYMBOL_GPL(gpio_regmap_register);
301
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org