lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202512271235.WwAmAbOa-lkp@intel.com>
Date: Sat, 27 Dec 2025 12:30:27 +0800
From: kernel test robot <lkp@...el.com>
To: Sergiu Cuciurean <sergiu.cuciurean@...log.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-kernel@...r.kernel.org,
 Jonathan Cameron <Jonathan.Cameron@...wei.com>,
 Marcelo Schmitt <marcelo.schmitt@...log.com>,
 Linus Walleij <linus.walleij@...aro.org>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Jonathan Santos <Jonathan.Santos@...log.com>
Subject: drivers/iio/adc/ad7768-1.c:420: undefined reference to
 `gpiochip_get_data'

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@...el.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ