Content-Type: multipart/mixed; boundary="===============0232997811513431026==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH 6/9] regulator: rpi-panel: Add GPIO control for panel and touch resets Date: Fri, 21 Jan 2022 07:25:51 +0800 Message-ID: <202201210743.XoBKCVhD-lkp@intel.com> In-Reply-To: <20220120152150.1952568-7-detlev.casanova@collabora.com> List-Id: --===============0232997811513431026== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Detlev, I love your patch! Yet something to improve: [auto build test ERROR on broonie-regulator/for-next] [also build test ERROR on linux/master linus/master v5.16 next-20220120] [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/Detlev-Casanova/regulator-= rpi-panel-Support-official-Raspberry-Pi-7-inches-touchscreen/20220120-232556 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator.g= it for-next config: s390-randconfig-r001-20220120 (https://download.01.org/0day-ci/arch= ive/20220121/202201210743.XoBKCVhD-lkp(a)intel.com/config) compiler: s390-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 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/848d1b620ddbd455b87831380= d57719aa0e28bb8 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Detlev-Casanova/regulator-rpi-pane= l-Support-official-Raspberry-Pi-7-inches-touchscreen/20220120-232556 git checkout 848d1b620ddbd455b87831380d57719aa0e28bb8 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Ds390 SHELL=3D/bin/bash drivers/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): drivers/regulator/rpi-panel-attiny-regulator.c: In function 'attiny_i2c_= probe': >> drivers/regulator/rpi-panel-attiny-regulator.c:357:18: error: 'struct gp= io_chip' has no member named 'of_node' 357 | state->gc.of_node =3D i2c->dev.of_node; | ^ At top level: drivers/regulator/rpi-panel-attiny-regulator.c:388:34: warning: 'attiny_= dt_ids' defined but not used [-Wunused-const-variable=3D] 388 | static const struct of_device_id attiny_dt_ids[] =3D { | ^~~~~~~~~~~~~ vim +357 drivers/regulator/rpi-panel-attiny-regulator.c 275 = 276 /* 277 * I2C driver interface functions 278 */ 279 static int attiny_i2c_probe(struct i2c_client *i2c, 280 const struct i2c_device_id *id) 281 { 282 struct backlight_properties props =3D { }; 283 struct regulator_config config =3D { }; 284 struct backlight_device *bl; 285 struct regulator_dev *rdev; 286 struct attiny_lcd *state; 287 struct regmap *regmap; 288 unsigned int data; 289 int ret; 290 = 291 state =3D devm_kzalloc(&i2c->dev, sizeof(*state), GFP_KERNEL); 292 if (!state) 293 return -ENOMEM; 294 = 295 mutex_init(&state->lock); 296 i2c_set_clientdata(i2c, state); 297 = 298 regmap =3D devm_regmap_init_i2c(i2c, &attiny_regmap_config); 299 if (IS_ERR(regmap)) { 300 ret =3D PTR_ERR(regmap); 301 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", 302 ret); 303 goto error; 304 } 305 = 306 ret =3D regmap_read(regmap, REG_ID, &data); 307 if (ret < 0) { 308 dev_err(&i2c->dev, "Failed to read REG_ID reg: %d\n", ret); 309 goto error; 310 } 311 = 312 switch (data) { 313 case 0xde: /* ver 1 */ 314 case 0xc3: /* ver 2 */ 315 break; 316 default: 317 dev_err(&i2c->dev, "Unknown Atmel firmware revision: 0x%02x\n", da= ta); 318 ret =3D -ENODEV; 319 goto error; 320 } 321 = 322 regmap_write(regmap, REG_POWERON, 0); 323 msleep(30); 324 regmap_write(regmap, REG_PWM, 0); 325 = 326 config.dev =3D &i2c->dev; 327 config.regmap =3D regmap; 328 config.of_node =3D i2c->dev.of_node; 329 config.init_data =3D &attiny_regulator_default; 330 config.driver_data =3D state; 331 = 332 rdev =3D devm_regulator_register(&i2c->dev, &attiny_regulator, &con= fig); 333 if (IS_ERR(rdev)) { 334 dev_err(&i2c->dev, "Failed to register ATTINY regulator\n"); 335 ret =3D PTR_ERR(rdev); 336 goto error; 337 } 338 = 339 props.type =3D BACKLIGHT_RAW; 340 props.max_brightness =3D 0xff; 341 = 342 state->regmap =3D regmap; 343 = 344 bl =3D devm_backlight_device_register(&i2c->dev, dev_name(&i2c->dev= ), 345 &i2c->dev, state, &attiny_bl, 346 &props); 347 if (IS_ERR(bl)) { 348 ret =3D PTR_ERR(bl); 349 goto error; 350 } 351 = 352 bl->props.brightness =3D 0xff; 353 = 354 state->gc.parent =3D &i2c->dev; 355 state->gc.label =3D i2c->name; 356 state->gc.owner =3D THIS_MODULE; > 357 state->gc.of_node =3D i2c->dev.of_node; 358 state->gc.base =3D -1; 359 state->gc.ngpio =3D NUM_GPIO; 360 = 361 state->gc.set =3D attiny_gpio_set; 362 state->gc.get_direction =3D attiny_gpio_get_direction; 363 state->gc.can_sleep =3D true; 364 = 365 ret =3D devm_gpiochip_add_data(&i2c->dev, &state->gc, state); 366 if (ret) { 367 dev_err(&i2c->dev, "Failed to create gpiochip: %d\n", ret); 368 goto error; 369 } 370 = 371 return 0; 372 = 373 error: 374 mutex_destroy(&state->lock); 375 = 376 return ret; 377 } 378 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============0232997811513431026==--