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: x86_64-randconfig-x005-20230727 (https://download.01.org/0day-ci/archive/20230727/202307271738.4bmtoDez-lkp@xxxxxxxxx/config) compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce: (https://download.01.org/0day-ci/archive/20230727/202307271738.4bmtoDez-lkp@xxxxxxxxx/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@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202307271738.4bmtoDez-lkp@xxxxxxxxx/ All warnings (new ones prefixed by >>): drivers/media/i2c/imx290.c: In function 'imx290_probe': drivers/media/i2c/imx290.c:1526:26: error: implicit declaration of function 'devm_cci_regmap_init_i2c'; did you mean 'devm_regmap_init_i2c'? [-Werror=implicit-function-declaration] 1526 | imx290->regmap = devm_cci_regmap_init_i2c(client, 16); | ^~~~~~~~~~~~~~~~~~~~~~~~ | devm_regmap_init_i2c >> drivers/media/i2c/imx290.c:1526:24: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 1526 | imx290->regmap = devm_cci_regmap_init_i2c(client, 16); | ^ cc1: some warnings being treated as errors vim +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