tree: https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git gpio/for-next head: cf5dec80c4e23ac1677b8ef9aafe5a7b87bb18c3 commit: cf5dec80c4e23ac1677b8ef9aafe5a7b87bb18c3 [22/22] gpio: Add gpio delay driver config: i386-buildonly-randconfig-r003-20230605 (https://download.01.org/0day-ci/archive/20230605/202306051102.FyJLV3OH-lkp@xxxxxxxxx/config) compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project 4faf3aaf28226a4e950c103a14f6fc1d1fdabb1b) reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git/commit/?id=cf5dec80c4e23ac1677b8ef9aafe5a7b87bb18c3 git remote add brgl https://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux.git git fetch --no-tags brgl gpio/for-next git checkout cf5dec80c4e23ac1677b8ef9aafe5a7b87bb18c3 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang ~/bin/make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash drivers/gpio/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202306051102.FyJLV3OH-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): >> drivers/gpio/gpio-delay.c:79:34: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip' if (gpiospec->args_count != gc->of_gpio_n_cells) ~~ ^ >> drivers/gpio/gpio-delay.c:133:11: error: no member named 'of_xlate' in 'struct gpio_chip' priv->gc.of_xlate = gpio_delay_of_xlate; ~~~~~~~~ ^ drivers/gpio/gpio-delay.c:134:11: error: no member named 'of_gpio_n_cells' in 'struct gpio_chip' priv->gc.of_gpio_n_cells = 3; ~~~~~~~~ ^ 3 errors generated. vim +79 drivers/gpio/gpio-delay.c 70 71 static int gpio_delay_of_xlate(struct gpio_chip *gc, 72 const struct of_phandle_args *gpiospec, 73 u32 *flags) 74 { 75 struct gpio_delay_priv *priv = gpiochip_get_data(gc); 76 struct gpio_delay_timing *timings; 77 u32 line; 78 > 79 if (gpiospec->args_count != gc->of_gpio_n_cells) 80 return -EINVAL; 81 82 line = gpiospec->args[0]; 83 if (line >= gc->ngpio) 84 return -EINVAL; 85 86 timings = &priv->delay_timings[line]; 87 timings->ramp_up_delay_us = gpiospec->args[1]; 88 timings->ramp_down_delay_us = gpiospec->args[2]; 89 90 return line; 91 } 92 93 static bool gpio_delay_can_sleep(const struct gpio_delay_priv *priv) 94 { 95 int i; 96 97 for (i = 0; i < priv->input_gpio->ndescs; i++) 98 if (gpiod_cansleep(priv->input_gpio->desc[i])) 99 return true; 100 101 return false; 102 } 103 104 static int gpio_delay_probe(struct platform_device *pdev) 105 { 106 struct gpio_delay_priv *priv; 107 108 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); 109 if (!priv) 110 return -ENOMEM; 111 112 priv->input_gpio = devm_gpiod_get_array(&pdev->dev, NULL, GPIOD_OUT_LOW); 113 if (IS_ERR(priv->input_gpio)) 114 return dev_err_probe(&pdev->dev, PTR_ERR(priv->input_gpio), 115 "Failed to get input-gpios"); 116 117 priv->delay_timings = devm_kcalloc(&pdev->dev, 118 priv->input_gpio->ndescs, 119 sizeof(*priv->delay_timings), 120 GFP_KERNEL); 121 if (!priv->delay_timings) 122 return -ENOMEM; 123 124 if (gpio_delay_can_sleep(priv)) { 125 priv->gc.can_sleep = true; 126 priv->gc.set = gpio_delay_set_can_sleep; 127 } else { 128 priv->gc.can_sleep = false; 129 priv->gc.set = gpio_delay_set; 130 } 131 132 priv->gc.get_direction = gpio_delay_get_direction; > 133 priv->gc.of_xlate = gpio_delay_of_xlate; 134 priv->gc.of_gpio_n_cells = 3; 135 priv->gc.ngpio = priv->input_gpio->ndescs; 136 priv->gc.owner = THIS_MODULE; 137 priv->gc.base = -1; 138 priv->gc.parent = &pdev->dev; 139 140 platform_set_drvdata(pdev, priv); 141 142 return devm_gpiochip_add_data(&pdev->dev, &priv->gc, priv); 143 } 144 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki