All of lore.kernel.org
 help / color / mirror / Atom feed
* [sailus-media-tree:master 10/20] drivers/media/i2c/imx290.c:1526:19: error: call to undeclared function 'devm_cci_regmap_init_i2c'; ISO C99 and later do not support implicit function declarations
@ 2023-07-27  8:47 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-07-27  8:47 UTC (permalink / raw)
  To: Hans de Goede
  Cc: llvm, oe-kbuild-all, linux-media, Sakari Ailus, Laurent Pinchart

tree:   git://linuxtv.org/sailus/media_tree.git master
head:   215e4463b11d94668b841368cb6882f3a2968148
commit: 51b1f81e3b15a4cf6c5c1bfd6bb14ff8bc9951fb [10/20] media: imx290: Convert to new CCI register access helpers
config: mips-randconfig-r013-20230727 (https://download.01.org/0day-ci/archive/20230727/202307271602.eGpiQHCZ-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230727/202307271602.eGpiQHCZ-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/202307271602.eGpiQHCZ-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/media/i2c/imx290.c:1526:19: error: call to undeclared function 'devm_cci_regmap_init_i2c'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    1526 |         imx290->regmap = devm_cci_regmap_init_i2c(client, 16);
         |                          ^
   drivers/media/i2c/imx290.c:1526:19: note: did you mean '__devm_regmap_init_i2c'?
   include/linux/regmap.h:660:16: note: '__devm_regmap_init_i2c' declared here
     660 | struct regmap *__devm_regmap_init_i2c(struct i2c_client *i2c,
         |                ^
>> drivers/media/i2c/imx290.c:1526:17: error: incompatible integer to pointer conversion assigning to 'struct regmap *' from 'int' [-Wint-conversion]
    1526 |         imx290->regmap = devm_cci_regmap_init_i2c(client, 16);
         |                        ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +/devm_cci_regmap_init_i2c +1526 drivers/media/i2c/imx290.c

  1514	
  1515	static int imx290_probe(struct i2c_client *client)
  1516	{
  1517		struct device *dev = &client->dev;
  1518		struct imx290 *imx290;
  1519		int ret;
  1520	
  1521		imx290 = devm_kzalloc(dev, sizeof(*imx290), GFP_KERNEL);
  1522		if (!imx290)
  1523			return -ENOMEM;
  1524	
  1525		imx290->dev = dev;
> 1526		imx290->regmap = devm_cci_regmap_init_i2c(client, 16);
  1527		if (IS_ERR(imx290->regmap)) {
  1528			dev_err(dev, "Unable to initialize I2C\n");
  1529			return -ENODEV;
  1530		}
  1531	
  1532		ret = imx290_parse_dt(imx290);
  1533		if (ret)
  1534			return ret;
  1535	
  1536		/* Acquire resources. */
  1537		imx290->xclk = devm_clk_get(dev, "xclk");
  1538		if (IS_ERR(imx290->xclk))
  1539			return dev_err_probe(dev, PTR_ERR(imx290->xclk),
  1540					     "Could not get xclk\n");
  1541	
  1542		ret = imx290_get_regulators(dev, imx290);
  1543		if (ret < 0)
  1544			return dev_err_probe(dev, ret, "Cannot get regulators\n");
  1545	
  1546		imx290->rst_gpio = devm_gpiod_get_optional(dev, "reset",
  1547							   GPIOD_OUT_HIGH);
  1548		if (IS_ERR(imx290->rst_gpio))
  1549			return dev_err_probe(dev, PTR_ERR(imx290->rst_gpio),
  1550					     "Cannot get reset gpio\n");
  1551	
  1552		/* Initialize external clock frequency. */
  1553		ret = imx290_init_clk(imx290);
  1554		if (ret)
  1555			return ret;
  1556	
  1557		/*
  1558		 * Enable power management. The driver supports runtime PM, but needs to
  1559		 * work when runtime PM is disabled in the kernel. To that end, power
  1560		 * the sensor on manually here.
  1561		 */
  1562		ret = imx290_power_on(imx290);
  1563		if (ret < 0) {
  1564			dev_err(dev, "Could not power on the device\n");
  1565			return ret;
  1566		}
  1567	
  1568		/*
  1569		 * Enable runtime PM with autosuspend. As the device has been powered
  1570		 * manually, mark it as active, and increase the usage count without
  1571		 * resuming the device.
  1572		 */
  1573		pm_runtime_set_active(dev);
  1574		pm_runtime_get_noresume(dev);
  1575		pm_runtime_enable(dev);
  1576		pm_runtime_set_autosuspend_delay(dev, 1000);
  1577		pm_runtime_use_autosuspend(dev);
  1578	
  1579		/* Initialize the V4L2 subdev. */
  1580		ret = imx290_subdev_init(imx290);
  1581		if (ret)
  1582			goto err_pm;
  1583	
  1584		v4l2_i2c_subdev_set_name(&imx290->sd, client,
  1585					 imx290->model->name, NULL);
  1586	
  1587		/*
  1588		 * Finally, register the V4L2 subdev. This must be done after
  1589		 * initializing everything as the subdev can be used immediately after
  1590		 * being registered.
  1591		 */
  1592		ret = v4l2_async_register_subdev(&imx290->sd);
  1593		if (ret < 0) {
  1594			dev_err(dev, "Could not register v4l2 device\n");
  1595			goto err_subdev;
  1596		}
  1597	
  1598		/*
  1599		 * Decrease the PM usage count. The device will get suspended after the
  1600		 * autosuspend delay, turning the power off.
  1601		 */
  1602		pm_runtime_mark_last_busy(dev);
  1603		pm_runtime_put_autosuspend(dev);
  1604	
  1605		return 0;
  1606	
  1607	err_subdev:
  1608		imx290_subdev_cleanup(imx290);
  1609	err_pm:
  1610		pm_runtime_disable(dev);
  1611		pm_runtime_put_noidle(dev);
  1612		imx290_power_off(imx290);
  1613		return ret;
  1614	}
  1615	

-- 
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:[~2023-07-27  8:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-27  8:47 [sailus-media-tree:master 10/20] drivers/media/i2c/imx290.c:1526:19: error: call to undeclared function 'devm_cci_regmap_init_i2c'; ISO C99 and later do not support implicit function declarations 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.