From: kernel test robot <lkp@intel.com>
To: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Marcelo Schmitt <marcelo.schmitt@analog.com>,
Linus Walleij <linus.walleij@linaro.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Jonathan Santos <Jonathan.Santos@analog.com>
Subject: drivers/iio/adc/ad7768-1.c:420: undefined reference to `gpiochip_get_data'
Date: Sat, 27 Dec 2025 12:30:27 +0800 [thread overview]
Message-ID: <202512271235.WwAmAbOa-lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 04688d6128b7c8b4ccec2913e7f2ff1c4437da96
commit: d569ae0f052e0e44db0e1d69110eba13f5060223 iio: adc: ad7768-1: Add GPIO controller support
date: 6 months ago
config: parisc-randconfig-001-20251227 (https://download.01.org/0day-ci/archive/20251227/202512271235.WwAmAbOa-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251227/202512271235.WwAmAbOa-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202512271235.WwAmAbOa-lkp@intel.com/
All errors (new ones prefixed by >>):
hppa-linux-ld: drivers/iio/adc/ad7768-1.o: in function `ad7768_gpio_get':
>> drivers/iio/adc/ad7768-1.c:420: undefined reference to `gpiochip_get_data'
hppa-linux-ld: drivers/iio/adc/ad7768-1.o: in function `ad7768_gpio_set':
drivers/iio/adc/ad7768-1.c:453: undefined reference to `gpiochip_get_data'
hppa-linux-ld: drivers/iio/adc/ad7768-1.o: in function `ad7768_gpio_init':
>> drivers/iio/adc/ad7768-1.c:498: undefined reference to `devm_gpiochip_add_data_with_key'
hppa-linux-ld: drivers/iio/adc/ad7768-1.o: in function `ad7768_gpio_direction_input':
drivers/iio/adc/ad7768-1.c:387: undefined reference to `gpiochip_get_data'
hppa-linux-ld: drivers/iio/adc/ad7768-1.o: in function `ad7768_gpio_direction_output':
drivers/iio/adc/ad7768-1.c:404: undefined reference to `gpiochip_get_data'
vim +420 drivers/iio/adc/ad7768-1.c
417
418 static int ad7768_gpio_get(struct gpio_chip *chip, unsigned int offset)
419 {
> 420 struct iio_dev *indio_dev = gpiochip_get_data(chip);
421 struct ad7768_state *st = iio_priv(indio_dev);
422 unsigned int val;
423 int ret;
424
425 if (!iio_device_claim_direct(indio_dev))
426 return -EBUSY;
427
428 ret = regmap_read(st->regmap, AD7768_REG_GPIO_CONTROL, &val);
429 if (ret)
430 goto err_release;
431
432 /*
433 * If the GPIO is configured as an output, read the current value from
434 * AD7768_REG_GPIO_WRITE. Otherwise, read the input value from
435 * AD7768_REG_GPIO_READ.
436 */
437 if (val & BIT(offset))
438 ret = regmap_read(st->regmap, AD7768_REG_GPIO_WRITE, &val);
439 else
440 ret = regmap_read(st->regmap, AD7768_REG_GPIO_READ, &val);
441 if (ret)
442 goto err_release;
443
444 ret = !!(val & BIT(offset));
445 err_release:
446 iio_device_release_direct(indio_dev);
447
448 return ret;
449 }
450
451 static int ad7768_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
452 {
453 struct iio_dev *indio_dev = gpiochip_get_data(chip);
454 struct ad7768_state *st = iio_priv(indio_dev);
455 unsigned int val;
456 int ret;
457
458 if (!iio_device_claim_direct(indio_dev))
459 return -EBUSY;
460
461 ret = regmap_read(st->regmap, AD7768_REG_GPIO_CONTROL, &val);
462 if (ret)
463 goto err_release;
464
465 if (val & BIT(offset))
466 ret = regmap_assign_bits(st->regmap, AD7768_REG_GPIO_WRITE,
467 BIT(offset), value);
468
469 err_release:
470 iio_device_release_direct(indio_dev);
471
472 return ret;
473 }
474
475 static int ad7768_gpio_init(struct iio_dev *indio_dev)
476 {
477 struct ad7768_state *st = iio_priv(indio_dev);
478 int ret;
479
480 ret = regmap_write(st->regmap, AD7768_REG_GPIO_CONTROL,
481 AD7768_GPIO_UNIVERSAL_EN);
482 if (ret)
483 return ret;
484
485 st->gpiochip = (struct gpio_chip) {
486 .label = "ad7768_1_gpios",
487 .base = -1,
488 .ngpio = 4,
489 .parent = &st->spi->dev,
490 .can_sleep = true,
491 .direction_input = ad7768_gpio_direction_input,
492 .direction_output = ad7768_gpio_direction_output,
493 .get = ad7768_gpio_get,
494 .set_rv = ad7768_gpio_set,
495 .owner = THIS_MODULE,
496 };
497
> 498 return devm_gpiochip_add_data(&st->spi->dev, &st->gpiochip, indio_dev);
499 }
500
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-12-27 4:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202512271235.WwAmAbOa-lkp@intel.com \
--to=lkp@intel.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Jonathan.Santos@analog.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=sergiu.cuciurean@analog.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox