All of lore.kernel.org
 help / color / mirror / Atom feed
* [arnd-playground:config-gpio-legacy-7.3 3/3] drivers/i2c/busses/i2c-gpio.c:630:44: error: no member named 'gpio' in 'struct i2c_gpio_private_data'
@ 2026-09-05  4:31 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-09-05  4:31 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git config-gpio-legacy-7.3
head:   c3f3b968d84f40449f767a592ae2363ceab597cb
commit: c3f3b968d84f40449f767a592ae2363ceab597cb [3/3] [RFC] gpiolib: introduce gpio_name() helper
config: x86_64-randconfig-122-20260905 (https://download.01.org/0day-ci/archive/20260905/202609051220.OevyEetw-lkp@intel.com/config)
compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260905/202609051220.OevyEetw-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/202609051220.OevyEetw-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/i2c/busses/i2c-gpio.c:630:44: error: no member named 'gpio' in 'struct i2c_gpio_private_data'
     630 |                  gpiod_name(priv->sda), gpiod_name(priv->gpio),
         |                                                    ~~~~  ^
   1 error generated.


vim +630 drivers/i2c/busses/i2c-gpio.c

   519	
   520	static int i2c_gpio_probe(struct platform_device *pdev)
   521	{
   522		struct i2c_gpio_private_data *priv;
   523		struct i2c_gpio_platform_data *pdata;
   524		struct i2c_algo_bit_data *bit_data;
   525		struct i2c_adapter *adap;
   526		struct device *dev = &pdev->dev;
   527		struct fwnode_handle *fwnode = dev_fwnode(dev);
   528		enum gpiod_flags gflags;
   529		int ret;
   530	
   531		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   532		if (!priv)
   533			return -ENOMEM;
   534	
   535		adap = &priv->adap;
   536		bit_data = &priv->bit_data;
   537		pdata = &priv->pdata;
   538	
   539		if (fwnode) {
   540			i2c_gpio_get_properties(dev, pdata);
   541		} else {
   542			/*
   543			 * If all platform data settings are zero it is OK
   544			 * to not provide any platform data from the board.
   545			 */
   546			if (dev_get_platdata(dev))
   547				memcpy(pdata, dev_get_platdata(dev), sizeof(*pdata));
   548		}
   549	
   550		/*
   551		 * First get the GPIO pins; if it fails, we'll defer the probe.
   552		 * If the SCL/SDA lines are marked "open drain" by platform data or
   553		 * device tree then this means that something outside of our control is
   554		 * marking these lines to be handled as open drain, and we should just
   555		 * handle them as we handle any other output. Else we enforce open
   556		 * drain as this is required for an I2C bus.
   557		 */
   558		if (pdata->sda_is_open_drain || pdata->sda_has_no_pullup)
   559			gflags = GPIOD_OUT_HIGH;
   560		else
   561			gflags = GPIOD_OUT_HIGH_OPEN_DRAIN;
   562		priv->sda = i2c_gpio_get_desc(dev, "sda", 0, gflags);
   563		if (IS_ERR(priv->sda))
   564			return PTR_ERR(priv->sda);
   565	
   566		if (pdata->scl_is_open_drain || pdata->scl_has_no_pullup)
   567			gflags = GPIOD_OUT_HIGH;
   568		else
   569			gflags = GPIOD_OUT_HIGH_OPEN_DRAIN;
   570		priv->scl = i2c_gpio_lookup_scl(dev, gflags);
   571		if (IS_ERR(priv->scl)) {
   572			ret = PTR_ERR(priv->scl);
   573			goto err_cleanup_sda;
   574		}
   575	
   576		if (gpiod_cansleep(priv->sda) || gpiod_cansleep(priv->scl->gpio))
   577			dev_warn(dev, "Slow GPIO pins might wreak havoc into I2C/SMBus bus timing");
   578		else
   579			bit_data->can_do_atomic = true;
   580	
   581		bit_data->skip_bit_test = !!priv->scl->args.fwnode;
   582		bit_data->setsda = i2c_gpio_setsda_val;
   583		bit_data->setscl = i2c_gpio_setscl_val;
   584	
   585		if (!pdata->scl_is_output_only)
   586			bit_data->getscl = i2c_gpio_getscl;
   587		if (!pdata->sda_is_output_only)
   588			bit_data->getsda = i2c_gpio_getsda;
   589	
   590		if (pdata->udelay)
   591			bit_data->udelay = pdata->udelay;
   592		else if (pdata->scl_is_output_only)
   593			bit_data->udelay = 50;			/* 10 kHz */
   594		else
   595			bit_data->udelay = 5;			/* 100 kHz */
   596	
   597		if (pdata->timeout)
   598			bit_data->timeout = pdata->timeout;
   599		else
   600			bit_data->timeout = HZ / 10;		/* 100 ms */
   601	
   602		bit_data->data = priv;
   603	
   604		adap->owner = THIS_MODULE;
   605		if (fwnode)
   606			strscpy(adap->name, dev_name(dev), sizeof(adap->name));
   607		else
   608			snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
   609	
   610		/* Always use shared SCL aware locking */
   611		adap->lock_ops = &i2c_gpio_lock_ops;
   612		adap->algo_data = bit_data;
   613		adap->class = I2C_CLASS_HWMON;
   614		adap->dev.parent = dev;
   615		device_set_node(&adap->dev, fwnode);
   616	
   617		adap->nr = pdev->id;
   618		ret = i2c_bit_add_numbered_bus(adap);
   619		if (ret)
   620			goto err_cleanup_scl;
   621	
   622		platform_set_drvdata(pdev, priv);
   623	
   624		/*
   625		 * FIXME: using global GPIO numbers is not helpful. If/when we
   626		 * get accessors to get the actual name of the GPIO line,
   627		 * from the descriptor, then provide that instead.
   628		 */
   629		dev_info(dev, "using lines %s (SDA) and %s (SCL%s)\n",
 > 630			 gpiod_name(priv->sda), gpiod_name(priv->gpio),
   631			 pdata->scl_is_output_only
   632			 ? ", no clock stretching" : "");
   633	
   634		i2c_gpio_fault_injector_init(pdev);
   635	
   636		return 0;
   637	
   638	err_cleanup_scl:
   639		i2c_gpio_cleanup_scl(priv->scl);
   640	err_cleanup_sda:
   641		gpiod_put(priv->sda);
   642	
   643		return ret;
   644	}
   645	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-05  4:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-05  4:31 [arnd-playground:config-gpio-legacy-7.3 3/3] drivers/i2c/busses/i2c-gpio.c:630:44: error: no member named 'gpio' in 'struct i2c_gpio_private_data' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.